zciwtrades
New member
Hello traders! I was looking if anyone could modify this code that plots 1.5 ATR from the lows so that it is like a trailing stop style, as in it flattens out until a higher low is made. Ideally if i could also set it to start at a certain date (like an anchored VWAP) that would be amazing!
Thanks!!!
Code:
input length = 20;
input factor = 1.5;
input averageType = AverageType.SIMPLE;
def ATR = MovingAverage(averageType, TrueRange(high, close, low), length);
plot ATRTrail = low - (ATR *factor);
Thanks!!!
Code:
input length = 20;
input factor = 1.5;
input averageType = AverageType.SIMPLE;
def ATR = MovingAverage(averageType, TrueRange(high, close, low), length);
plot ATRTrail = low - (ATR *factor);