OPEN-SOURCE SCRIPT
Updated Awesome Oscillator with Divergence

Simple Awesome Oscillator with Divergences
This TradingView script combines the classic Awesome Oscillator (AO) with divergence detection. It plots AO as a histogram, highlighting changes in momentum. Divergences are identified based on pivot highs and lows, signaling potential trend reversals:
- Bullish Divergence: Price makes lower lows, AO makes higher lows.
- Bearish Divergence: Price makes higher highs, AO makes lower highs.
Visual signals (arrows) and alerts ensure clear identification, making it ideal for traders focusing on momentum and trend reversals.
This TradingView script combines the classic Awesome Oscillator (AO) with divergence detection. It plots AO as a histogram, highlighting changes in momentum. Divergences are identified based on pivot highs and lows, signaling potential trend reversals:
- Bullish Divergence: Price makes lower lows, AO makes higher lows.
- Bearish Divergence: Price makes higher highs, AO makes lower highs.
Visual signals (arrows) and alerts ensure clear identification, making it ideal for traders focusing on momentum and trend reversals.
Release Notes
Now the indicator has:Customizable inputs for:
- AO periods (Fast/Slow)
- Choice between Ema and SMA for the calculation of the AO
- Lookback for pivot (right/left)
- Minimum range/maximum for divergence
- Activation/deactivation of any type of divergence (regular/hidden, bullish/bearyish)
- Hidden divergences (Hidden Bullish and Hidden Bearish) with label and dedicated colors
- Alert Condition for each type of divergence
How to use new inputs
- You can choose whether to use Ema (faster) or SMA (slower) for the AO.
- You can activate/deactivate the display of any type of divergence.
- You can adjust the lookback and range parameters directly from the input panel of the indicator.
What changes compared to before
The indicator is now much more flexible and powerful, identical as logic to that "for ideas", but with modern syntax and the possibility to choose between SMA/Ema.
You can adapt the sensitivity and type of signals according to your operational preferences.
Release Notes
Update: The indicator has been downgraded to version 5 because with TradingView's display.pane feature the indicator is inaccurate and was missing important divergences.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.
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.
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.
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.