How it is calculated
Buying pressure is the close minus the lower of the low and the previous close; the true range is the bar's range widened by any gap to the previous close. Both are summed over each of the three lengths, sorted from short to long, and the ratios weighted 4, 2 and 1. UO is 100 times the weighted sum divided by 7; a length whose range sum is zero adds nothing while the divisor stays 7. The first bar is not used. As TA-Lib ULTOSC, after Williams 1985.
Reference: TA-Lib ULTOSC (Williams 1985)
How to read it
Above 70 buying pressure dominated across the three lengths, below 30 selling pressure. Williams' own signal was a bullish divergence with the oscillator below 30, then the oscillator rising above the high it made between the two lows; a plain cross of 30 or 70 says less. With three lengths in one it is steadier than a single length oscillator but reaches the extremes less often.
In a strategy
A filter that allows longs only while buying pressure leads: ctx.ind("uo", fast=7, mid=14, slow=28) > 50, or an exit from a long once it rises above 70 and turns down.
Inputs
| Input | Type | Default | Range or choices |
|---|---|---|---|
Short lengthfast | Whole number | 7 | min 1, max 5000 |
Medium lengthmid | Whole number | 14 | min 1, max 5000 |
Long lengthslow | Whole number | 28 | min 1, max 5000 |
What it draws
| Line | Drawn as |
|---|---|
| UO | Line |
Moves between 0 and 100. Guide lines at 30, 70.
Used in
No strategy template reads it yet.