ChrisMoody

CM ATR PercentileRank

CM ATR PercentileRank - Great For Showing Market Bottoms.

When Increased Volatility to the Downside Reaches Extreme Levels it’s Usually a Sign of a Market Bottom.

This Indicator Takes the ATR and uses a different LookBack Period to calculate the Percentile Rank of ATR Which is a Great Way To Calculate Volatility

Be Careful Of Using w/ Market Tops. Not As Reliable.


***Ability to Control ATR Period and set PercentileRank to Different Lookback Period

***Ability to Plot Histogram Just Showing Percentiles or Histogram Based on Up/Down Close

Fuchsia Lines = Greater Than 90th Percentile of Volatility based on ATR and LookBack Period.
Red Lines = Warning — 80-90th Percentile
Orange Lines = 70-80th Percentile

Other Useful Indicators

Williams Vix Fix

CM_RSI EMA Is a Great Filter for Williams Vix Fix

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?
//Created By ChrisMoody on 9/17/2014 
//Ability to control ATR period and set PercentileRank to Different Lookback Period
//Ability to Plot HIstogram Just Showing Percentiles or Hitogram Based on Up/Down Closes
study(title="CM_ATR_Percentile", shorttitle="CM_ATR_PrcntRank", overlay=false, precision=0)
length = input(5, minval=1, title="ATR Length")
length2 = input(50, minval=1, title="# of Bars the PercentileRank uses to Calculate % Values")
sn = input(true, title="Show Normal Histogram? Uncheck = Histogram based on Up/Down Close")

//ATR and PercentileRank Calculations
atr = sma(tr, length)
pctileRank = percentrank(atr, length2)

down = close < close[1]
up = close > close[1]

//Calculation for Showing Histogram based on Up/Down Close
pctileRankFinal = up ? pctileRank : down ? pctileRank * -1 : na

//Color Rules
col = pctileRank <= 70 ? gray : pctileRank > 70 and pctileRank < 80 ? orange : pctileRank >= 80 and pctileRank <= 90 ? red : pctileRank >= 90 ? fuchsia : silver

//Plot Statements
plot(sn and pctileRank ? pctileRank : pctileRankFinal, title="PercentileRank Histogram",style=columns, linewidth=2, color=col)
plot(0, title="0 Line", style=line, linewidth=3, color=silver)