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.
發行說明
🐣 New Features• Five Moving Averages
Expanded support for five configurable moving averages.
• Auto-Anchored VWAP
Support for VWAP, which automatically anchors to the session open, with user controls to display only today’s VWAP or historical VWAPs across sessions.
• Initial Balance (IB)
Full IB framework added with Auto + Custom session modes. IB High/Low, IB range (points + %), and IB conviction now populate the CPR table and dynamically update throughout the session.
• High Range Alerts
Range detection highlights candles exceeding user-defined numeric or percentage thresholds, with optional on-chart labels.
• CPR Table
A redesigned multi-timeframe sentiment dashboard displaying Monthly/Weekly/Daily location, CPR width/type, open/current zones, trade direction, IB metrics, and bar range metrics.
🐞 Fixes
• Fibonacci Pivot Runtime Error — Fixed
Resolved the runtime error triggered when selecting Fibonacci pivot type.
• PH/PL Now Correctly Uses CPR Timeframe
Previous High/Low values are now derived from the actual CPR timeframe instead of the chart timeframe.
• Auto Timeframe Logic Corrected
Daily CPR now correctly plots on all intraday timeframes up to 60 minutes when using Auto mode.
發行說明
Bugfix update發行說明
Bugfix update發行說明
More bugfixes發行說明
Dark mode table fixed開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。