Ultimate Oscillator Indicator Trading Strategy

Ultimate Oscillator Indicator Trading Strategy (Backtest And Example)

Many momentum oscillators tend to turn very positive at the beginning of a major advance and quickly enter the overbought territory or even show bearish divergence while the market is still advancing. The ultimate oscillator is a type of momentum oscillator designed to capture momentum across three different timeframes, attempting to correct that. Let’s find out what this oscillator is made of.

The ultimate oscillator (UO) is a momentum indicator designed to measure the price momentum of an asset across multiple timeframes. It uses three different periods (7, 14, and 28) to ascertain the momentum in the short, medium, and long-term market trends and then generates a weighted average of the three. Our backtests indicate that the indicator performs well over practically all settings, and you can make a very profitable mean reversion trading strategy out of it.

What is the ultimate oscillator?

Ultimate Oscillator Indicator

The ultimate oscillator, a technical indicator and a momentum indicator, is designed to measure the price momentum of an asset across multiple timeframes. It uses three different periods (7, 14, and 28) to ascertain the momentum in the short, medium, and long-term market trends and then generates a weighted average of the three.

The shortest timeframe has the most weight in the calculation, while the longest timeframe has the least weight. By using the weighted average of three different timeframes, the indicator is less volatility, which helps it to avoid the pitfalls in other oscillators that rely on a single timeframe — early overbought signals and bearish divergence during a strong price advance.

Many momentum oscillators tend to surge at the beginning of a strong advance, only to quickly become overbought or form a bearish divergence as the advance continues. The reason for this is that they are created for one timeframe. By incorporating longer timeframes into its calculation, the ultimate oscillator attempts to correct this fault. The oscillator is based on the notion that buying or selling “pressure” is determined by where a day’s closing price falls within the day’s true range.

What is the formula for ultimate oscillator?

To calculate the ultimate oscillator, it’s essential to understand the process that involves determining the True Range (TR) and the Average True Range (ATR) before proceeding with the calculation in three steps. The calculation of the ultimate oscillator involves the following steps.

Step 1: Calculating the Buying Pressure (BP)

The buying pressure is the amount by which the current day’s close is above the “true low”, which is the lesser of the current day’s trading low and the previous day’s close. The formula is:

BP = Close — Minimum(Low or Prior Close).

Step 2: Calculating the True Range (TR)

The true range is the difference between the “true high” and the true low above. The true high is the greater of the current day’s high and the previous day’s close. The formula is:

TR = Maximum(High or Prior Close) — Minimum(Low or Prior Close)

Step 3: Calculating the Averages for the various timeframes

The default timeframes are 7, 14, and 28. The average for each of the timeframes is calculated as follows:

Average7 = (7-period BP Sum) / (7-period TR Sum)

Average14 = (14-period BP Sum) / (14-period TR Sum)

Average28 = (28-period BP Sum) / (28-period TR Sum)

Step 4: Calculating the Ultimate Oscillator (UO)

The resulting three averages are combined in proportions 4:2:1 and scaled to make a percentage, with the values ranging from 0 to 100. This is given as follows:

UO = 100 x [(4 x Average7) + (2 x Average14) + Average28] / (4+2+1)

Below we have provided you with a chart to show how it looks like in Amibroker:The ultimate oscillator

The ultimate oscillator

The upper pane is the price chart of HYG (the ETF tracking junk bonds) and the lower pane shows the ultimate oscillator with the default settings. As you can see, the indicator oscillates up and down, hence the name. It might help you in pointing out great entry points and where to sell, something we backtest later in the article.

Who invented the ultimate oscillator?

The ultimate oscillator was developed by Larry Williams in 1976, but it became popular after it was featured in Stocks & Commodities Magazine in 1985. The ultimate oscillator is just one of many Larry Williams strategies.

Larry Williams developed the concept as a way to account for the problems experienced in most oscillators when used over different lengths of time.

What does the ultimate oscillator tell you about bullish divergence?

The indicator uses three different periods (7, 14, and 28) to ascertain the momentum in the short, medium, and long-term market trends. But it combines them by weighting them to get a more reliable momentum of the price than what you get from other oscillators that are based on one time frame.

As with most oscillators, the ultimate oscillator moves between 0 and 100, and just like the RSI, levels below 30 are considered oversold, and levels above 70 are considered overbought.

