The calculation of the levels is very simple:
TC = ( – BC ) +
= (High + Low + Close)/3
BC = (High + Low)/2
As you can see from the above CPR formula, all the 3 levels are calculated using just 3 variables, High, Low, and Close price. When you add CPR levels in a stock’s chart, TC is highest, the is at the center and BC is the lowest level. However, depending on market conditions TC’s value may be lower than BC . Irrespective of the calculation, the highest of the 3 values is typically termed as TC and the lowest is BC .
The fundamental idea behind this indicator is that the particular day’s trading range captures everything about the market sentiment, and hence this range can be used to predict the price movement of the following days.
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.