Dalal Street Blogs provides information for educational purposes only and does not constitute investment advice. Please consult a SEBI-registered investment adviser before making any investment decisions.
CAUTION: Dalal Street Blogs publishes market news and educational content only. We do not promote, recommend or endorse any stock, and nothing here is a solicitation to buy or sell securities. Please consult a SEBI-registered adviser before investing.

Indian Stock Market News, Analysis and Trading Guides

Technical Analysis

Ultimate Oscillator: How Three Timeframes Make One Momentum Signal

Ultimate oscillator momentum idea: close-up of polished golden steel balls on a Newton’s cradle

Photo: “Newtons Cradle” by MattX27, CC BY-SA 2.0, via Flickr

By Dalal Street Blogs Editorial9 min read

Most momentum oscillators have one blind spot. They look at a single window of time, so a stock that rallies hard can make the indicator peak early and then sag while price keeps climbing. Traders read that sag as a bearish divergence, sell, and watch the stock run without them. The ultimate oscillator was Larry Williams’ attempt to fix exactly that, by blending three lookback windows into one line that runs from 0 to 100.

Williams built it in 1976, and it was featured in Stocks & Commodities magazine in 1985, according to both StockCharts ChartSchool’s Ultimate Oscillator guide and TradingView’s help page on the UO. The formula and signal rules below come from those two pages. Every price in the worked examples is made up, so you can follow the arithmetic without worrying about which stock it is.

In this article
  1. What the ultimate oscillator actually measures
  2. The three timeframes and why they’re weighted 4, 2, 1
  3. Worked example: calculating the ultimate oscillator by hand
  4. Reading the signals: Williams’ three-step rules
  5. Tuning the settings for Indian stocks
  6. Where the UO fits next to RSI and stochastics
  7. Mistakes that turn a good indicator into a bad trade
  8. A simple checklist before you act on a UO signal
  9. The takeaway

What the ultimate oscillator actually measures

Strip away the weighting and the UO is asking a simple question: on each day, how much of the day’s full range did the buyers manage to claim by the close? Williams called the first part of that buying pressure and measured it against the true range.

Both pieces use the previous close, not just today’s high and low. That matters a lot on Indian charts, where a stock can gap up 3% at 9:15 on results or a block deal and never look back. If you only used today’s low, you’d miss the gap entirely.

  • Buying pressure (BP) = Close minus the lower of (today’s low, previous close)
  • True range (TR) = The higher of (today’s high, previous close) minus the lower of (today’s low, previous close)

If you’ve read our piece on the average true range indicator, that TR definition will look familiar. Same idea: the range is stretched to include any overnight gap.

A quick gap-day example

Say a hypothetical stock closed at ₹480 yesterday. Today it opens at ₹492 on good news, trades between ₹490 and ₹498, and closes at ₹495.

  • Lower of (today’s low ₹490, previous close ₹480) = ₹480
  • Higher of (today’s high ₹498, previous close ₹480) = ₹498
  • BP = 495 − 480 = ₹15
  • TR = 498 − 480 = ₹18

So buyers held ₹15 of an ₹18 move, about 83% (15 ÷ 18). Now look at what happens if you ignore the gap and use only the day’s own numbers: the range is ₹8 (498 − 490) and close minus low is ₹5, which is about 63% (5 ÷ 8). Same day, very different story. The UO’s version gives the gap its due.

The three timeframes and why they’re weighted 4, 2, 1

Once you have BP and TR for each day, you add them up over three windows. The default settings are 7, 14 and 28 periods. On a daily chart that’s roughly a week and a half, three weeks and six weeks of trading sessions.

  • Average7 = (sum of BP over 7 periods) ÷ (sum of TR over 7 periods)
  • Average14 = (sum of BP over 14 periods) ÷ (sum of TR over 14 periods)
  • Average28 = (sum of BP over 28 periods) ÷ (sum of TR over 28 periods)

Then comes the blend:

UO = 100 × [(4 × Average7) + (2 × Average14) + Average28] ÷ (4 + 2 + 1)

Notice the pattern. Each window is double the one before it, and the shortest window gets the biggest weight. StockCharts makes the point that the longest window is not ignored, even though it carries the least weight, and that’s what should cut down on false divergences. The short window keeps the line responsive. The long window acts like an anchor.

