Invalid statement: def at 11:1
def iATRPlay = Round((high(period = “DAY”) — low(period = “DAY”)) / iATR, 2);
Any advice is appreciated!
#thinkscript indicator : ATR, ATR In Play
#Average True Range
#by thetrader.top
#Average True Range label
#ATR in play — How many ATR stock did today
input ATRInPlay = {default “1”, “0”};
input ATR = {default “1”, “0”};
def iATR = Round(MovingAverage (AverageType.WILDERS, TrueRange(high(period = AggregationPeriod.DAY )[1], close(period = AggregationPeriod.DAY)[1], low(period = AggregationPeriod.DAY )[1]), 14), 2);
AddLabel (!ATR, “ATR “ + iATR, if iATR <= 0.5 then Color.RED else if iATR <= 2 then Color.DARK_GREEN else Color.WHITE);
def iATRPlay = Round((high(period = “DAY”) — low(period = “DAY”)) / iATR, 2);
AddLabel (!ATRInPlay, “ATRInPlay “ + iATRPlay, if iATRPlay <= 0.5 then Color.DARK_RED else if iATRPlay <= 1 then Color.WHITE else Color.DARK_GREEN);
def iATRPlay = Round((high(period = “DAY”) — low(period = “DAY”)) / iATR, 2);
Any advice is appreciated!
#thinkscript indicator : ATR, ATR In Play
#Average True Range
#by thetrader.top
#Average True Range label
#ATR in play — How many ATR stock did today
input ATRInPlay = {default “1”, “0”};
input ATR = {default “1”, “0”};
def iATR = Round(MovingAverage (AverageType.WILDERS, TrueRange(high(period = AggregationPeriod.DAY )[1], close(period = AggregationPeriod.DAY)[1], low(period = AggregationPeriod.DAY )[1]), 14), 2);
AddLabel (!ATR, “ATR “ + iATR, if iATR <= 0.5 then Color.RED else if iATR <= 2 then Color.DARK_GREEN else Color.WHITE);
def iATRPlay = Round((high(period = “DAY”) — low(period = “DAY”)) / iATR, 2);
AddLabel (!ATRInPlay, “ATRInPlay “ + iATRPlay, if iATRPlay <= 0.5 then Color.DARK_RED else if iATRPlay <= 1 then Color.WHITE else Color.DARK_GREEN);