Trading signals are only generated when there is a divergence between the price and the indicator, but three criteria must be met. For example, for the indicator to generate a buy signal, these conditions must be met:

  1. A bullish divergence must form, which means that the price makes a lower low but the indicator is at a higher low.
  2. The first low in the divergence (the lower one) must have been below 30 — that is, the divergence started from oversold territory and is more likely to result in an upside price reversal.
  3. The ultimate oscillator must rise above the divergence high — the high point between the two lows of the divergence.

The ultimate oscillator is particularly adept at generating divergence signals, which are crucial for identifying high probability trend reversals with fewer false signals compared to other oscillators. Its unique multi-timeframe approach significantly reduces the occurrence of false signals, making it a reliable tool for traders looking to minimize whipsaws and enhance trading signal accuracy.

The opposite is required to generate a sell signal.

Let’s go on to backtest some trading strategies based on the indicator:

Ultimate oscillator trading strategy

Let’s first backtest using the default parameters of the indicator: 7, 14, and 28. We buy when it crosses below 40 and we sell when it crosses above 50. The ultimate oscillator generates buy and sell signals that traders can use to identify potential trade entry and exit points. The equity curve looks like this when we backtest on SPY (the ETF tracking S&P 500):Ultimate oscillator backtest default settings

Ultimate oscillator backtest default settings

As you can see, the result has a lot to be desired! This is pretty far from any tradeable trading strategy.

Ultimate oscillator trading strategy using backtest optimization

Let’s do a backtest to make a potential optimized ultimate oscillator trading strategy.

We like to start backtesting by using a strategy optimization. Why do we use an optimization? We do that because it’s a great way to find out where the best settings are or if we are likely to curve fit the strategy.

The ultimate oscillator has many settings thus making any optimizations liable to many simulations. To limit the simulations we only optimize the three settings and not the buy and sell thresholds.

These are our settings (trading rules):

Ultimate Oscillator Trading Rules for Sell Signal


This is many simulations and below we have an excerpt ranked on profit factor:

Ultimate oscillator backtest strategy optimization

Ultimate oscillator backtest strategy optimization

The first, second, and third column show the different settings we put into the indicator. The rows show the different trading performance metrics for each setting.

The table above contains about 33% of the optimizations. The result is pretty impressive: Only one backtest/simulation has a profit factor below 2! Of all the hundreds of indicators we have backtested, this is absolutely one of the best we have seen.

For example, here is one backtest with a profit factor of 2.5:

Ultimate oscillator trading strategy backtest

Ultimate oscillator strategy backtest

There are 355 trades, the average gain is 0.77% per trade, the win rate is 78%, and max drawdown is 25%.

The annual returns are like this:

Ultimate oscillator strategy annual returns

Ultimate oscillator strategy annual returns

There are only two down years while it has frequent spectacular years.

Ultimate oscillator strategy – ending remarks

There are plenty of oscillating trading indicators and the ultimate oscillator has proved pretty consistent and stable in our backtests. It’s a mean reversion indicator but it has proved to be solid and consistent over many different settings.

We didn’t include the ultimate oscillator in our article about the best indicator for swing trading, but it certainly would have qualified as one of the best. Thus, you can potentially build an ultimate oscillator trading strategy.


How does the Ultimate Oscillator generate trading signals, and what criteria must be met?

Trading signals are generated when there is a divergence between the price and the indicator. For a buy signal, a bullish divergence must form, starting from oversold territory (below 30), and the oscillator must rise above the divergence high. Opposite conditions are required for a sell signal, where sell signals are identified through bearish divergences, indicating potential reversals.

What are the key metrics of a successful backtest with an optimized Ultimate Oscillator strategy?

An excerpt from the backtest optimization shows impressive results, with profit factors well above 2.5 in most cases. Successful backtests exhibit high average gains per trade, a high win rate, and manageable maximum drawdown.

How consistent and stable is the Ultimate Oscillator in various backtests, and what type of trading strategy does it represent?

The Ultimate Oscillator has proven consistent and stable in backtests, presenting itself as a reliable mean reversion indicator. While it wasn’t included in the article about the best indicators for swing trading, it qualifies as one of the best and can potentially be the foundation for an effective trading strategy.

What does it mean when the Ultimate Oscillator rises or falls?

When the Ultimate Oscillator rises, it indicates that buying pressure is strong, reflecting a significant momentum for different timeframes. Conversely, when the oscillator falls, it suggests a decrease in momentum and potential decline in stock value, signaling weak buying pressure and possibly a sell signal for traders.

Similar Posts