A momentum oscillator that combines three different lookback periods (typically 7, 14, 28) into a single weighted value bounded between 0 and 100. Designed by Larry Williams to reduce false signals by requiring momentum to align across multiple horizons.
Ultimate Oscillator on MES 5m — overbought vs oversold behavior
What it measures
- Multi-timeframe momentum confluence. Combines short (7), medium (14), and long (28) lookback readings into one value.
- Buying pressure relative to range. Each lookback measures cumulative buying pressure (close minus true low) divided by true range.
- Filtered momentum. The weighted combination reduces single-period false signals that bare oscillators (RSI, Stochastic) produce.
Formula
How AlgoLift computes it
For each bar:
BP = Close − min(Low, PreviousClose) (Buying Pressure)
TR = max(High, PreviousClose) − min(Low, PreviousClose) (True Range)
Three averages of BP/TR are computed over the short, medium, and long periods. The Ultimate Oscillator is their weighted sum:
UO = 100 × (4×Avg7 + 2×Avg14 + 1×Avg28) / (4 + 2 + 1)
The 4-2-1 weighting gives the shortest lookback the most influence (which makes UO responsive) while still requiring the longer lookbacks to agree (which reduces false signals).
Developed by Larry Williams in 1976.
Inputs in AlgoLift
| Setting | Default | Range | Notes |
|---|---|---|---|
| Short Period | 7 | 1–50 | Fastest lookback, weight 4. |
| Medium Period | 14 | 2–100 | Mid lookback, weight 2. |
| Long Period | 28 | 3–200 | Slowest lookback, weight 1. |
Recommended settings
- (7, 14, 28) — default: Williams's original. Works for most timeframes.
- (5, 10, 20): Faster — for short-timeframe trading.
- (10, 20, 40): Slower — for swing setups.
The three periods are typically kept in roughly 1:2:4 ratio. Diverging from that proportion changes the indicator's character.
Outputs in AlgoLift
| Handle | Type | Plotted | Notes |
|---|---|---|---|
| Oscillator Value | Numeric | Always | The weighted sum (0–100). |
| Slope | Numeric | On select | Rate of change of the value. |
| Buying Pressure | Numeric | On select | The numerator before averaging. A pure single-bar momentum measure. |
| True Range | Numeric | On select | Per-bar true range. Useful as a standalone volatility input. |
Ultimate Oscillator node — default state
How to read it
- UO > 70: Strong upside momentum across all three lookbacks. Often interpreted as overbought.
- UO < 30: Strong downside momentum across all three lookbacks. Often interpreted as oversold.
- UO between 40 and 60: Neutral, conflicting signals across lookbacks.
- Divergence: The headline UO usage — price makes a new extreme but UO doesn't follow. Williams's original strategy was divergence-based.
- UO crossing 50: The midline cross is a simple momentum-direction filter.
Because UO requires multi-period agreement, its extremes happen less often than RSI or Stochastic — but when they happen, they're more reliable than single-period equivalents.
Ultimate Oscillator's value is the multi-period weighting — its extremes are rarer and more meaningful than RSI or Stochastic extremes. The bar to clear is "all three timeframes agree," and that filter eliminates most false signals at the cost of fewer total signals.
Best in / worst in
Best in instruments with cyclical behavior and as a "second opinion" alongside another momentum indicator. The multi-period structure makes it more robust than single-period oscillators in mixed regimes.
Worst in very-short-timeframe scalping (the long period creates lag) and in instruments with persistent one-way drifts where UO stays in the upper or lower half almost continuously.
Three setups
1. Williams's classic divergence setup
The original strategy from Williams's 1976 paper:
- Long: Bullish divergence (price makes a lower low, UO makes a higher low while in oversold territory) AND UO crosses above its high during the divergence period.
- Short: Symmetric.
This is one of the few divergence strategies with documented historical robustness. The "cross the divergence high" requirement filters out failed divergences.
Williams divergence setup with BarsAgo comparison
2. Confluence-based extreme entry
Trade only when UO and another oscillator agree.
- Long: UO < 30 AND RSI < 30 AND price > SMA(200).
- Short: UO > 70 AND RSI > 70 AND price < SMA(200).
The double-oscillator agreement eliminates many false extreme signals.
3. Midline-crossing momentum filter
Use UO's 50-line cross as a slow trend filter for fast strategies.
- Long-only mode: UO > 50 — strategy permitted to take longs.
- Short-only mode: UO < 50.
- Flat: UO between 45 and 55.
A simple regime gate that responds to multi-period momentum changes.
Advanced patterns in AlgoLift
UO + KAMA Efficiency Ratio combo. Use UO for the directional momentum signal and KAMA's ER for the regime classification. When ER > 0.4 (trending), trade UO breakouts above 70 / below 30 as momentum-continuation signals. When ER < 0.3 (ranging), trade UO extremes as mean-reversion signals. One indicator changes meaning by regime — wire via Conditional Flow.
True Range output as standalone volatility input. The True Range output is the same calculation as ATR's pre-smoothing input. Use it directly for tighter stop-loss reactions than smoothed ATR allows.
Multi-timeframe UO stack. Add a 1h data series alongside your 5m execution. Only allow trades when 1h UO agrees with the 5m setup direction. The 1h UO acts as a multi-period regime check on top of the 5m's own multi-period confluence — effectively six lookback periods agreeing before any trade fires. See the multi-series Visual Builder pattern.
Common mistakes
- Treating UO extremes like RSI extremes. UO at 70 is rarer and means more — but the failure mode is the same. In strong trends, UO can stay above 70 for many bars.
- Skipping the divergence check. UO's documented robustness comes specifically from the divergence setup. Plain "buy oversold, sell overbought" doesn't capture the indicator's design strength.
- Optimizing the three periods independently. Three interacting parameters — fast track to overfitting. Keep them in roughly 1:2:4 ratio if you tune at all.