Blog / Strategy
Strategy

Ultimate Oscillator Reversal

Disclaimer: This article is for educational and informational purposes only. It does not constitute financial or investment advice. Trading forex and CFDs carries significant risk of loss. Past performance of any strategy — including backtests — does not guarantee future results. Never trade with money you cannot afford to lose.

What Is This Strategy?

The Ultimate Oscillator Reversal is a trend-pullback swing strategy built around Larry Williams' Ultimate Oscillator (UO) — a momentum indicator that measures buying pressure — combined with an Exponential Moving Average (EMA) trend filter. Rather than trying to catch every top and bottom, it looks for temporary dips inside an established uptrend (or temporary bounces inside a downtrend) and signals an entry when momentum resets in the direction of the larger trend.

The Ultimate Oscillator is designed to reduce the false signals that plague single-period momentum tools. Most oscillators react to just one lookback window, so a single sharp candle can whip them from oversold to overbought and back. The UO instead blends buying pressure across three lookback windows — a short, a mid, and a long period — and weights them 4:2:1. This smoothing means a lone spike is far less likely to produce a misleading extreme reading. The oscillator moves on a 0–100 scale, where low values suggest sellers are stretched and high values suggest buyers are stretched.

This strategy is best suited to traders who want to study how a momentum oscillator behaves when it is filtered by trend context. It is a learning tool for understanding "buy the dip in an uptrend" logic, volatility-scaled risk, and the difference between fading a trend blindly versus trading pullbacks that align with prevailing order flow. It is not a shortcut to results, and it is not intended to be run unattended without study.

How It Works

The strategy evaluates its rules once per newly closed bar, so it never acts on an unfinished candle. Every decision is based on completed price data.

Trend regime filter (the gate):

Entry conditions:

Exit conditions (stop-loss and take-profit):

Trade management rules:

Ultimate Oscillator reversal MT5 EA
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
ShortPeriod 7 3 15 Short lookback window for the Ultimate Oscillator (classic value 7).
MidPeriod 14 8 30 Middle lookback window for the Ultimate Oscillator (classic value 14).
LongPeriod 28 20 60 Long lookback window for the Ultimate Oscillator (classic value 28).
OversoldLevel 35.0 15.0 45.0 UO level that, when crossed upward, arms a long trigger in an uptrend.
OverboughtLevel 65.0 55.0 85.0 UO level that, when crossed downward, arms a short trigger in a downtrend.
TrendEmaPeriod 50 20 200 Period of the trend EMA whose slope must agree with the trade direction.
AtrPeriod 14 5 40 Lookback period for the ATR used to size the stop and target.
AtrStopMult 2.0 0.5 5.0 Stop-loss distance as a multiple of ATR beyond the entry price.
AtrTargetMult 3.0 0.5 8.0 Take-profit distance as a multiple of ATR beyond the entry price.
MaxSpreadPoints 30 1 200 Skip the trade if the current spread (in points) exceeds this value.
Lots 0.10 0.01 1.00 Fixed trade volume in lots.
Magic 7318 0 9,999,999 Unique identifier so the EA manages only its own positions.
Ultimate Oscillator reversal MT5 EA — MQL5 source code

Recommended Chart Settings

The Ultimate Oscillator Reversal was designed with a trending major currency pair such as EURUSD or GBPUSD, or an index like US500, on the M15 to H1 timeframes. These conditions suit a trend-pullback / swing style: liquid instruments that tend to trend over intraday-to-multi-hour horizons give the EMA slope filter meaningful trend context and give pullbacks room to develop.

Keep in mind that results will vary considerably across different symbols, timeframes, and market conditions. An instrument that chops sideways with no persistent trend will produce frequent conflicting EMA slope flips, which is precisely the environment this pullback logic is not built for. Always test on the specific symbol and timeframe you intend to study before drawing any conclusions.

How to Install on MetaTrader 5

What to Consider Before Using This EA

Strengths of this approach. By requiring both a momentum extreme and a same-direction trend slope, the strategy converts a coin-flip mean-reversion signal into a more disciplined "buy the dip in an uptrend" entry. The three-window Ultimate Oscillator is inherently steadier than a single-period oscillator, which historically reduces whipsaw at the extremes. The ATR-based stops and targets also make risk adapt automatically to volatility, so the same settings behave reasonably across instruments with very different price ranges.

Known limitations. No trend filter is perfect. An EMA slope can flip direction right at the moment a pullback completes, causing the strategy to miss a valid move or take a trade just as the trend stalls. Because the strategy only trades when the oscillator resets through a threshold, it can sit idle for long stretches in ranging or low-volatility markets. Oscillator-based reversals can also fire early during strong, extended trends, where the UO may reset and cross while price continues in the original direction against a fresh position.

Where it may underperform. Choppy, directionless markets tend to generate frequent EMA slope reversals and low-quality signals. Sudden news-driven volatility can blow through ATR-scaled stops before the intended structure plays out. And a single fixed lot size does not adjust to account equity, so risk per trade is not automatically kept constant. Treat this EA as a framework to study and stress-test, not a finished system to deploy unquestioned.

Risk Management Tips

Risk Warning

Trading foreign exchange, CFDs, and other leveraged financial instruments involves substantial risk of loss and is not suitable for all investors. The strategies and tools discussed on this page are provided for educational purposes only and do not constitute financial advice, investment recommendations, or solicitation to trade. Always consult a qualified financial adviser before making trading decisions. Past backtest performance is not indicative of future results.

Downloads

← Back to Blog