Bull Bear Divergence Indicator
Dec 20, 2018

The Bull Bear Divergence Indicator tool identifies potential trend reversals by detecting discrepancies between price action and momentum oscillators using Constance Brown-inspired methodology.
Usage
The indicator can be used to spot early signs of momentum shifts that often precede price reversals. By default, it tracks the Relative Strength Index (RSI) to find divergences:
- Bullish Divergence: Occurs when the indicator makes a higher low while the price makes a lower low. This suggests that despite the price drop, downward momentum is weakening.
- Bearish Divergence: Occurs when the indicator makes a lower high while the price makes a higher high. This suggests that the upward trend is losing strength.
Users can identify these signals by looking at the highlighted pivot points on the oscillator. A thick green line indicates a bullish divergence, while a thick red line indicates a bearish divergence.
Details
This script implements a specific logic focused on "recent" pivots. Unlike some divergence indicators that look back across multiple swing points, this tool specifically compares the current pivot to the one immediately preceding it. This focus on immediate momentum shifts helps in identifying short-to-medium-term turning points.
While the default implementation uses a 14-period RSI, the logic is applicable to various oscillators. The construction relies on ta.pivothigh and ta.pivotlow functions to isolate key structural points in the momentum data. It is noted that while normalized oscillators like RSI work well, un-normalized indicators can often provide even clearer divergence signals.
Settings
- Indicator Source: The primary oscillator used for calculation (default is RSI 14).
- Pivot Lookback: Determines the sensitivity of pivot detection (handled via the script's calculation logic).
- Visuals: Users can toggle or adjust the visibility of the high/low indicator lines and the divergence highlights.
FAQ
How do I access the Bull Bear Divergence Indicator?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Can I change the oscillator used for the divergence?
Yes, the script is designed to be adaptable. You can modify the source indicator in the Pine Script code to use other oscillators like MACD, Stochastic, or custom momentum lines.
What do the thick colored lines represent?
The thick green lines represent a confirmed Bullish Divergence at a recent pivot low, while the thick red lines represent a confirmed Bearish Divergence at a recent pivot high.
Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.
Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.
Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.
As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.
Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.
Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.
This does not represent our full Disclaimer. Please read our full disclaimer.
© 2026 LuxAlgo Global, LLC.