The short window keeps the line responsive. The 28-period window is the anchor that stops one hot week from rewriting the whole story.

Worked example: calculating the ultimate oscillator by hand

Here’s a hypothetical stock, call it XYZ Industries, trading around ₹500 to ₹520. We generated 29 sessions of made-up prices (you need one extra day at the start for the first previous close) and worked out BP and TR for the last 28. The table shows the final seven sessions, which feed the 7-period average.

Session Prev close (₹) High (₹) Low (₹) Close (₹) BP (₹) TR (₹)
22 517.0 522.0 513.0 515.0 2.0 9.0
23 515.0 519.0 512.0 515.0 3.0 7.0
24 515.0 523.0 512.0 517.0 5.0 11.0
25 517.0 521.0 508.0 518.5 10.5 13.0
26 518.5 522.5 507.5 522.5 15.0 15.0
27 522.5 528.5 519.5 520.0 0.5 9.0
28 520.0 523.0 516.0 516.0 0.0 7.0
7-day total 36.0 71.0

A couple of rows are worth a second look. Session 26 closed right at its high, so BP equals TR and buyers took the whole range. Session 28 closed on its low, below the previous close, so BP is zero. That’s a day the sellers owned outright.

From the same made-up series, the 14-session totals come to BP ₹82 and TR ₹135, and the 28-session totals come to BP ₹150.5 and TR ₹272. Now the averages:

  • Average7 = 36 ÷ 71 = 0.5070
  • Average14 = 82 ÷ 135 = 0.6074
  • Average28 = 150.5 ÷ 272 = 0.5533

Plug them in:

  • 4 × 0.5070 = 2.0282
  • 2 × 0.6074 = 1.2148
  • 1 × 0.5533 = 0.5533
  • Total = 3.7963, divided by 7 = 0.5423
  • UO = 54.2

A reading of 54 sits just above the midline. What’s interesting is the shape underneath it. The 14-day average is the strongest of the three, because sessions 15 to 20 had a steady run of closes near the highs. The last week is weaker, with three closes at or near the session low. The UO is quietly telling us that momentum is cooling, even though price is still close to its recent peak. That’s not a sell signal on its own. It’s a reason to pay attention.

How much the weighting matters

Try a second, purely illustrative set of numbers. Suppose Average7 is 0.80 after a sharp week, Average14 is 0.60 and Average28 is 0.40.

  • Weighted UO = 100 × (3.2 + 1.2 + 0.4) ÷ 7 = 68.6
  • A plain, unweighted average of the three would be 100 × (0.80 + 0.60 + 0.40) ÷ 3 = 60.0

The weighting pulls the reading towards the recent week, but the weak 28-day number still drags it below 70. One strong week isn’t enough to tip the line into overbought on its own. That’s the design working as intended.

Reading the signals: Williams’ three-step rules

The UO is not meant to be traded off simple crossings of 70 and 30. Williams’ signals are built around divergences, and both StockCharts and TradingView lay them out as three conditions that all have to be met.

Bullish divergence (buy setup)

  1. Price makes a lower low while the UO makes a higher low.
  2. The low of that divergence on the UO is below 30, so the stock was genuinely oversold.
  3. The UO then rises above the high it made between the two lows. That breakout is the trigger.

Bearish divergence (sell setup)

  1. Price makes a higher high while the UO makes a lower high.
  2. The high of that divergence on the UO is above 70.
  3. The UO then falls below the low it made between the two highs.

Step three is where most people cut corners. A divergence that’s still forming isn’t a signal. StockCharts shows a Starbucks example where an early bearish divergence never got confirmed because the indicator didn’t break its divergence low, and the stock kept going up. Only a later, bigger divergence that did break down came before the sharp fall. Patience on the trigger is the whole edge here.

A divergence that hasn’t broken its trigger level is a forecast, not a signal. The UO’s rules are strict for a reason.

The 50 line as a bias filter

StockCharts also suggests a looser read: treat 50 as the bull-bear line. Above 50, the bias leans bullish; below it, bearish. They note this tends to work better with longer settings and longer trends, and give 20, 40, 80 as an example. In one of their chart examples, where the strict divergence confirmation arrived late, they point out that the move above 50 could have served as the trigger instead. Think of the centreline as a rougher, earlier confirmation.

