I´m trying to code a Stop and Reverse ATR indicator for Ninjatrader7.
int periodATR = 100
double percentATR = 10
dot.green for UPtrend
dot.DeepPink for DOWNTrend
UPtrend code:Close * (1 - ((ATR(periodATR) * percentATR) / 10000))
Downtrend code: Close * (1 - ((ATR(periodATR) * percentATR) / 10000))
So, after that I would improve something:
1. If (UPtrend < UPtrend), I would like to mantain the value of uptrend until I new higher UPtrend dot appears or reverse trend if the price close bellow the last uptrend dot.
2. If the trend reversed, every new DOWNTrend dot needs to be lower than the last DOWNTrend dot. If the DOWNTrend dot is higher, the indicator mantain the value of the lowest dot until the trend get reverse or appears a new lower dot.
Picture in attachment.
I´m looking for someone that can finish this indicator for me.