This indicator combines the power of MACD divergence analysis with Bollinger Bands to help traders identify potential reversal points in the market.
Key Features:
MACD Calculation & Divergence: The script calculates the standard MACD components (MACD line, Signal line, and Histogram) using configurable fast, slow, and signal lengths. It includes a simplified divergence detection mechanism that flags potential bearish divergence—when the price makes a new swing high but the MACD fails to confirm the move. This divergence can serve as an early warning that the bullish momentum is waning.
Bollinger Bands: A 20-period simple moving average (SMA) is used as the basis, with upper and lower bands drawn at 2 standard deviations. These bands help visualize overbought and oversold conditions. For example, a close at or above the upper band suggests the market may be overextended (overbought), while a close at or below the lower band may indicate oversold conditions.
Visual Alerts: The indicator plots the Bollinger Bands on the chart along with labels marking overbought and oversold conditions. Additionally, it marks potential bearish divergence with a downward triangle, providing a quick visual cue to traders.
Usage Suggestions:
Confluence with Other Signals: Use the divergence signals and Bollinger Band conditions as filters. For example, even if another indicator suggests a long entry, you might avoid it if the price is overbought or if MACD divergence warns of weakening momentum.
Customization: All key parameters, such as the MACD lengths, Bollinger Band period, and multiplier, are fully configurable. This flexibility allows you to adjust the indicator to suit different markets or trading styles.
Disclaimer: This script is provided for educational purposes only. Always perform your own analysis and backtesting before trading with live capital.
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.
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.
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.
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.