OPEN-SOURCE SCRIPT

SMT Divergences Dual Lookback - MoonTrades

43
This Pine Script, titled "SMT Divergences Dual Lookback", is designed to detect and visualize divergences between two comparison symbols (symbols A and B) using two different lookback periods. The script specifically identifies bullish and bearish divergences based on pivot highs and lows and marks them on the chart with color-coded labels.

Bullish Divergence (Swing High) is marked when a price swing low diverges from a pivot low, indicating potential upward momentum.

Bearish Divergence (Swing Low) is marked when a price swing high diverges from a pivot high, indicating potential downward momentum.

The script works with two customizable comparison symbols and can also apply a specific timeframe for divergence detection (separate from the chart’s default timeframe). The results are displayed with labels showing the corresponding symbols, helping traders identify potential reversal points or continuation trends.

Users can customize the lookback periods and the colors for the divergence markers. This tool aids in technical analysis for traders who focus on multi-timeframe and multi-symbol divergence strategies.

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.