NasserHumood

Candlestick Percentile Rank

CANDLESTICK PERCENTILE RANK

█ OVERVIEW
This script is designed to sample all available candles within a chosen time frame and provide a candlestick percentile rank to each candle. This script works by measuring a candle's body or its low to high value to the upside, or to the downside in percentage or in dollar value. Once the candle is measured its given a value based on all the previous measurements. You will be able to know if a body ( or a full candle/bar ) is above, or below a certain percentile level. By doing this you're effectively going to know if a candle is under performing or under-performing compared to the chart's history.

Example : A candle that did a 30% move vs another did a 10% and a third did a 5%. Here we 3 candles. The one that did a 30% is going to be ranked at 100 because it's the highest while the 5% candle ranks at 0 and the 10% candles ranks at 50. you see how this works. Having a candle in the 90th percentile means at that time it scored better than 90% of the preceding candles based on its move ( in dollar or percentage ).

So imagine you have an organic move of an up trend, ideally and what you want to see is this ; a candle with a low rank followed by one that's higher, followed by one that's also higher until the trend stops and you see a pin bar or whatever topping candle. You expect to see a rank going from low value to high value to suddenly sharply decrease to low value.

Constant low values may indicate lower volatility or time to change. For example, a doji candle will create a very low percentile rank value ( body-wise ). A high percentile rank value means high volatility on body and full candle calculations.

^ This is only one use of it.

A trendline may also form with a breakout points and information about the trend of the volatility of recent candles. Moving averages when applied to these calculations and to the percentile ranks can absolutely help in making these trends a bit smoother which is why you can add them to the graph. if you wish.


This script can be used in multiple ways including as a measure of volatility. or for statistical purposes. If I know the 50th percentile of a candle value I can know a very critical information about an asset's behavior and how volatile it is compared to another. There are many questions that can be answered using this script. How many times has this asset printed a candle of x% in the past y amount of time and how often does that happen. Is this candle or that truly rare ?

This script also has an option to highlight a specific percentile level showing its value. You can also see the number of sampled candles for clarity on the reliability of the data.

In conclusion, candlesticks effect each others. The whole candlestick/bars patterns is based on this. The percentile Rank is an effective way to observe and study these effects. The percentile rank shows you how on a measuring stick from 0 to 100 how a candle ( body or full low-high ) ranks compared to other candles in the past based on dollar value or percentage value. There are many untapped usages of the percentile rank when applied to candlesticks calculations and I hope this script can help you with this. If one can study the behavior of an asset and its bars percentile ranks they can unlock some probabilistic advantages.

█ Future Plans and upgrades to this script may include :
1. Count the times a percentile level is hit.
2. Display details about the highest/lowest levels.
and more! feel free to let me know what you'd like to see!

█ How to use :
1. Put the script on your chart
2. Navigate to the settings
give the script a few seconds and you should be set.

To get access to any of my scripts feel free to visit my website :
gannbox.com

you can also contact me on Twitter :
twitter.com/Nasser_Humood

Or through TradingView's direct messages.
僅限邀請腳本

僅限作者授權的用戶訪問此腳本,並且通常需要付費。您可以將其增加到收藏腳本中,但是只有在向作者請求並獲得許可之後,才能使用它。 請與NasserHumood聯繫以獲取更多資訊,或按照以下作者的說明進行操作。

在您100%信任腳本作者並了解腳本的工作原理之前,TradingView不建議您購買腳本並使用它。在很多情況下,您可以在我們的社群腳本庫中免費找到一個不錯的開源替代品。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

作者的說明

Feel Free to contact me if you need access to this script, my information is down below.

想在圖表上使用此腳本?

警告:請閱讀,然後再請求訪問權限。