True_Range_%
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Teji_Singh

//@version=5
indicator("True_Range_%", "TR_%")

True_Range_Avg  = input(100)
High_True_Range_Value = input.float(1.5,step=0.5)
Low_True_Range_Value = input.float(0.7, step=0.1, maxval = 1)
Latest_True_Range = ta.tr(1)

volatility  = Latest_True_Range / close[1] * 100
Volatility_Avg = ta.sma(volatility,True_Range_Avg)

HIGH_Significance = volatility >= Volatility_Avg * High_True_Range_Value
LOW_Significance = volatility >= Volatility_Avg * Low_True_Range_Value

plot(volatility,title = "True_Range_%", style = plot.style_columns,color = HIGH_Significance ? color.red : LOW_Significance ? color.blue : color.white)
plot(Volatility_Avg, title = "True_Range_Avg_1", color = color.yellow)