OPEN-SOURCE SCRIPT
Simple CPR for intraday index trading

Simple CPR is an indicator that displays the Central Pivot Range (CPR) and Support-Resistance pivots. It offers granular customization across CPR, Floor pivots, Developing CPR, and Session High/Low levels.
Original concept from Larry Williams, Mark Fisher & Frank Ochoa
Modified from "CPR (Central Pivot Range)" script by ajithcpas
What is CPR (Central Pivot Range)?
The Central Pivot Range (CPR) is calculated from the previous period’s High (H), Low (L), and Close (C). It forms three levels:
• Pivot (P) = (H + L + C) / 3
• Top Central (TC) = ( P - BC) + P
• Bottom Central (BC) = ( H + L)/2
Together, these levels form a central zone representing the market’s “value area.” Price trading above the CPR typically indicates bullish sentiment, while trading below the CPR reflects bearish bias. A narrow CPR often precedes strong trending moves, whereas a wider CPR signals potential consolidation.
How Pivot Levels are Calculated
Beyond CPR, the indicator supports multiple pivot calculation models, including Traditional, Classic, Fibonacci, and Camarilla
For example, in the traditional model:
• R1 = ( 2 × P ) − L
• S1 = ( 2 × P ) − H
• Higher levels (R2, R3…) scale proportionally by the prior range (H-L).
These levels serve as dynamic intraday support-resistance zones and breakout targets.
Key Features
⦿ Multi-Formula CPR: Select Traditional, Classic, Fibonacci, or Camarilla pivots.
⦿ Multi-Timeframe Control: Auto-detect or manually set CPR timeframe (Daily → Yearly).
⦿ Complete Pivot Suite: Extending to five resistance and five support levels (R1–R5, S1–S5) with optional midpoints (R0.5, R1.5, R2.5, R3.5, R4.5, S0.5, S1.5, S2.5, S3.5, S4.5).All levels can be individually toggled on or off, giving traders complete control over the level of chart detail they prefer.
⦿ Full Customization: Independently toggle lines, fills, price labels, and level names.
⦿ Developing CPR & S/R: Real-time projection of next-session CPR, R1, and S1 with separate visibility controls.
⦿ Session High/Low Tracking: Plot Previous-Session High (PH) & Low (PL) with optional labels and prices.
⦿ Look-Back Flexibility: Display any number of historical CPR/pivot periods.
⦿ Styling Precision: Choose line width, style (solid, dashed, dotted), and individual colors.
⦿ Optional Fills: Visualize the CPR zone or CPR–R1/S1 bands with semi-transparent shading.
⦿ Optimized Performance: Efficient array-based drawing for smooth chart performance even with a long history.
Use Case
CPR analysis helps identify trend bias, volatility contraction/expansion, and key support-resistance zones. This indicator is ideal for intraday indices traders who need a structured yet customizable price-action framework.
Disclaimer
This script is for educational and technical analysis purposes only. It does not constitute financial advice or a recommendation. Always perform independent analysis and manage risk appropriately before placing trades.
Original concept from Larry Williams, Mark Fisher & Frank Ochoa
Modified from "CPR (Central Pivot Range)" script by ajithcpas
What is CPR (Central Pivot Range)?
The Central Pivot Range (CPR) is calculated from the previous period’s High (H), Low (L), and Close (C). It forms three levels:
• Pivot (P) = (H + L + C) / 3
• Top Central (TC) = ( P - BC) + P
• Bottom Central (BC) = ( H + L)/2
Together, these levels form a central zone representing the market’s “value area.” Price trading above the CPR typically indicates bullish sentiment, while trading below the CPR reflects bearish bias. A narrow CPR often precedes strong trending moves, whereas a wider CPR signals potential consolidation.
How Pivot Levels are Calculated
Beyond CPR, the indicator supports multiple pivot calculation models, including Traditional, Classic, Fibonacci, and Camarilla
For example, in the traditional model:
• R1 = ( 2 × P ) − L
• S1 = ( 2 × P ) − H
• Higher levels (R2, R3…) scale proportionally by the prior range (H-L).
These levels serve as dynamic intraday support-resistance zones and breakout targets.
Key Features
⦿ Multi-Formula CPR: Select Traditional, Classic, Fibonacci, or Camarilla pivots.
⦿ Multi-Timeframe Control: Auto-detect or manually set CPR timeframe (Daily → Yearly).
⦿ Complete Pivot Suite: Extending to five resistance and five support levels (R1–R5, S1–S5) with optional midpoints (R0.5, R1.5, R2.5, R3.5, R4.5, S0.5, S1.5, S2.5, S3.5, S4.5).All levels can be individually toggled on or off, giving traders complete control over the level of chart detail they prefer.
⦿ Full Customization: Independently toggle lines, fills, price labels, and level names.
⦿ Developing CPR & S/R: Real-time projection of next-session CPR, R1, and S1 with separate visibility controls.
⦿ Session High/Low Tracking: Plot Previous-Session High (PH) & Low (PL) with optional labels and prices.
⦿ Look-Back Flexibility: Display any number of historical CPR/pivot periods.
⦿ Styling Precision: Choose line width, style (solid, dashed, dotted), and individual colors.
⦿ Optional Fills: Visualize the CPR zone or CPR–R1/S1 bands with semi-transparent shading.
⦿ Optimized Performance: Efficient array-based drawing for smooth chart performance even with a long history.
Use Case
CPR analysis helps identify trend bias, volatility contraction/expansion, and key support-resistance zones. This indicator is ideal for intraday indices traders who need a structured yet customizable price-action framework.
Disclaimer
This script is for educational and technical analysis purposes only. It does not constitute financial advice or a recommendation. Always perform independent analysis and manage risk appropriately before placing trades.
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.