Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
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 for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Hi,
I have looked at the available ToS downloads and some of the threads regarding converting scripts from one platform to another. I also looked in the Online Trading Academy (OTA) posts but didn't see anything there.
I would like to convert the floating ATR capability that is a download from OTA. If anyone can help that would be great. Here is the code and the picture of what it looks like in TradeStation. Thanks in advance.
****** OTA Floating ATR
****** This tool displays the Daily ATR on the chart as well as 10% and 2% of the Daily ATR.
****** Easy Language Code
inputs: PosX( 40 ), PosY( 97 ), TextColor( Black );
ATR = 0;
for x = 0 to 13 begin
if dPSP.Count > 14 then
ATR = ATR + ( iff(dPSP.Close[x+1] astype double > dPSP.High[x] astype double, dPSP.Close[x+1] astype double, dPSP.High[x] astype double)
- iff(dPSP.Close[x+1] astype double < dPSP.Low[x] astype double, dPSP.Close[x+1] astype double, dPSP.Low[x] astype double) );
end;
ATR = ATR / 14;
if Category = 2 then Dec = 2
else if Category = 12 then begin if MidStr(Symbol, 4, 3) = "JPY" then ATR = ATR * 100 else ATR = ATR * 10000; Dec = 0; end
else if Category = 0 then
if SymbolRoot="EC" OR SymbolRoot="JY" OR SymbolRoot="BP" OR SymbolRoot="AD" OR SymbolRoot="CD" OR SymbolRoot="SF" then begin ATR = ATR * 10000; Dec = 0; end
else Dec = 3;
if Dec = 0 then Add = 1 else Add = MinMove * 0.01;
HalfATR = (Round((ATR*0.5/Add),0)+1) * Add; QuarterATR = (Round((ATR*0.25/Add),0)+1) * Add; TenthATR = (Round((ATR*0.1/Add),0)+1) * Add; TwoPctATR = (Round((ATR*0.02/Add),0)+1) * Add;
if ATRText <> 0 AND FirstTickOfBar then Value1 = Text_Delete( ATRText );
ATRText = Text_New( Date, Time, Close, "[dATR]:"+NumToStr(ATR,Dec)+" [10%]:"+NumToStr(TenthATR,Dec)+" [2%]:"+NumToStr(TwoPctATR,Dec) );
Value1 = Text_SetColor( ATRText, TextColor ); Value1 = Text_Float( ATRText, PosX, PosY );
FirstTickOfBar = BarStatus(1) = 2;
Can you help answer these questions from other members on NexusFi?
There are some ATR labels available for free on the interwebs that might do the trick. No screenshot, so not sure if this will work for ya, but try this one: