The OBV-MACD indicator is a momentum-based technical analysis tool that helps traders identify trend reversals and trend strength. This Pine script is an implementation of the OBV-MACD indicator that uses the On-Balance Volume (OBV) and Moving Average Convergence Divergence (MACD) indicators to provide a momentum data of OBV.

The OBV-MACD indicator uses the OBV to calculate the cumulative volume, which is then smoothed using two moving averages - fast and slow. The difference between these moving averages is plotted as a histogram, with a signal line plotted over it. A buy signal is generated when the histogram crosses above the signal line, indicating a bullish trend, while a sell signal is generated when the histogram crosses below the signal line, indicating a bearish trend.

This Pine script also includes an OBV-MACD-Donchian version that incorporates Donchian channels for the OBV-MACD. The Donchian channel is a technical analysis indicator that helps traders identify the highs and lows of an asset's price over a certain period. The OBV-MACD-Donchian version uses the OBV-MACD indicator along with the Donchian channels to provide signals that the momentum of OBV is making new high/low during that period of time.

Traders can customize the input parameters of the OBV-MACD indicator, such as the timeframe, method of calculation for the moving averages, and the lengths of the moving averages and breakout lengths. The colors of the plot can also be customized to suit the trader's preferences.
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

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.

Want to use this script on a chart?