Trading Articles
Article Categories
Article Tools
Average True Range Data 2
Updated February 18, 2017
Top Posters
looks_one
Waterstreet
with 2 posts (0 thanks)
looks_two
bobb
with 1 posts (1 thanks)
looks_3
manev31
with 1 posts (0 thanks)
looks_4
happymichael21
with 1 posts (0 thanks)
trending_up
4,707 views
thumb_up
1 thanks given
group
4 followers
forum
4 posts
attach_file
1 attachments
Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
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.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Average True Range Data 2
(login for full post details)
#1 (permalink )
Miami FL
Posts: 2 since Feb 2013
Thanks: 0 given,
0
received
i am trying to create the indicator for the ATR of data2 here is the code:
Code
inputs: ATRLength(14);
variables: TrueHigh2(0), TrueLow2(0),TrueRange2(0);
if Close[1]of data2 > High of data2 then
TrueHigh2 = Close[1] of data2
else
TrueHigh2 = High of data2 ;
if Close[1] of data2 < Low of data2 then
TrueLow2 = Close[1] of data2
else
TrueLow2 = Low of data2 ;
TrueRange2 = TrueHigh2 - TrueLow2 ;
ATR = Average( TrueRange2, ATRLength );
but it seems to produce different results then running the ATR directly on daily bars... can anyone see anything wrong with the code?
Can you help answer these questions from other members on futures io?
Best Threads (Most Thanked) in the last 7 days on futures io
(login for full post details)
#2 (permalink )
Miami FL
Posts: 2 since Feb 2013
Thanks: 0 given,
0
received
i see what its doing... if you apply it to a daily chart it works fine.. its because im trying to get the daily ATR using data2 that im having the problems cause of when its trying to update the indicator.
(login for full post details)
#3 (permalink )
Vienna Austria
Experience: Intermediate
Platform: TradeStation, MultiCharts
Trading: Stocks, Forex
Posts: 4 since Apr 2012
Thanks: 1 given,
1
received
@Waterstreet
found this in TS Forum and it works fine for me, but it's not writen for data 2 so you must adapt it.
Shows 3 different Ranges
1. previous days lookback periode
2. previous days range
3. todays range intraday ...this what you are looking for
Hope it helps
The following user says Thank You to bobb for this post:
(login for full post details)
#4 (permalink )
Switzerland
Experience: Intermediate
Platform: Tradestation, Python
Trading: Forex
Posts: 12 since Aug 2014
Thanks: 2 given,
1
received
Hi, I was wondering if someone could help me with adding ATR data2 in this strategy:
Code
inputs: Price( Close), FastLength( 50), SlowLength( 55), BuyLevel (25), ATRLength (14) ;
variables: FastAvg( 0 ), SlowAvg( 0 ), ATR( 0 ) ;
FastAvg = AverageFC( Price, FastLength ) ;
SlowAvg = AverageFC( Price, SlowLength ) ;
if CurrentBar > 1 and FastAvg crosses over SlowAvg and AvgTrueRange(data2, ATRLength ) < BuyLevel then
{ CB > 1 check used to avoid spurious cross confirmation at CB = 1 }
Buy ( "MA2CrossLE" ) next bar at market ;
I have tired something but it doesn't work.
Any help is appreciated
Thanks
(login for full post details)
#5 (permalink )
Rocky Hill + NJ/USA
Posts: 1 since Feb 2017
Thanks: 0 given,
0
received
Waterstreet and Manev,
I created an ATR of data2 by doing this:
1) First I created a new Function called ATR_D2:
Two relevant lines are in it. The key part of the new function is calling TrueRange of data2.
inputs: Length( numericsimple ) ;
ATR_D2 = Average( TrueRange of data2, Length ) ;
2) Then from wherever you want to call the new ATR_D2 (from a strategy or function or indicator):
Inside the strategy I named a variable for the ATR for data2 and called it 'ATR_d2'.
ATR_d2 = ATR_D2 (Atr_length); // of data2
Hopefully that will work for you.
Wishing you good luck.
Last Updated on February 18, 2017
Right now
NinjaTrader Indicator Challenge!
Ongoing
Coming soon
Journal Challenge!
February
Coming soon
Battlestations!
March