# ver 2 additions by Yesh Subramanian 9/21/25
# - Changed ATR labels to Color.YELLOW to correspond with the chart
# - Kept ADR labels as Color.LIGHT_GREEN (unchanged) to map with chart in darker green
# - Added Avg ATR labels as Color.WHITE to map with chart
# - Added Avg ADR labels to Color.GRAY to map with chart
declare lower;
input length = 14;
# ATR
plot ATR = MovingAverage(AverageType.WILDERS, TrueRange(high, close, low), length);
ATR.SetDefaultColor(GetColor(8));
AddLabel(yes, "ATR: " + Round(ATR, 3), Color.YELLOW);
AddLabel(yes, "ATR: " + Round((ATR / close) * 100, 3) + "%", Color.YELLOW);
# ADR
plot ADR = MovingAverage(AverageType.WILDERS, high - low, length);
ADR.SetDefaultColor(GetColor(6));
AddLabel(yes, "ADR: " + Round(ADR, 3), Color.LIGHT_GREEN);
AddLabel(yes, "ADR: " + Round((ADR / close) * 100, 3) + "%", Color.LIGHT_GREEN);
# Average ATR
plot AvgATR = MovingAverage(AverageType.SIMPLE, ATR, length);
AvgATR.SetDefaultColor(GetColor(9));
AddLabel(yes, "Avg ATR: " + Round(AvgATR, 3), Color.WHITE);
AddLabel(yes, "Avg ATR: " + Round((AvgATR / close) * 100, 3) + "%", Color.WHITE);
# Average ADR
plot AvgADR = MovingAverage(AverageType.SIMPLE, ADR, length);
AvgADR.SetDefaultColor(GetColor(7));
AddLabel(yes, "Avg ADR: " + Round(AvgADR, 3), Color.GRAY);
AddLabel(yes, "Avg ADR: " + Round((AvgADR / close) * 100, 3) + "%", Color.GRAY);