How to create Yesterdays CPR condition

I tried creating conditions for yesterdays Pivot and Bottim CPR but nat able to write Top CPR.

The formula for Top CPR: The Central Pivot Range – Varsity by Zerodha

Please help.

1 Like

You can certainly create conditions for historical CPR. As a workaround, you can simplify the formula for Top CPR as explained below:

Pivot = (High + Low + Close)/3

Bottom CPR = (High + Low)/ 2

Top CPR = (Pivot – BC) + Pivot

           = { [(High + Low + Close)/3] - [(High + Low)/ 2] } + [(High + Low + Close)/3]

           = [ (2Close - High - Low)/6 ] + [(High + Low + Close)/3]

           = (6Close - 3High - 3Low + 6High + 6Low + 6Close)/18

           = (3High + 3Low + 12Close)/18

           = (High + Low + 4Close)/6

You can refer to an example scanner below:

The scanner will check for stocks whose current day’s Top CPR is higher than the previous day’s Top CPR. Please note that today’s CPR is calculated using the previous day’s OHLC hence we have used the offset as ‘-2’(previous to the previous day) because we want to create conditions for the previous day’s CPR.

If you have more queries you can ask here and I’ll be happy to help. Alternatively, you can also reach out to us at Support Streak

3 Likes

This short formula is really helpful.