How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Feature Request FAQ Help & Wiki Twitter

# CM ATR PercentileRank

3162 26
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

```//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)```

## Related Ideas

Is there a huge difference between this and Vix Fix?
2use
Not a huge difference...some people are just ATR fans and understand the calculations and are more comfortable with the settings.

ChrisMoody
I see a lot of people adjusting the settings on the Williams Vix Fix...and they don't understand what the changes in the settings actually do. They try and curve fit it to a specific chart...and most of the time I can tell it won't be reliable going forward...

Therefore...these settings are pretty obvious
ChrisMoody
How can you see that they do that? And the setting the vixfix is provided is a default ones from the original idea?
2use
You can easily see the settings right by the indicator name. Also I originally coded with the Percentile of the Lows highlighting those bars....I took it off b/c it's only reliable for catching lows...but I left the code in there and just //it out so it wouldn't plot. Some people added that in...and it doesn't work consistently.

The settings (Default) are Larry's settings. But I did create inputs so people can adjust. What's different is I changed everything to show a percentile based result...I did this to filter out the moves that don't meet the Extreme criteria so people wouldn't have to evaluate the indicaator...the Extreme moves just show up. The way larry plots it is imagina a line going from highs to lows with Bolinger Bands on top of the line. So when the line exceeds the bollinger bands there is your extreme move. But I knew if I coded it that way people would see things that weren't really there...b/c they want to get in to a trade.

So when people play with the settings there are "moving parts" in the background being adjusted also....It's kind of funny....you have one of the best traders of our time that provides a indicator he has tested extensively...and people want to mess with the settings to try and catch more moves...instead of the extreme moves the indicator is designed to pinpoint.
2use
Check out this post...pretty interesting find...

ChrisMoody
This was a great idea and I'm finding it very useful. It reminds me, in concept of climactic volume in the better volume indicator. It's interesting to compare it to volume that is shown compared to it's average. I'm thinking I may be able to use it for confirmation of a signal generated by another indicator. And, by the way, it seems to me it does work well for showing tops when it is on an underlying that is in a downtrend. Thanks for going public with this.
ChrisMoody
Where can one find thid indicator? CM_ATR_PrcntRank.
tarhun
It's at the top of the page your on. The main Heading on the page is CM_ATR_PrcntRank

If you don't know how to get the indicator. Watch the 2nd video on this page... http://videos.tradingview.com ...titled "Importing Custom Indicators" Date 8/8/2014
What about reference to this indicator?
tarhun
barev?:)
2use
What is "barev"?
tarhun
The first 4 lines under the main chart is the only reference. It's that simple.
ChrisMoody
I understand that this indicator is great. But where can I take it?
Has anyone translated this for ThinkScript (Think or Swim?)
Please update the CM ATR PercentileRank bars. :)
I haven't been able to translate it for ThinkorSwim.
asf
ASF...

Please don't take this as being rude towards you in any way. History, has shown I go out of my way to help people in any way possible on TradingView. However I'm constantly being asked questions that aren't specific. Therefore I have no idea what answer to give. You know exactly what you mean by asking the question. I can't read you mind.

So when you say Please update the "Code"...In what way? It works. If you have a specific feature in mind then please state the "specific" feature.

If your asking me to update the code so it's compatable with TOS? This is not possible. TOS uses a different more complex coding language, while Pinescript is much more user friendly and as mentioned below...the capabilities of PineScript are soon to have extremely advanced capabilities. More importantly...If you watched the latest video I posted...It states that sometime this month we will be introducing Paper Trading...and after any bugs are worked out TradingView will be integrating brokerages to give you the ability to trade through the charts...(This will take a while)..Therefore TOS is soon to become a direct competitor. So people posting code for other platforms...and soon to be direct competitors is not acceptable. Imaging calling TOS and asking them to code one of their indicators for TradingView for you. We both know what the response will be.

With that being said...I trade options through TOS...and I'll throw you a bone...

You may find someone on here that mentions they use TOS too...If you PM that person they may be willing to help you out...HINT...HINT...possibly me!!! But let's keep other platforms off the main threads.

Another Bone....go to http://www.Thinkscripter.com ... It's owned by a guy named Eric...he's the #1 coder for TOS. There is a free version of his site...and a paid version. I've been a paid member for years...there are talented coders on there that can code anything. Plus as a paid member you get a zip file that has 100+ indicators Eric has coded. This 'May" have been where I came across the indicator in the first place. I wouldn't copy Eric's work...that's an unwritten rule amongst coders. But I may have taken the general concept and converted it to a Percentile Rank which highlights the EXTREME moves in green.

Please don't take this as me attacking your question in any way. My sincerest apologies if you take it that way. Not my intentions.

This same conversation will be had with many others. Many will vouch for my willingness to help anyone out in any way I can. TradingView's goal is to become the best platform available to the retail trader....Period...With full strategies and backtesting coming out around December, and full broker integration coming after that...Full scanning capability coming later on...I hope you start to understand that while TOS offers a few more capabilities. today...In my opinion...it won't for long...And I'm a 10+ year TOS user...The features the developers are creating now...and the features they are working on behind the scenes...will be first ever features ever seen in this industry.

You...and everyone else are at the right place at the right time....a little patience....GREAT THINGS to COME....
ChrisMoody
Thanx for the link - comment helped in more than one way
ChrisMoody
I hope this is just an "Emily Litella" moment.
I don't expect you to translate your code for platforms that you do not use or need.
(I hope some else will.)
My second comment "Please update the CM ATR PercentileRank bars" was regarding the CHART at the top of the post. I would have liked to have seen it update to show today's market conditions. When I try to get it to update, it doesn't include your awesome study's bars for the new dates. But, now I realize that this request wasn't reasonable because it would need to be updated whenever someone wants to see "today's" market conditions.
Where can one find this indicator?
tarhun
The Indicator is at the top of the page. Does that answer your question.
ChrisMoody
More or less.
Chris - I'm a newcomer to the site. How do I get the ATR percentile rank on my charts?
Alphaoptions
ChrisMoody
Could you please give a link to this indicator so that I could put it on my chart?
United States
United Kingdom
India
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia

한국
Home Stock Screener Forex Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter