All indicators

Awesome Oscillator with Divergence

Nov 19, 2024

Static chart image
SignalsOscillatorsDivergencesMoving Averages

The Awesome Oscillator with Divergence indicator provides a comprehensive momentum analysis tool that combines the standard Awesome Oscillator (AO) histogram with an automated divergence detection system to identify potential trend reversals and continuations.

Usage

The script is used to gauge market momentum and spot discrepancies between price action and momentum. The AO histogram changes color based on the slope of the oscillator, helping traders visualize shifts in short-term vs. long-term momentum.

Divergence signals are automatically plotted on the oscillator:

  • Regular Bullish Divergence: Occurs when price makes a lower low but the AO makes a higher low, suggesting a potential upward reversal.
  • Regular Bearish Divergence: Occurs when price makes a higher high but the AO makes a lower high, suggesting a potential downward reversal.
  • Hidden Divergences: These can be enabled in settings to identify trend continuation patterns.

Details

The Awesome Oscillator is calculated by subtracting a 34-period Simple Moving Average (SMA) of the median price (HL2) from a 5-period SMA of the median price. This script offers an optional EMA-based calculation for increased sensitivity.

Divergence detection is based on pivot highs and lows. The script looks back within a user-defined range to compare current pivot points with previous ones. If the relationship between price pivots and AO pivots meets the divergence criteria, a visual label and connecting line are drawn with an offset to account for pivot confirmation.

Settings

Awesome Oscillator

  • AO Fast EMA/SMA Length: Sets the period for the fast moving average (default is 5).
  • AO Slow EMA/SMA Length: Sets the period for the slow moving average (default is 34).
  • Use EMA instead of SMA for AO: Toggles the calculation method from SMA to EMA for the oscillator components.

Divergence Detection

  • Pivot Lookback Right: The number of bars to the right of a pivot to confirm it.
  • Pivot Lookback Left: The number of bars to the left of a pivot to confirm it.
  • Max of Lookback Range: The maximum distance in bars to look back for a previous pivot point.
  • Min of Lookback Range: The minimum distance in bars to look back for a previous pivot point.

Visibility

  • Plot Bullish / Hidden Bullish: Toggles the display of bullish divergence signals.
  • Plot Bearish / Hidden Bearish: Toggles the display of bearish divergence signals.

FAQ

How do I access the Awesome Oscillator with Divergence?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Can I set alerts for the signals?

Yes, the indicator includes alert conditions for AO color changes (momentum shifts), zero-line crossings, and the detection of regular or hidden divergences.

What does the "Pivot Lookback Right" setting do?

It defines the confirmation period. A value of 5 means a pivot is only confirmed and plotted once 5 bars have closed without creating a more extreme high or low, resulting in a 5-bar lag for the signal labels.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.