The Ultimate Oscillator solves the single-period problem: RSI gives different signals depending on which period you choose. The Ultimate Oscillator runs three RSI-like calculations simultaneously (periods 7, 14, and 28) and combines them with weighted averaging. The result is a 0–100 oscillator that is more stable, generates fewer false signals, and requires multi-timeframe consensus before triggering.
Section 1: Core Mechanics
The Ultimate Oscillator was created by Larry Williams in 1976 and published in Stocks & Commodities magazine in 1985. Williams observed that RSI signals varied dramatically based on period selection and that traders spent too much time optimizing a single parameter. His solution: make the oscillator inherently multi-timeframe by baking three periods into the formula.
Formula
For each bar, calculate intermediate values:
Then for each period (7, 14, 28):
Finally, the weighted combination:
The weights 4, 2, 1 give double emphasis to the shortest period, creating responsiveness while the longer periods prevent false signals.
Why Buying Pressure Uses True High/Low
Standard oscillators use only the current bar's high and low. If a stock gaps down, the standard low misses the gap's impact. By anchoring True High and True Low to the previous close, BP and TR capture gap behavior — a downward gap reduces BP (buyers had to overcome the gap to push price up) and increases TR (the effective range is wider).
Inputs
- High, Low, Close for each bar, plus previous close
- Periods: 7, 14, 28 (Larry Williams' fixed design — these are not meant to be optimized arbitrarily)
Parameters
| Parameter | Default | Range | Impact |
|---|---|---|---|
| Short period | 7 | 5–9 | Higher weight (4x) — most responsive |
| Medium period | 14 | 10–18 | Medium weight (2x) — balance |
| Long period | 28 | 20–35 | Lower weight (1x) — trend stability |
| OB level | 70 | 65–75 | Higher = fewer, stronger signals |
| OS level | 30 | 25–35 | Lower = fewer, stronger signals |
Output
UO outputs 0–100, like RSI. Above 70 = overbought. Below 30 = oversold. The 50 line is the neutral centerline. Unlike RSI, UO rarely spends extended time at extremes because three periods must simultaneously agree that momentum is extreme.
Section 2: Interpretation & Signals
Signal Zones
| UO Level | Interpretation | Action |
|---|---|---|
| Above 70 | All three timeframes show overbought BP relative to TR | Watch for divergence or exit from zone |
| 50–70 | Bullish momentum consensus | Trend continuation bias |
| 50 | Neutral | No momentum edge |
| 30–50 | Bearish momentum consensus | Downtrend bias |
| Below 30 | All three timeframes show oversold BP relative to TR | Watch for divergence signal |
Williams' Divergence Rules
Larry Williams specified exact conditions for valid divergence signals on the Ultimate Oscillator. These rules are more selective than generic RSI divergence — and that selectivity is the edge.
Bullish divergence signal (4 conditions, all required):
- UO falls below 30 (oversold extreme is reached)
- Price makes a lower low — UO makes a higher low (standard bullish divergence)
- UO rises above the highest high it reached between the two price lows
- Enter long when UO breaks above that intermediate high
Bearish divergence signal (4 conditions, all required):
- UO rises above 70 (overbought extreme is reached)
- Price makes a higher high — UO makes a lower high (standard bearish divergence)
- UO falls below the lowest low it reached between the two price highs
- Enter short when UO breaks below that intermediate low
Ultimate Oscillator — Bullish Divergence Setup
The key difference from RSI divergence: Williams requires UO to actually reach the extreme zone (below 30 or above 70) before the divergence is valid. Many RSI divergence setups trigger at RSI 40 or 60 — nowhere near an extreme. Williams' approach filters for genuinely exhausted momentum.
Best Market Conditions
The Ultimate Oscillator excels in markets with clear trending bias on at least two of its three timeframes. It is less useful in tightly ranging markets where the three-period consensus creates conflicting readings. In strong momentum moves, UO can remain above 60 or below 40 for extended periods — do not fade this without a complete divergence setup.
Section 3: Pass vs. Live — Real-Time Reliability
UO calculates BP and TR from the previous close and current bar data. Once a bar closes, all values for that bar are fixed. No historical values change. The live bar's UO updates as current high, low, and close evolve. The 28-period sum means intraday swings have a smaller percentage impact on UO than they do on a single-period RSI — more stable on the live bar.
Section 4: Practical Use Cases
Setup: UO(7,14,28) on 1H chart; Williams' divergence rules apply at all timeframes Signal: UO drops below 30 on 1H, price makes lower low, UO higher low — then UO breaks above the intermediate high Entry: 1H bar close after UO breaks the intermediate high level Exit: UO reaches 65 or price hits 1.5x ATR target Key Rule: All four Williams conditions must be met — never enter on partial divergence
Setup: UO(7,14,28) on daily; look for four-step bearish or bullish divergence at swing highs/lows Signal: Full Williams bullish divergence — UO below 30, price lower low, UO higher low, UO breaks intermediate high Entry: Daily close after the UO break bar Stop: Below the second price low (the lower low of the divergence) Target: Prior swing high, minimum 2.5:1 risk-reward (high selectivity demands high reward)
Setup: UO(7,14,28) on weekly; Williams' divergence on weekly for major reversal signals Signal: Full bearish divergence on weekly — UO above 70, two price highs with lower UO highs, UO breaks intermediate low Entry: Week after break bar closes Stop: Above the divergence price high Target: UO returns to 50; reassess then
Real example — Apple (AAPL), early 2023: After AAPL's bear market decline, the daily UO dropped to 26.4 (below 30) on January 5, 2023, at a price of $125.02. A second low on January 19, 2023, printed $132.12 — higher price low — while UO registered 28.1 (still below 30 but higher than 26.4). This met Williams' first three conditions. UO then broke above its intermediate high of 38.5 on January 20. Entry at the close of January 20 captured a move from $135 to over $170 by the end of February.
Section 5: Pseudo Code
INPUT: high[], low[], close[], short=7, medium=14, long_=28, ob=70, os_=30
PROCESS:
Step 1: For each bar i > 0:
true_high[i] = max(high[i], close[i-1])
true_low[i] = min(low[i], close[i-1])
bp[i] = close[i] - true_low[i] # Buying Pressure
tr[i] = true_high[i] - true_low[i] # True Range
Step 2: For each valid bar i >= long_ - 1:
avg7 = sum(bp[i-6:i+1]) / sum(tr[i-6:i+1])
avg14 = sum(bp[i-13:i+1]) / sum(tr[i-13:i+1])
avg28 = sum(bp[i-27:i+1]) / sum(tr[i-27:i+1])
Step 3: Ultimate Oscillator:
uo[i] = 100 * (4 * avg7 + 2 * avg14 + avg28) / 7
OUTPUT: uo[] — values in range 0-100
EDGE CASES:
- tr[i] == 0 for all bars in a period window: avoid division by zero;
if sum(tr) == 0 for a window, set that average to 0.5 (neutral)
- First bar (i=0): no previous close — skip; UO starts from bar index 1
- Fewer than 28 bars of data: return NaN
- NaN in high, low, close: propagate NaN
Section 6: Parameters & Optimization
Williams' Period Relationships
The 7, 14, 28 periods are in a 1:2:4 ratio. Each period is exactly double the previous. This geometric relationship means each timeframe is measuring a fundamentally different cycle length — not overlapping. The weights (4, 2, 1) invert this ratio, giving the most weight to the shortest period while the longer periods anchor the reading.
Parameter Impact
| Change | Effect | When to Apply |
|---|---|---|
| Reduce short period (e.g., 5 instead of 7) | More reactive, higher noise | Intraday scalping (accept more false signals) |
| Increase all periods proportionally | Slower, fewer signals, better for weekly | Position trading on weekly charts |
| Raise OB/OS to 75/25 | Only genuine extremes trigger | Strong trending markets |
| Keep 1:2:4 ratio when adjusting | Maintains the multi-timeframe design intent | Always — break the ratio at your own risk |
Can I use UO with non-standard periods?
You can, but you lose the multi-timeframe design. Williams' 7:14:28 periods represent approximately 1.5 weeks, 3 weeks, and 6 weeks on daily data — short-term, medium-term, and intermediate-term cycles. If you change to 5:10:20, you shift all three to shorter cycles, losing the long-term anchor. If you need a single-period oscillator, use RSI instead. Use UO when you want genuine multi-timeframe consensus.
How does UO compare to RSI for divergence trading?
RSI divergence triggers with lower bar counts and at less extreme levels. UO divergence requires UO to actually reach 30 or 70, making the setup much rarer. RSI generates approximately 3x more divergence signals than UO on daily charts. Of those signals, UO's hit rate is historically higher — fewer trades, but more reliable. If you trade 10 divergence setups per year and win 60%, switching to UO might give you 4 per year at 70-75%. Total PnL depends on your position sizing and reward:risk.
Section 7: Synergies & Conflicts
| Works Well With | Avoid Combining With | |
|---|---|---|
| SMA(200) | Use SMA(200) as trend filter — only take UO bullish divergence when price is above SMA(200) | — |
| Price Action | Williams' divergence entry requires a UO break above/below an intermediate level — combine with a candlestick reversal for added confirmation | — |
| Volume | High volume on the UO break bar (step 4 of Williams' rules) increases signal reliability | — |
| ATR | Size stops using ATR around divergence lows/highs — UO signals at extremes often produce large moves; proper stop sizing is critical | — |
| RSI | — | Both are 0-100 bounded oscillators measuring similar momentum. Use one as the primary divergence tool — UO for selectivity, RSI for frequency. |
| Stochastic | — | Stochastic measures range position; UO measures buying pressure to true range ratio. Interpretations at extremes can conflict and cause analysis paralysis. |
| MACD | — | MACD uses close-to-close momentum; UO uses high-low-close BP/TR. They may diverge from each other at the same time. Cross-referencing adds noise without clear edge. |
Section 8: Common Mistakes
| Mistake | Root Cause | Solution |
|---|---|---|
| Skipping Williams' four-step rule | Treating UO like regular RSI — acting on overbought/oversold alone | All four conditions are required. No exceptions. Partial setups have much lower win rate. |
| Adjusting periods without maintaining the 1:2:4 ratio | Optimizing parameters to backtest | If you must adjust, maintain the doubling relationship (e.g., 5:10:20 or 10:20:40) |
| Acting on UO before 28 bars of data | Platforms can show incomplete values | Verify you have at least 28 complete bars before trusting any UO reading |
| Ignoring the intermediate high/low break requirement | Missing step 4 of Williams' rules | The entry is not the divergence — it is when UO breaks the intermediate level. Define it in advance. |
| Using UO as a standalone indicator | UO works best within a broader trend framework | Add SMA(200) trend filter and volume confirmation to UO's divergence signals |
Section 9: Cheat Sheet
USE WHEN: UO reaches 30 (oversold) or 70 (overbought), price divergence visible across two swing points, all four Williams conditions met
AVOID WHEN: UO not at extreme (no 30/70 touch), only partial divergence conditions met, first 28 bars of chart
ENTRY SIGNAL (Bullish): UO < 30 → price lower low + UO higher low → UO breaks above intermediate high
ENTRY SIGNAL (Bearish): UO > 70 → price higher high + UO lower high → UO breaks below intermediate low
PARAMETERS: Fixed 7/14/28 with 70/30 levels. Maintain 1:2:4 ratio if adjusting.
CONFLUENCE: SMA(200) trend direction + Volume spike on break bar + Candlestick reversal pattern at divergence low
RISK: Lower signal frequency than RSI — expect 3-6 valid setups per year on daily chart
BEST TIMEFRAME: Daily for swing divergence / 4H for faster cycles / Weekly for major market turning points