Tuning the settings for Indian stocks

The defaults won’t suit every chart. StockCharts gives a clear example: a quiet stock stayed between 30 and 70 for six months on 7, 14, 28, never giving an overbought or oversold reading. Switching to 4, 8, 16 made the line more sensitive and produced several readings at the extremes. For very volatile stocks, they suggest going the other way and lengthening the windows to cut the number of signals.

We’d think about it like this on NSE charts:

  • Slow-moving large caps. If the line hugs the middle for months on the default setting, the divergence rules can’t fire because the 30 and 70 conditions never get met. Shorter windows, such as 4, 8, 16, are worth testing.
  • High-beta small caps and momentum names. These can hit extremes every couple of weeks on the default. Longer windows filter some of that noise.
  • Positional trades over weeks. A longer setting such as 20, 40, 80, read against the 50 line, gives a calmer trend bias.

Whatever you pick, keep the doubling pattern and test it on that stock’s own history before trusting it. Changing settings until the indicator agrees with what you already wanted to do is a very common way to fool yourself.

The UO also isn’t limited to daily charts. StockCharts notes it can be used on intraday, daily, weekly or monthly data. On TradingView, the three lengths sit in the indicator’s settings with 7, 14 and 28 as defaults, so changing them takes a few seconds.

Where the UO fits next to RSI and stochastics

If you already use the RSI indicator or the stochastic oscillator, the UO will feel familiar. It lives on the same 0 to 100 scale and has overbought and oversold zones too, though the UO’s are 70 and 30 in Williams’ rules. The difference is in what goes into it.

  • RSI compares average up-closes with average down-closes over a single window.
  • Stochastics compare the close with the high-low range over a single window.
  • The UO compares closes with a gap-adjusted range over three windows at once, weighted towards the most recent.

That multi-window design is its selling point and its cost. You get fewer false divergences in theory, but signals come less often, and the strict three-step rules mean you’ll sit out plenty of moves. For traders who’d rather have fewer, better-qualified setups, that’s a fair trade.

Mistakes that turn a good indicator into a bad trade

  • Selling every reading above 70. In a strong uptrend the UO can stay high for a long time. Above 70 is one condition of a sell setup, not the setup itself.
  • Skipping the trigger. Spotting a divergence and acting before the UO breaks its divergence high or low is how you end up early and wrong.
  • Ignoring price structure. In StockCharts’ examples, the stronger signals came alongside a trend line break or a move through resistance on the price chart itself. Look for that agreement.
  • Using it alone. Both sources say the same thing: the UO shouldn’t be a standalone system. Pair it with support and resistance, volume and a defined stop loss.
  • Forgetting gaps on results days. A big gap can swing BP and TR sharply for one session, and with a weight of 4 on the 7-day average, one gap day can move the line noticeably. Check whether a sudden jump is a trend change or one event.

A simple checklist before you act on a UO signal

  1. Which settings are on the chart, and has this stock actually reached 30 or 70 on them in the past?
  2. Is there a clear divergence between price and the UO, with the extreme in the right zone?
  3. Has the UO broken the trigger level, not just turned?
  4. Does the price chart agree, with a trend line, support or resistance level giving way?
  5. Where is your stop, and what’s the position size if it’s hit?

For a broader view of how momentum tools fit together with price patterns and levels, our guide to technical analysis for Indian stocks is a good place to start.

The takeaway

The ultimate oscillator measures how much of each day’s gap-adjusted range buyers held at the close, across 7, 14 and 28 periods, with the shortest window counted four times. It’s built for one job: spotting divergences that are more likely to be real. Respect the three-step rules, adjust the settings to the stock’s temperament, and let the price chart have the final say.

Disclaimer: This article is for information and education only and is not investment advice or a recommendation to buy or sell any security. XYZ Industries and every price, BP, TR and UO value in the examples are hypothetical and used only to show how the indicator is calculated and read. Technical indicators can give false signals and past patterns do not guarantee future results. Please consult a SEBI-registered investment adviser before making trading or investment decisions.

Leave a Reply

Join the conversation

Commenting is open to registered readers. Sign up with just your email — no password needed, and it takes under a minute.

Sign up to comment Log in