How is Ultimate Oscillator calculated?

Learn Ultimate Oscillator calculation formula inputs and limitations.

Direct answer

Ultimate Oscillator (often abbreviated “UO”) is calculated by combining three smoothed averages of a buying-pressure ratio computed from each bar’s High, Low, and Close. The three averages use different lookback lengths (commonly 7, 14, and 28 periods) and are merged with weights (typically 4, 2, and 1) to produce a final value between 0 and 100.

Mechanism and definition

1) Start with “buying pressure” and “true range”

For each bar i, define:

  • Buying Pressure (BP) = Closeᵢ − Lowᵢ
  • True Range (TR) = max(
    • Highᵢ − Lowᵢ,
    • |Highᵢ − Closeᵢ₋₁|,
    • |Lowᵢ − Closeᵢ₋₁| )

These two components are used to form a buying-pressure ratio:

  • BP/TR

Conceptually, BP measures how strongly the Close sits toward the bar’s top (relative to the Low), while TR measures how large the bar’s range is, including gaps relative to the prior Close. The ratio BP/TR expresses buying pressure relative to movement size.

2) Smooth the ratio over three lookback windows

Choose three lookback lengths:

  • a (often 7)
  • b (often 14)
  • c (often 28)

Compute three smoothed sums (over each window ending at bar i):

  • Average₁ = sum(BP over last a bars) / sum(TR over last a bars)
  • Average₂ = sum(BP over last b bars) / sum(TR over last b bars)
  • Average₃ = sum(BP over last c bars) / sum(TR over last c bars)

This “sum of numerators over sum of denominators” approach makes UO depend on accumulated pressure and accumulated range over each window, rather than on BP/TR for only the latest bar.

3) Combine the three averages with weights and scale to 0–100

Ultimate Oscillator is then computed as a weighted combination:

  • UO = 100 × (4 × Average₁ + 2 × Average₂ + Average₃) / (4 + 2 + 1)

Since (4 + 2 + 1) = 7 in the common weighting scheme, this simplifies to:

  • UO = 100 × (4 × Average₁ + 2 × Average₂ + Average₃) / 7

The result is typically interpreted on a 0–100 scale.

Evidence or a checkable worked example (no live data)

To verify you can reproduce the calculation, use a small hypothetical dataset.

Assumptions:

  • Use standard windows a=2, b=3, c=4 (shortened so the example is compact).
  • Use three weights 4, 2, and 1 (same as the usual approach).

Suppose you have bars 1–4 with High, Low, and Close, and you compute TR using the prior Close (so TR for bar 1 would require an earlier bar 0; to keep it simple, start at bar 2).

For each bar i (starting at i=2):

  1. BPᵢ = Closeᵢ − Lowᵢ
  2. TRᵢ = max(Highᵢ − Lowᵢ, |Highᵢ − Closeᵢ₋₁|, |Lowᵢ − Closeᵢ₋₁|)
  3. Then accumulate over each window:
    • sumBP(a) = BP over last a bars
    • sumTR(a) = TR over last a bars
    • Average₁ = sumBP(a) / sumTR(a)
    • repeat for b and c.
  4. Finally:
    • UO = 100 × (4×Average₁ + 2×Average₂ + Average₃)/7

What you should see when you recompute it carefully:

  • If Close repeatedly lands near lows, BP becomes small, lowering Average₁/₂/₃ and pulling UO down.
  • If bars are wide (large TR) but closes are not near highs, the ratio can still stay moderate, preventing UO from spiking purely because of high range.

Even without exact numbers shown here, the calculation steps are fully deterministic given High/Low/Close (and at least one prior Close for TR).

Limitations and risks (material failure modes)

1) Data alignment matters

UO requires a consistent bar definition. If your High/Low/Close series is on one timeframe but you apply parameters on another, your computed BP and TR won’t correspond to the same “bars,” producing values that differ from expected results.

2) “Enough bars” is required

Because UO uses three windows (a, b, c), you cannot compute a fully formed value until you have at least c bars (plus the extra prior Close needed for TR on the first TR calculation). Early values may be missing or partial in different implementations.

3) Divide-by-zero or near-zero TR

The ratio Average = sum(BP)/sum(TR) assumes sum(TR) is non-zero. In typical market data TR is rarely exactly zero, but with very small or synthetic datasets, sum(TR) can be extremely small. That can make the ratio unstable.

4) Different software may use slightly different conventions

Some platforms use common defaults (a=7, b=14, c=28 and weights 4/2/1), but may implement:

  • different handling of the first bar(s) where Closeᵢ₋₁ is unavailable,
  • different numeric precision,
  • or different period interpretation (especially for non-standard bar spacing). So independent verification should include checking how the first TR values are computed and how early UO values are treated.

5) Interpretation is not the same as a standalone signal

UO is a momentum-style oscillator derived from ratios of price movement components. Like most oscillators, it can be sensitive to regime changes, volatility clustering, and timeframe choice. It should be viewed as a measurement output, not as a guaranteed decision rule.

Verification and next question

To independently verify the calculation:

  1. Pick explicit parameters (your chosen a, b, c and the weights 4,2,1).
  2. For each bar, compute BP = Close − Low.
  3. For each bar, compute TR = max(High−Low, |High−priorClose|, |Low−priorClose|).
  4. Compute three windowed ratios using sum(BP)/sum(TR).
  5. Combine them into UO using UO = 100 × (4×Avg₁ + 2×Avg₂ + Avg₃)/7.

If you want, you can also compare your computed UO with what a charting tool shows, but ensure you match timeframe, bar-close convention, and the exact definition of TR used by that tool.

You may also want to check how UO compares to related momentum oscillators and how changing the settings (a, b, c) changes the smoothing and responsiveness over shorter vs. longer horizons.

Trading foreign exchange and CFDs involves substantial risk. Information on FoxiForex is educational and is not personal financial advice. Sponsored placements are labelled clearly.