Volatility Ratio Indicator & Scan
Here's a good scan I made:
http://tos.mx/IuRFsgv
To use the above scan, first load this script into your library. Name it: Volatility Ratio
http://tos.mx/nvDXYsK
Here's a good scan I made:
http://tos.mx/IuRFsgv
To use the above scan, first load this script into your library. Name it: Volatility Ratio
http://tos.mx/nvDXYsK
Ruby:
declare lower;
input length = 14;
input signal = .6;
def truehigh = Max(high, close[1]);
def truelow = Min(low, close[1]);
def TTR = truehigh - truelow;
def ATR = MovingAverage(averagetype.WILDERS, TTR, length);
plot VR = TTR / ATR;
VR.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
VR.AssignValueColor(if VR >= signal then Color.GREEN else Color.LIGHT_RED);
plot zeroline = 0;
zeroline.SetDefaultColor(Color.GRAY);
plot sigline = signal;
sigline.SetDefaultColor(Color.LIME);
plot widerangeline = 2;
widerangeline.SetDefaultColor(Color.CYAN);