OPEN-SOURCE SCRIPT

Central Pivot Range (CPR)

Central Pivot Range (CPR) Indicator
The Central Pivot Range (CPR) indicator is designed to help traders identify key levels of support and resistance based on pivot points calculated from the previous day's price action. The CPR levels act as critical areas of price convergence and potential reversal, which can help in anticipating future price movements. This version of the CPR indicator includes customizable features to enhance your trading strategy.

Key Features:
Custom Timeframe Support: The indicator allows you to select a custom timeframe for calculating the CPR levels. By default, it uses the daily timeframe ('D'), but you can adjust it to any other timeframe of your choosing. The indicator calculates the CPR and support/resistance levels based on the data from the selected timeframe.

Central Pivot (CP), Below Central Pivot (BC), and Top Central Pivot (TC):

Pivot (CP): The central pivot point is calculated as the average of the high, low, and close prices of the selected timeframe.
Below Central Pivot (BC): This is the midpoint between the high and low prices of the selected timeframe.
Top Central Pivot (TC): This is calculated based on the central pivot and below central pivot, providing a range between support and resistance levels.
Support and Resistance Levels (S1, S2, S3, R1, R2, R3):

Support Levels (S1, S2, S3): These are calculated based on the central pivot, providing potential areas where price may find support and reverse.
Resistance Levels (R1, R2, R3): These are calculated similarly but indicate potential resistance zones where price may face challenges to move higher.
Dynamic Plotting Based on User Input:

The indicator allows you to choose which levels to display on the chart, including the Central Pivot (CP), Support Levels (S1, S2, S3), and Resistance Levels (R1, R2, R3), all of which can be toggled on or off via checkboxes.
CP is displayed in white, BC and TC in blue, Support levels (S1, S2, S3) in green, and Resistance levels (R1, R2, R3) in red.
Daywise Calculations:

The CPR and levels are based on the previous day’s price action, providing historical support and resistance levels that can be useful for intraday analysis.
The request.security function is used to fetch the pivot data from the custom timeframe, ensuring the levels are calculated based on the last completed period (previous day) without repainting.
Customization Options:
CPR Plot: Toggle the visibility of the central pivot range (CPR) lines.
Support Levels (S1, S2, S3): Choose to show or hide the support levels.
Resistance Levels (R1, R2, R3): Choose to show or hide the resistance levels.
Custom Timeframe: Set a custom timeframe for calculating the CPR, allowing for more flexible and tailored analysis.
educationalmultitimeframePivot points and levels

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?

면책사항