OPEN-SOURCE SCRIPT
업데이트됨 CPR by VickyBobby

CPR by VickyBobby
A complete Central Pivot Range (CPR) indicator designed for intraday and positional traders. This script plots Daily, Weekly, and Monthly CPR levels along with the full classical floor pivot system (R1 to R4, S1 to S4), previous day reference levels, and an automated CPR width classifier - delivering a unified view of the most actionable support and resistance zones on the chart.
WHAT THIS INDICATOR PLOTS
Central Pivot Range (CPR):
- Pivot (P)
- Top Central (TC)
- Bottom Central (BC)
Floor Pivot Levels:
- Resistance: R1, R2, R3, R4
- Support: S1, S2, S3, S4
Previous Day Reference Levels:
- Previous Day High (PDH)
- Previous Day Low (PDL)
- Previous Day Close (PDC)
Higher Timeframe CPR (Optional):
- Weekly CPR
- Monthly CPR
FORMULAS USED
Pivot (P) = (High + Low + Close) / 3
Bottom Central = (High + Low) / 2
Top Central = (Pivot - BC) + Pivot
R1 = (2 x P) - Low
R2 = P + (High - Low)
R3 = High + 2 x (P - Low)
R4 = R3 + (R2 - R1)
S1 = (2 x P) - High
S2 = P - (High - Low)
S3 = Low - 2 x (High - P)
S4 = S3 - (S1 - S2)
All values are derived from the previous period's High, Low, and Close.
KEY FEATURES
- Day-by-day segmented lines: each trading session displays its own discrete horizontal levels that automatically reset at the start of a new day.
- Forward-extended live levels for the current trading day, making active zones easy to spot.
- Independent toggles for every level (R1 to R4, S1 to S4, PDH, PDL, PDC).
- Multi-timeframe CPR with separate colors for daily, weekly, and monthly.
- Optional CPR Width Classifier: automatically labels the day as Narrow (likely trending), Normal, or Wide (likely sideways) based on customizable thresholds.
- Optional info table showing current Pivot, TC, BC, CPR width percentage, and day type.
- Full styling controls: line width, line style (Solid, Dashed, Dotted), individual colors, label visibility, and price display options.
- Built-in alerts for price crossing Pivot, TC, BC, R1, and S1.
- Clean status line: no input arguments cluttering the indicator title.
HOW TO USE
Interpreting CPR Width:
- Narrow CPR (low previous-day range) often signals a trending day with directional follow-through.
- Wide CPR (high previous-day range) often signals consolidation or range-bound action.
- Higher CPR than the previous day suggests a bullish bias.
- Lower CPR than the previous day suggests a bearish bias.
- Overlapping CPRs across multiple days suggest a sideways accumulation phase.
Trading Approach:
- A sustained move above TC indicates buyer control; upside targets become R1, R2, R3.
- A sustained move below BC indicates seller control; downside targets become S1, S2, S3.
- The pivot itself often acts as the day's mean - price tends to revert to it during consolidation.
- PDH and PDL serve as critical short-term reference points; a break and hold beyond either often defines the day's direction.
- Virgin CPR levels (untouched in the previous session) tend to act as strong magnets and have a higher probability of being tested.
RECOMMENDED SETTINGS
Indian Index Trading (Nifty / Bank Nifty):
- Timeframe: 5m, 15m, or 30m
- Enable: Daily CPR, PDH, PDL, R1, R2, S1, S2
- Line width: CPR = 2, Pivots = 1
Swing Trading / Forex / Crypto:
- Timeframe: 1H to 4H
- Enable: Daily and Weekly CPR
- Adjust width thresholds to suit the asset's volatility profile
NOTES
- Works on any symbol and any timeframe.
- CPR calculations are based on the previous daily session by default.
- Optimized for intraday timeframes (1m to 1H) where CPR levels are most actionable.
- All calculations use standard, widely accepted floor pivot and CPR formulas.
DISCLAIMER
This indicator is provided for educational and informational purposes only. It does not constitute financial advice or a recommendation to trade. Always perform your own analysis and apply proper risk management before making any trading decisions.
A complete Central Pivot Range (CPR) indicator designed for intraday and positional traders. This script plots Daily, Weekly, and Monthly CPR levels along with the full classical floor pivot system (R1 to R4, S1 to S4), previous day reference levels, and an automated CPR width classifier - delivering a unified view of the most actionable support and resistance zones on the chart.
WHAT THIS INDICATOR PLOTS
Central Pivot Range (CPR):
- Pivot (P)
- Top Central (TC)
- Bottom Central (BC)
Floor Pivot Levels:
- Resistance: R1, R2, R3, R4
- Support: S1, S2, S3, S4
Previous Day Reference Levels:
- Previous Day High (PDH)
- Previous Day Low (PDL)
- Previous Day Close (PDC)
Higher Timeframe CPR (Optional):
- Weekly CPR
- Monthly CPR
FORMULAS USED
Pivot (P) = (High + Low + Close) / 3
Bottom Central = (High + Low) / 2
Top Central = (Pivot - BC) + Pivot
R1 = (2 x P) - Low
R2 = P + (High - Low)
R3 = High + 2 x (P - Low)
R4 = R3 + (R2 - R1)
S1 = (2 x P) - High
S2 = P - (High - Low)
S3 = Low - 2 x (High - P)
S4 = S3 - (S1 - S2)
All values are derived from the previous period's High, Low, and Close.
KEY FEATURES
- Day-by-day segmented lines: each trading session displays its own discrete horizontal levels that automatically reset at the start of a new day.
- Forward-extended live levels for the current trading day, making active zones easy to spot.
- Independent toggles for every level (R1 to R4, S1 to S4, PDH, PDL, PDC).
- Multi-timeframe CPR with separate colors for daily, weekly, and monthly.
- Optional CPR Width Classifier: automatically labels the day as Narrow (likely trending), Normal, or Wide (likely sideways) based on customizable thresholds.
- Optional info table showing current Pivot, TC, BC, CPR width percentage, and day type.
- Full styling controls: line width, line style (Solid, Dashed, Dotted), individual colors, label visibility, and price display options.
- Built-in alerts for price crossing Pivot, TC, BC, R1, and S1.
- Clean status line: no input arguments cluttering the indicator title.
HOW TO USE
Interpreting CPR Width:
- Narrow CPR (low previous-day range) often signals a trending day with directional follow-through.
- Wide CPR (high previous-day range) often signals consolidation or range-bound action.
- Higher CPR than the previous day suggests a bullish bias.
- Lower CPR than the previous day suggests a bearish bias.
- Overlapping CPRs across multiple days suggest a sideways accumulation phase.
Trading Approach:
- A sustained move above TC indicates buyer control; upside targets become R1, R2, R3.
- A sustained move below BC indicates seller control; downside targets become S1, S2, S3.
- The pivot itself often acts as the day's mean - price tends to revert to it during consolidation.
- PDH and PDL serve as critical short-term reference points; a break and hold beyond either often defines the day's direction.
- Virgin CPR levels (untouched in the previous session) tend to act as strong magnets and have a higher probability of being tested.
RECOMMENDED SETTINGS
Indian Index Trading (Nifty / Bank Nifty):
- Timeframe: 5m, 15m, or 30m
- Enable: Daily CPR, PDH, PDL, R1, R2, S1, S2
- Line width: CPR = 2, Pivots = 1
Swing Trading / Forex / Crypto:
- Timeframe: 1H to 4H
- Enable: Daily and Weekly CPR
- Adjust width thresholds to suit the asset's volatility profile
NOTES
- Works on any symbol and any timeframe.
- CPR calculations are based on the previous daily session by default.
- Optimized for intraday timeframes (1m to 1H) where CPR levels are most actionable.
- All calculations use standard, widely accepted floor pivot and CPR formulas.
DISCLAIMER
This indicator is provided for educational and informational purposes only. It does not constitute financial advice or a recommendation to trade. Always perform your own analysis and apply proper risk management before making any trading decisions.
릴리즈 노트
Updated CPR Strategy by VickyBobby릴리즈 노트
Update the CPR tools with Next Day CPR 릴리즈 노트
Updated CPR by VickyBobby릴리즈 노트
Updated version with CPR Strategy오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.