Ultimate Oscillator + Realtime Divergences
Sep 12, 2022

The Ultimate Oscillator + Realtime Divergences indicator provides a feature-rich implementation of the classic momentum tool designed to measure buying and selling pressure across three different timeframes. By combining multiple lookback periods, this tool aims to filter out the false divergence signals common in single-timeframe oscillators, offering a more stable representation of market momentum and potential trend reversals.
Usage
The indicator can be used to identify trend momentum shifts, overbought/oversold conditions, and potential price reversals through divergences.
- Divergence Detection: The script automatically identifies and draws Regular and Hidden divergences. Regular divergences typically suggest trend reversals, while Hidden divergences suggest trend continuation.
- Timeframe Analysis: Users can set an alternate timeframe to view UO data from a higher or lower timeframe directly on their current chart.
- Alerting: Integrated alerts notify users of centerline crossovers and confirmed divergence patterns.
- Visual Confluence: Optional background coloring can highlight when the oscillator is above or below the 50 centerline, providing an immediate visual cue for the prevailing trend.
Details
The Ultimate Oscillator (UO) was developed by Larry Williams to account for the limitations of other momentum oscillators. It uses weighted averages of three different periods (standard: 7, 14, and 28) to smooth out fluctuations. This implementation enhances the core calculation with a real-time divergence engine that scans for pivot highs and lows.
A unique "Heikin Ashi" mode is included, which utilizes the Heikin Ashi formula for Open and Close values to produce a smoother oscillator line, specifically useful for traders who prefer trend-following strategies on volatile assets.
Settings
Divergence Settings
- Show Divergence Lines: Toggles the visibility of divergence lines on the oscillator.
- Show Only Last Divergence: When enabled, only the most recent divergence remains visible.
- Don't Wait for Confirmation: Allows for faster, real-time divergence detection before the pivot point is fully confirmed.
- Divergence Type: Filter between Regular, Hidden, or both types of divergences.
UO Settings
- Fast/Middle/Slow Length: Adjusts the three lookback periods used in the UO calculation.
- Flip Oscillator: Inverts the oscillator values (useful for use with TradingView's "Flip Chart" feature).
Pivot Point Settings
- Pivot Period: Determines the sensitivity of the pivot highs and lows used for divergence.
- Maximum Pivot Periods to Check: Sets how many previous pivots are evaluated for potential divergences.
- Maximum Bars to Check: The maximum historical lookback for divergence scanning.
FAQ
How do I access Ultimate Oscillator + Realtime Divergences?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
What is the difference between Regular and Hidden divergences?
Regular divergences indicate a potential trend reversal (e.g., price makes a lower low while the oscillator makes a higher low), whereas Hidden divergences indicate potential trend continuation.
Can I use this on any timeframe?
Yes, the indicator is compatible with all timeframes, and you can even utilize the "Alternate Timeframe" setting to overlay data from a different periodicity onto your current chart.
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.

