OPEN-SOURCE SCRIPT
Updated Price breakout and reversal [TCS] | PA

This indicator is designed to identify potential breaks and reversals in price movements for a financial instrument.
The indicator displays several elements to assist users in spotting specific market conditions:
1. High and Low Pivots: The indicator marks the highest and lowest points on the price chart within a customizable lookback period. These pivots represent important turning points in the price movement and serve as reference levels for potential breakouts and reversals.
2. Fair Value Line: A horizontal line is drawn at the midpoint between the high and low pivots. This line represents the "fair value" based on the recent price action. Traders may consider this level as a reference for evaluating the price's deviation from its average value.
3. Bullish Breakouts: When the closing price of the financial instrument crosses above the high pivot the indicator identifies a potential bullish breakout. This suggests a possible buying opportunity.
4. Bearish Breakouts: Conversely, a bearish breakout is identified when the closing price crosses below the low pivot. This may indicate a selling opportunity.
5. Fair Value Breakouts: In addition to regular breakouts, the indicator can detect breakouts based on the fair value line. If the closing price crosses above or below the fair value line, it may signal a fair value breakout, indicating the price's potential return to its average level.
6. Reversals: Reversal patterns are essential in technical analysis. The indicator identifies potential bullish and bearish reversals .

The indicator enhances its visual signals with geometric shapes (triangles and diamonds) placed above or below the price bars to represent different types of breakouts and reversals.
Moreover, the indicator can be configured to send alerts to the user when any of these specific events occur, helping traders stay informed and respond promptly to potential trading opportunities.
Please note that this code is for educational purposes only and should not be used for trading without further testing and analysis.
The indicator displays several elements to assist users in spotting specific market conditions:
1. High and Low Pivots: The indicator marks the highest and lowest points on the price chart within a customizable lookback period. These pivots represent important turning points in the price movement and serve as reference levels for potential breakouts and reversals.
2. Fair Value Line: A horizontal line is drawn at the midpoint between the high and low pivots. This line represents the "fair value" based on the recent price action. Traders may consider this level as a reference for evaluating the price's deviation from its average value.
3. Bullish Breakouts: When the closing price of the financial instrument crosses above the high pivot the indicator identifies a potential bullish breakout. This suggests a possible buying opportunity.
4. Bearish Breakouts: Conversely, a bearish breakout is identified when the closing price crosses below the low pivot. This may indicate a selling opportunity.
5. Fair Value Breakouts: In addition to regular breakouts, the indicator can detect breakouts based on the fair value line. If the closing price crosses above or below the fair value line, it may signal a fair value breakout, indicating the price's potential return to its average level.
6. Reversals: Reversal patterns are essential in technical analysis. The indicator identifies potential bullish and bearish reversals .
The indicator enhances its visual signals with geometric shapes (triangles and diamonds) placed above or below the price bars to represent different types of breakouts and reversals.
Moreover, the indicator can be configured to send alerts to the user when any of these specific events occur, helping traders stay informed and respond promptly to potential trading opportunities.
Please note that this code is for educational purposes only and should not be used for trading without further testing and analysis.
Release Notes
Improved reversals calculationRelease Notes
• Added the account size risk calculator (%)Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
For the access to premium indicators please contact me on tradingview
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
For the access to premium indicators please contact me on tradingview
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.