Pavan CPR Strategy Pavan CPR Strategy (Pine Script)
The Pavan CPR Strategy is a trading system based on the Central Pivot Range (CPR), designed to identify price breakouts and generate long trade signals. This strategy uses key CPR levels (Pivot, Top CPR, and Bottom CPR) calculated from the daily high, low, and close to inform trade decisions. Here's an overview of how the strategy works:
Key Components:
CPR Calculation:
The strategy calculates three critical CPR levels for each trading day:
Pivot (P): The central value, calculated as the average of the high, low, and close prices.
Top Central Pivot (TC): The midpoint of the daily high and low, acting as the resistance level.
Bottom Central Pivot (BC): Derived from the pivot and the top CPR, providing a support level.
The script uses request.security to fetch these CPR values from the daily timeframe, even when applied on intraday charts.
Trade Entry Condition:
A long position is initiated when:
The current price crosses above the Top CPR level (TC).
The previous close was below the Top CPR level, signaling a breakout above a key resistance level.
This condition aims to capture upward momentum as the price breaks above a significant level.
Exit Strategy:
Take Profit: The position is closed with a profit target set 50 points above the entry price.
Stop Loss: A stop loss is placed at the Pivot level to protect against unfavorable price movements.
Visual Reference:
The script plots the three CPR levels on the chart:
Pivot: Blue line.
Top CPR (TC): Green line.
Bottom CPR (BC): Red line.
These plotted levels provide visual guidance for identifying potential support and resistance zones.
Use Case:
The Pavan CPR Strategy is ideal for intraday traders who want to capitalize on price movements and breakouts above critical CPR levels. It provides clear entry and exit signals based on price action and is best used in conjunction with proper risk management.
Note: The strategy is written in Pine Script v5 for use on TradingView, and it is recommended to backtest and optimize it for the asset or market you are trading.
Cprstrategy
CPR by NKDCentral Pivot Range (CPR) Trading Strategy:
The Central Pivot Range (CPR) is a widely-used tool in technical analysis, helping traders pinpoint potential support and resistance levels in the market. By using the CPR effectively, traders can better gauge market trends and determine favorable entry and exit points. This guide explores how the CPR works, outlines its calculation, and describes how traders can enhance their strategies using an extended 10-line version of CPR.
What Really Central Pivot Range (CPR) is?
At its core, the CPR consists of three key lines:
Pivot Point (PP) – The central line, calculated as the average of the previous day’s high, low, and closing prices.
Upper Range (R1) – Positioned above the Pivot Point, acting as a potential ceiling where price may face resistance.
Lower Range (S1) – Found below the Pivot Point, serving as a potential floor where price might find support.
Advanced traders often expand on the traditional three-line CPR by adding extra levels above and below the pivot, creating up to a 10-line system. This extended CPR allows for a more nuanced understanding of the market and helps identify more detailed trading opportunities.
Applying CPR for Trading Success
1. How CPR is Calculation
The CPR relies on the previous day's high (H), low (L), and close (C) prices to create its structure:
Pivot Point (PP) = (H + L + C) / 3
First Resistance (R1) = (2 * PP) - L
First Support (S1) = (2 * PP) - H
Additional resistance levels (R2, R3) and support levels (S2, S3) are calculated by adding or subtracting multiples of the previous day’s price range (H - L) from the Pivot Point.
2. Recognizing the Market Trend
To effectively trade using CPR, it’s essential to first determine whether the market is trending up (bullish) or down (bearish). In an upward-trending market, traders focus on buying at support levels, while in a downward market, they look to sell near resistance.
3. Finding Ideal Entry Points
Traders often look to enter trades when price approaches key levels within the CPR range. Support levels (S1, S2) offer buying opportunities, while resistance levels (R1, R2) provide selling opportunities. These points are considered potential reversal zones, where price may bounce or reverse direction.
4. Managing Risk with Stop-Loss Orders
Proper risk management is crucial in any trading strategy. A stop-loss should be set slightly beyond the support level for buy positions and above the resistance level for sell positions, ensuring that losses are contained if the market moves against the trader’s position.
5. Determining Profit Targets
Profit targets are typically set based on the distance between entry points and the next support or resistance level. Many traders apply a risk-reward ratio, aiming for larger potential profits compared to the potential losses. However, if the next resistance and support level is far then middle levels are used for targets (i.e. 50% of R1 and R2)
6. Confirmation Through Other Indicators
While CPR provides strong support and resistance levels, traders often use additional indicators to confirm potential trade setups. Indicators such as moving averages can
help validate the signals provided by the CPR.
7. Monitoring Price Action At CPR Levels
Constantly monitoring price movement near CPR levels is essential. If the price fails to break through a resistance level (R1) or holds firm at support (S1), it can offer cues on when to exit or adjust a trade. However, a strong price break past these levels often signals a continued trend.
8. Trading Breakouts with CPR
When the price breaks above resistance or below support with strong momentum, it may signal a potential breakout. Traders can capitalize on these movements by entering positions in the direction of the breakout, ideally confirmed by volume or other technical indicators.
9. Adapting to Changing Market Conditions
CPR should be used in the context of broader market influences, such as economic reports, news events, or geopolitical shifts. These factors can dramatically affect market direction and how price reacts to CPR levels, making it important to stay informed about external market conditions.
10. Practice and Backtesting for Improvements
Like any trading tool, the CPR requires practice. Traders are encouraged to backtest their strategies on historical price data to get a better sense of how CPR works in different market environments. Continuous analysis and practice help improve decision-making and strategy refinement.
The Advantages of Using a 10-Line CPR System
An extended 10-line CPR system—comprising up to five resistance and five support levels—provides more granular control and insight into market movements. This expanded view helps traders better gauge trends and identify more opportunities for entry and exit. Key benefits include:
R2, S2 Levels: These act as secondary resistance or support zones, giving traders additional opportunities to refine their trade entries and exits.
R3, S3 Levels: Provide an even wider range for identifying reversals or trend continuations in more volatile markets.
Flexibility: The broader range of levels allows traders to adapt to changing market conditions and make more precise decisions based on market momentum.
So in Essential:
The Central Pivot Range is a valuable tool for traders looking to identify critical price levels in the market. By providing a clear framework for identifying potential support and resistance zones, it helps traders make informed decisions about entering and exiting trades. However, it’s important to combine CPR with sound risk management and additional confirmation through other technical indicators for the best results.
Although no trading tool guarantees success, the CPR, when used effectively and combined with practice, can significantly enhance a trader’s ability to navigate market fluctuations.
Tomorrow Floor Pivots with CPR By Nifty ZThe colors for resistance and support levels have been updated to gradient reds and greens for clearer distinction.
The CPR band uses light blue and purple to stand out more effectively.
Here's a detailed explanation of the user inputs and the typical use of **Floor Pivots for Tomorrow’s Market Range** in a trading context, focusing on support, resistance, and breakout scenarios:
The script allows traders to customize key parameters for their analysis:
1. Pivot Timeframe:
- Users can select different timeframes for calculating floor pivots, such as 1 hour, 4 hours, daily, weekly, monthly, etc.
- This is crucial because the timeframe selection influences the granularity of the support and resistance levels for the next trading day.
- For instance, selecting a **Daily** timeframe will calculate floor pivots for the next trading day, while selecting **Weekly** will give levels for the upcoming week.
2. Show Floor Pivots:
- Users can toggle the visibility of the calculated **Floor Pivots**, which include resistance levels (R1, R2, R3, R4) and support levels (S1, S2, S3, S4).
3. Show CPR (Central Pivot Range):
- CPR (Central Pivot Range) is a key area where the price tends to consolidate.
- The script allows users to enable or disable the visibility of CPR, which consists of the BC (Bottom Central Pivot) and TC (Top Central Pivot).
4. Show Labels:
- Users can choose whether or not to display labels indicating the **Pivot**, **Support**, and Resistance levels on the chart. This can be helpful for visual analysis when day trading.
Understanding Floor Pivots
The Floor Pivots (Pivot, Resistance, and Support levels) for tomorrow's market range are calculated based on today’s high, low, and close. These levels help traders anticipate how the market may behave in the upcoming session.
1. Pivot:
- The Pivot Point is a central level, calculated as the average of the high, low, and close. It’s considered a reference point that determines the market’s overall bias.
- If the price is trading **above the pivot**, it generally suggests a **bullish** sentiment for the day.
- If the price is trading **below the pivot**, it suggests a **bearish** sentiment.
2. Resistance Levels (R1, R2, R3, R4):
- R1 is often the first area where price may stall in an uptrend. It represents the first major resistance level.
- **R2**, **R3**, and **R4** mark additional levels of resistance, progressively further away from the current price. These are used to project potential upward targets.
- These resistance levels are areas where the price might encounter selling pressure, especially during day trading.
3. **Support Levels (S1, S2, S3, S4):**
- Similarly, **S1** is the first area where the price might find support in a downtrend.
- **S2**, **S3**, and **S4** provide deeper support levels where the price may bounce from.
- These support zones are used by day traders to anticipate where the price might reverse upward.
### **Role of Resistance and Support in Day Trading**
- **Resistance Levels (R1, R2, R3, R4)** indicate potential areas where price could **stall** during an uptrend. These levels are useful for **short-term traders** looking to set exit points or identify reversal zones.
- **Support Levels (S1, S2, S3, S4)** highlight areas where the price could **find support** and potentially **bounce** higher. These levels are particularly helpful for identifying buy zones in a downtrend.
- If a price **breaks out** above the resistance levels or **breaks down** below the support levels, it often signals a strong trend continuation.
### **Understanding the Central Pivot Range (CPR)**
The **CPR** is formed by two key levels:
- **BC (Bottom Central Pivot):** The midpoint of the day’s high and low.
- **TC (Top Central Pivot):** The difference between the pivot and BC.
The CPR acts as a region of **consolidation** or **indecision** where the market is likely to stay within a narrow range. The width of the CPR gives traders a sense of volatility:
- A **narrow CPR** often signals that a **breakout** is imminent.
- A **wider CPR** suggests that the market could remain range-bound.
### **Market Sentiment Based on Floor Pivots**
The relationship between **today’s** and **tomorrow’s pivots** is crucial in determining the market sentiment for the next day.
1. **Bullish Case (Higher Highs):**
- If **tomorrow's pivot** is higher than **today's pivot**, it indicates a **bullish sentiment**. This suggests that the market is likely to trend upward in the next session.
- In a **bullish overlapping pivot range**, if **Day 1 (today)** is higher than **Day 2 (tomorrow)**, traders expect continued upward momentum.
2. **Bearish Case (Lower Lows):**
- Conversely, if **tomorrow's pivot** is lower than **today's pivot**, it suggests a **bearish sentiment** and that the market could trend downward in the next session.
- In a **bearish overlapping pivot range**, if **Day 1 (today)** is lower than **Day 2 (tomorrow)**, traders expect continued downward pressure.
### **Breakout Scenarios**
A breakout occurs when the price **violates either the support or resistance levels** significantly, indicating that the price is moving in the direction of the breakout.
1. **Bullish Breakout:**
- If the price consistently stays **above the CPR** and **resistance levels (R1, R2)**, it indicates a strong **bullish breakout**.
- This is especially true when the **CPR is narrow** for both days, signaling a buildup in price action and a potential breakout to the upside.
2. **Bearish Breakout:**
- If the price breaks **below the CPR** and **support levels (S1, S2)**, it indicates a **bearish breakout**.
- A narrow CPR on **both days** suggests that a breakout to the downside could be imminent.
3. **Neutral or Ranging Days:**
- Sometimes, the CPR stays **unchanged** for 4-5 days, indicating a period of **consolidation** where the price is moving within a tight range. This often leads to a significant breakout once the consolidation ends.
Strategic Application of Floor Pivots for Tomorrow
Traders use floor pivots to plan their next-day trades by:
- **Aligning with Market Sentiment:** Based on whether tomorrow’s pivot is higher or lower than today’s, traders can align their trades in the direction of the market’s overall bias.
- **Identifying Entry and Exit Points:** Resistance and support levels provide well-defined areas to enter or exit trades, making pivots essential for day trading strategies.
- **Anticipating Breakouts:** Monitoring the width of the CPR and the relation between pivots helps traders anticipate potential breakouts, allowing them to react quickly to sudden price movements.
By effectively using these pivots and understanding their significance, traders can improve their decision-making for short-term trades in the stock or futures markets.
CPR - Central Pivot Range (by Alex L.)CPR or Central Pivot Range is a tool for identifying a trend, its volatility and its future targets for the price levels (in up or down directions).
What this indicator offers:
- Main purpose of this indicator is to display levels of support/resistance in a given trend as potentially good levels of entering into position or existing from a position. Entry levels are RED, resistance levels are in GREEN.
- You have the ability to view daily, weekly, monthly pivot levels, depending on what kind of trader you are.
- Unique to this indicator - you have the ability to view YEARLY pivot levels.
- Unique to this indicator - you have the "Pivots History" option to either show all history or just the recent piriod to make your chart clean of "noise".
- Unique to this indicator - you can view "future" pivot levels based on current price.
- You have the ability to view "future pivots" which can be useful as entry or exit levels for the current trend.
- You have the ability to view one, two, three or four pivor levels concurrently depending on how much information you want on your chart.
- You have the option to use "Compact View" to further reduce "noise" and make your chart event more clean.
- Open source.
Some guidelines:
- When current Central Pivot Range is higher than previous Central Pivot Range then the stock is in an uptrend and vice versa.
- Wide Central Pivot Range usually means the stock is in a "sideways trend" and volatility is low.
- Tight Central Pivot Range usually means the stock has a very low volatility and is about to explode (up or down). Switching to a higher timeframe can often give hints to what direction the stock is likely to go.
Default settings:
- Pivot Levels : "Two Pivot Levels"
- Filter/Hide Pivots: "Hide Pivot+BC+TC"
- Pivots History: "Few Months Back"
'V' Show Monthly Pivots
'V' Show Future Pivots
Calculations of pivot levels formula is according to book "Secrets of a Pivot Boss" by Franklin O. Ochoa.
Quote from the book: "The way to make money is to make it. The way to make big money is to be right at exactly the right time."
Open source.
Enjoy!
Future Pivots CPR - All Timeframes
Simple idea that allows you to display tomorrow CPR/ Standard Floor Trader Pivots based on the high, low and close of today session. Likewise, it works for higher timeframes taking into account the high, low, close of the period (e.g. weekly, monthly, year).
Just be aware that -regardless of the timeframe- if the period is still in development, the indicator will constantly/ live update the values until the period is closed!! This indicator is meant to be used when preparing for the next trading period. If you want to use it live, I'd suggest using the function of this indicator which allows to display only current/closed pivots-
Similar to other script I published, this indicator lower timeframes (Daily and Weekly) will work with lower timeframe bars, this is the Minutes and Hour bars. Conversely, higher timeframe CPR/Pivots will work better with timeframes/charts from Daily and above.
Available tick/untick functions:
- Select timeframe
- Show current CPR & Support/Resistance
- Show tomorrow CPR & Support/Resistance
- Display historical CPR (CPR only)
- Show extended support and resistance lines (S2,S3,R2,R3) for current and future pivots.
CPR PRICE ACTION TODAY AND TOMMOROWThis script is based on the Secret of Pivot Boss book by Frank Ochoa. Suitable for Intraday Trading.
You can view the Daily timeframe CPR / support/resistance.
You can view the Weekly timeframe CPR / support/resistance.
You can view the Monthly timeframe CPR / support/resistance.
You can also view Previous Day High/Low.
You can also view Previous Week High/Low.
You can also view Previous Month High/Low.
You can also turn it on/off as per your wish.
All-in-one CPR indicator Introduction and Acknowledgement:
The script is basically a mashup script and provides a combined functionality of various indicators. I'll explain the usefulness and the optimal usage of the script after giving the credits where it is due. A CPR indicator for visually identifying the trend along with the strength of the trend is NOT available in the public library of TradingView. Hence, the need of this indicator.
The credit of creating the original indicators remain unknown to me but I would like to acknowledge the authors whose formulae and codes I have used for creating this mashup indicator.
- Frank Ochoa
- Guruprasad Meduri
- Rafael Zioni
- Stoked Stocks
- Pine team for default indicators
The prime focus of the script is identifying and simplifying the 2 main aspects of a trend:
1. Direction / Underlying trend
2. Strength of the trend
Flaws in traditional CPR:
Some may see this as a flaw, some may not. So take my opinion with a grain of salt. In general, the traditional CPR indicator is used to plot just support and resistance levels, and the trend identification is purely discretionary. In addition to this, there is no way to assess the strength of the move without using a dedicated volumed based indicator. This causes amateur traders to take counter trades to the market direction.
What is the need of this hybrid indicator?
A CPR indicator that also aids in visually identifying the trend and the strength of the trend with respect to the price action in NOT available in the public library of TradingView. The traditional CPR can be used to assess the rough direction of the market but if it combined with the Hull ribbon, the probability of identifying the trend increases manifold. Hence, I decided to create this mashup indicator.
In addition to the basic CPR pivots, the script provides the functionality of the following indicators:
1. HMA based trend ribbons with auto buy/sell signals
2. Volatility based bands - Bollinger bands, Keltner channel, Donchian channel, envelope.
3. Coloured volume candles to determine the strength of the trend
4. CPR with daily, weekly, and monthly levels
5. Previous day high/low
6. Tomorrow CPR
7. 3 Simple moving averages
8. Volume Weighted Average Price (VWAP)
Correct usage of the indicator:
The optimal usage of the indicators consists of mainly 2 parts:
1. Identification of the trend using the combination of CPR and Hull ribbon
2. Determining the strength of the trend
How to identify the trend?
In general, when the price is above CPR it is considered a bullish trend. Also, when the price is above the Hull ribbon, it is considered bullish. Reverse is true for a bearish trend. Combining the traditional CPR logic with the Hull trend ribbon, we can conclude that:
1. Bullish trend = Price above CPR and above the Hull ribbon
2. Bearish trend = Price below CPR and below the Hull ribbon
If the Hull ribbon is showing a zig-zag move, the trend will be sideways. Also, the time frame of the Hull ribbon can be defined as per the need of the user.
Exhibit: Identification of a bullish trend
Exhibit: Identification of a bullish trend with a contra move (pullback)
Exhibit: Identification of a bearish trend
Exhibit: Identification of a bearish trend with a contra move (pullback)
How to determine the strength of the trend?
1. Strong trend = The dark coloured candles represent volume more than 150% of the look back period. For instance
2. Moderate trend = The bright coloured candles represent volume between 50-150%.
3. Neutral trend = The Grey coloured candles represent a weak trend where the volume is less than 50%.
Exhibit: Identification of a strong bearish trend along with the trend direction
Exhibit: Identification of a strong bullish trend using only coloured candles
All the other indicators including the SMA, VWAP, Bollinger bands, Keltner channels, etc. can be used as per the taste of the trader.
Thanks for reading! I hope you find this indicator useful.
Happy learning. Cheers!
Rajat Kumar Singh (@johntradingwick)
Community Manager (India), TradingView
[MF] CURRENT AND NEXT CPR LEVELSThis is CPR with Monthly, Weekly and Daily time frames of the current and next* CPR levels.
* The following lines only become relevant at the end of the cycle.
CPR LEVELS:
P (pivot point) = (H + L + C) / 3
BC (Bottom Central) = (H + L) / 2
TC (Top Central) = (P - BC) + P
Resistance Levels
- Green = R1 Levels ( 2×P - L )
- Green = R2 Levels ( P + (H - L) )
- Green = R3 Levels ( H + 2 * (P - L) )
Support Levels
- Red = S1 Levels ( 2×P - H )
- Red = S2 Levels ( P - (H - L) )
- Red = S3 Levels ( L - 2 * (H- P) )
Description and Refrences:
en.wikipedia.org(technical_analysis)
Rules For BUY Setup with CPR
1) Today's Pivot Level Should be higher than Previous Day's Pivot Level
2) The previous day's close should be near day high.
Rules For SELL Setup with CPR
1) Today's Pivot Level Should be lower than Previous Day's Pivot Level
2) The previous day's close should be near day low.
CPR or central pivot range is the best tool available for the trader to see the price base indicator. You can use this tool i.e CPR (central pivot range) to check the price indicator in the stock market. You know the price of shares sometimes goes up or sometimes goes down in the stock market. So it will be best to stay updated and know it before the time the share market/stock market fall or rises.
CPR by WsrWe recommend some preconditions for Intraday Trading Strategy with CPR (Central Pivot Range)
Rules For BUY Setup with CPR
1) Today's Pivot Level Should be higher than Previous Day's Pivot Level
2) The previous day's close should be near day's high.
Rules For SELL Setup with CPR
1) Today's Pivot Level Should be lower than Previous Day's Pivot Level
2) The previous day's close should be near day low.
CPR or central pivot range is the best tool available for the trader to see the price base indicator. You can use this tool i.e CPR (central pivot range) to check the price indicator in the stock market. You know the price of shares sometimes goes up or sometimes goes down in the stock market. So it will be best to stay updated and know it before the time the share market/stock market fall or rises.
Developing Pivot Range [Swastik]This is the developing cpr indicator made by Swastik.
It shows how the cpr is developing as the day is progressing.
The colour of the range is red when tc is below bc and green when tc is above bc .
While calculating the value of cpr , the high is the high from starting of the session and low is the low from starting of the session till that specific candle.
This also shows that the trend is developing.
If the colour is red and the range starts widening, it means downtrend has started to develop and
when the colour is green and range starts widening, it means uptrend is developing.
CPR, Camarilla & Moving AverageThis script is created primarily for Intraday trading but can also be used for short and long term trading. This is a combination of Central Pivot Range (CPR), Moving Averages and Camarilla Pivot levels (with inner levels). This helps you to combine the strategies of CPR and Moving Averages to identify the best trading opportunities with greater edge. Central Pivot Range and Camarilla pivots are taken from PivotBoss by Franc Ochoa.
Key features:
# Daily CPR levels
# Weekly CPR levels
# Monthly CPR levels
# Previous Day High and Lows
# Previous Week Highs and Lows
# Previous Month Highs and Lows
# Camarilla Pivots with inner Levels
# CPR Levels for the next Day, Week and Month
# 5 Simple moving averages and 5 Exponential Moving Averages
What separates this script from other scripts with CPR and Moving averages?
# One of the few indicators (if not the only one) which combines the 2 types of Moving Averages, CPR and also Camarilla Pivots.
# CPR Levels for not just the next Day, but for next Week(Weekly CPR) and Month(Monthly CPR) also.
# Hide the previous day's levels according to your wish. This is the most unique feature of this indicator. You can set the number of Daily CPR levels you want to load in the chart. This is not just for the Daily CPR but also for the Weekly and Monthly CPR also. This makes the chart less cluttered and prevents the candles from getting buried in the indicators. Please notice how the previous day's CPR levels are hidden in the displayed demo chart on the script page. In the chart, only one trading day's data is shown(by default).
# This script is OPEN SOURCE.
Strategies :
For CPR & Camarilla Strategies for intraday trading and swing trading refer to the book 'Secrets of a Pivot Boss: Revealing Proven Methods for Profiting in the Market' by Franklin O. Ochoa.
Moving averages strategies :
Moving averages can be combined and also used individually for several strategies
* 9 EMA can be used as trailing stop loss for strong moving trends that helps you to catch big moves.
* 20sma can be used not just trailing stop loss but also for taking re-entry to the trend.
* Golden cross - The golden cross occurs when a short-term moving average crosses over a major long-term moving average to the upside. This indicates a bullish turn in the market. Eg: 50 SMA cuts 200 SMA from below.
* Death Cross - The death cross occurs when the short term moving average crosses the long-term average from above. This indicates a bearish turn in the market. Eg: 50 SMA cuts 200 SMA from above.
* When 20 SMA is above 50 SMA and 20 SMA and 50 SMA are angling up like parallel lines, then it denotes bullish strength. If this happens right after Golden Cross, big moves to the upside can be expected.
* When 20 SMA is below 50 SMA and 20 SMA and 50 SMA are angling down like parallel lines, then it denotes bearish strength. If this happens right after Death Cross, big moves to the downside can be expected.
* When 20SMA and 50 SMA are going flat and crossing each other, then it denotes sideways sentiment.
Moving average strategies are taken from the book 'How to Make Money in Intraday Trading' by Ashwani Gujral. For learning more about how to combine CPR and Moving averages in your trading please refer to this book.