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. اقرأ المزيد في شروط الاستخدام.