Take ATR value from specific day - EasyLanguage Programming | futures.io
futures.io futures trading

Go Back   futures.io

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > TradeStation > EasyLanguage Programming

Take ATR value from specific day
Started:August 20th, 2015 (02:36 AM) by simonehuggins Views / Replies:255 / 1
Last Reply:August 20th, 2015 (02:36 AM) Attachments:0

Welcome to futures.io.

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread

Take ATR value from specific day

Old August 20th, 2015, 02:36 AM   #1 (permalink)
Elite Member
Sydney, NSW
Futures Experience: Beginner
Platform: MultiCharts
Favorite Futures: Stocks
Posts: 3 since Feb 2015
Thanks: 1 given, 0 received

Take ATR value from specific day

Hi fellow traders,

I have a very specific issue to solve - I would like to take the ATR value (measured over 10 day length) from a specific day.

I trade daily bars, Aus Stocks, this is for an ATR Trailing Exit from a long position.

Here is the code (If anyone thinks that this is not a strict trail (ie, only trails up, does not trail down), please let me know. I think I have coded it right but you never know).

Inputs: TrailingATRs(4), ATRLength(10);

Var: PosHigh(0);
Var: ATRVal(0);

ATRVal = AvgTrueRange(ATRLength) * TrailingATRs;

If MarketPosition = 1 Then Begin
If BarsSinceEntry = 0 Then
	PosHigh = High - ATRVal;
If (High - ATRVal) > PosHigh Then
	PosHigh = High - ATRVal;
If High < PosHigh then
Sell ( "ATRtrail" ) Next Bar at PosHigh or lower ;

The issue is I want ATRval to be taken from the day that the highest high occured. At the moment it does not seem to be doing that.

Thank you in advance for any help!

Reply With Quote

Old August 20th, 2015, 02:36 AM   #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.



futures.io > Futures Trading, News, Charts and Platforms > Platforms and Indicators > TradeStation > EasyLanguage Programming > Take ATR value from specific day

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

Corey Rosenbloom: Tips, Tactics, and Real Trades: Trading Intraday Trend Reversals

Elite only

An Afternoon with FIO trader bobwest

Elite only

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating 20 day ATR stackedoptions ThinkOrSwim 5 July 7th, 2015 02:08 AM
Run code in nt7 at specific time each day pxp333 NinjaTrader 3 May 24th, 2015 03:41 PM
Prog. for SPY Atr vs. Atr of all stocks in tradestation Inventor TradeStation 2 November 27th, 2014 10:24 AM
H/L FOR A SPECIFIC PERIOD OF TIME FKtrader NinjaTrader 2 October 20th, 2013 11:30 AM
How to find a specific thread nkp9999 Beginners and Introductions 2 February 27th, 2011 03:07 AM

All times are GMT -4. The time now is 09:21 AM.

Copyright © 2016 by futures.io. All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts

Page generated 2016-10-21 in 0.09 seconds with 19 queries on phoenix via your IP