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 Premier Stochastic Reversal is an exhaustion-reversal strategy built around William Blau's Premier Stochastic Oscillator (PSO) — a heavily conditioned version of the classic stochastic oscillator. A stochastic oscillator measures where the current close sits relative to the high-low range over a lookback window, telling you whether price is pressed toward the top (overbought) or bottom (oversold) of its recent range. The PSO takes that raw reading, re-centers it, smooths it twice, and then squashes it through a mathematical curve so that the final value is bounded neatly between roughly −1 and +1. This extra conditioning is designed to filter out noise and produce a cleaner picture of when a directional push is genuinely running out of steam.
This is a countertrend, mean-reversion style approach. Rather than chasing momentum, it waits for the crowd's push in one direction to reach an extreme and then begin to fail. The design detail that matters most is that the PSO saturates near its rails during strong moves — it can sit pinned at an extreme for a long time. A naïve "extreme reading equals reversal" rule would fight persistent trends and get run over. Instead, this strategy waits for the oscillator to first pin a saturation extreme and then hook back through a threshold band, marking the moment the pressure is actually easing.
As a learning tool, the Premier Stochastic Reversal is well suited to traders who want to study how oscillator conditioning, saturation, and hook-back logic work together. It is best understood in the context of ranging or mean-reverting conditions on FX majors at intraday timeframes, though the code reads a single configurable timeframe and is not locked to any one market. Treat it as a framework for exploring reversal timing — not as a shortcut to results.
How It Works
The strategy evaluates its logic once per closed bar, avoiding the noise of acting on a still-forming candle. On each newly closed bar it rebuilds the Premier Stochastic Oscillator over a rolling history buffer, then checks for a hook-back signal.
Here is how the PSO is constructed and how signals are generated:
- Raw stochastic (%K): Over the
StochLengthwindow, the strategy computes100 × (close − lowest low) / (highest high − lowest low). This is the classic stochastic reading, scaled 0–100. - Re-centering: The raw value is shifted and scaled to roughly a −5 to +5 range with
0.1 × (%K − 50), so that the neutral midpoint sits at zero. - Double smoothing: That re-centered series is passed through two chained exponential moving averages of length
SmoothPeriod— Blau's "noise kill" step that strips out choppy fluctuations. - Saturation squash: The smoothed value is run through a hyperbolic-tangent-style curve, producing a final oscillator bounded between −1 and +1 that saturates near the rails during strong moves.
Entry conditions are strictly a hook-back through the threshold band:
- Long (buy) signal: The PSO was at or below
−Threshold(deep in the oversold saturation zone) and then crosses back up through−Threshold. This may indicate that selling pressure is exhausted. - Short (sell) signal: The PSO was at or above
+Threshold(deep in the overbought saturation zone) and then crosses back down through+Threshold. This may indicate that buying pressure is exhausted.
Exit, stop-loss, and take-profit logic is fully automated and volatility-aware, using the Average True Range (ATR) — a measure of typical bar-to-bar price movement:
- Stop-loss: Placed
AtrStopMult × ATRbeyond the entry price — below entry for longs, above entry for shorts. Wider volatility produces a wider stop, so the exit adapts to current conditions. - Take-profit: Set at a
RewardRiskmultiple of the stop distance. With the defaults, the target sits 1.5× as far from entry as the stop. - One position at a time: The strategy holds a single position per magic number on the symbol and lets the stop-loss and take-profit manage the exit, rather than stacking trades.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| StochLength | 8 | 3 | 40 | Lookback window (in bars) for the raw stochastic high-low range. |
| SmoothPeriod | 5 | 2 | 20 | Period of each of the two chained EMAs used to double-smooth the oscillator. |
| Threshold | 0.90 | 0.50 | 0.98 | Saturation band level the PSO must reach and hook back through to trigger a signal. |
| AtrPeriod | 14 | 5 | 40 | Number of bars used to calculate the ATR for stop and target sizing. |
| AtrStopMult | 1.5 | 0.5 | 4.0 | Multiple of ATR that sets the stop-loss distance from entry. |
| RewardRisk | 1.5 | 0.5 | 4.0 | Reward-to-risk ratio; take-profit distance as a multiple of the stop distance. |
| Lots | 0.10 | 0.01 | 1.0 | Fixed trade volume in lots per position. |

Recommended Chart Settings
The Premier Stochastic Reversal was designed with ranging FX majors on intraday timeframes in mind — pairs such as EUR/USD, USD/JPY, or GBP/USD on charts like M15, M30, or H1. Because every calculation reads the single timeframe you attach the EA to, it will run on whatever chart you select, giving you room to experiment. Countertrend logic like this tends to work best when price is oscillating within a range rather than trending strongly in one direction.
Keep in mind that results will vary considerably across different symbols, timeframes, and market regimes. A configuration that behaves well during a quiet, range-bound session may behave very differently during a strong trend or a high-impact news event. Always test any settings thoroughly on historical data and a demo account before considering live use.
How to Install on MetaTrader 5
- Download the .ex5 file from the link below
- Copy it to your MT5
MQL5\Expertsfolder - Restart MetaTrader 5 or refresh the Navigator panel
- Drag the EA onto a chart matching the recommended symbol and timeframe
- Configure the input parameters and enable Algo Trading
What to Consider Before Using This EA
Every strategy has strengths and trade-offs, and understanding both is part of using it responsibly.
Strengths of this approach:
- The double-smoothing and saturation squash give the PSO a cleaner, less jittery signal than a raw stochastic, which can reduce false triggers.
- The hook-back requirement is a thoughtful design choice — it avoids selling into a strong rally simply because an oscillator is "overbought," instead waiting for evidence that the move is genuinely fading.
- ATR-based stops and targets mean the risk framework adapts automatically to changing volatility rather than using fixed pip distances.
Known limitations:
- Countertrend risk. Any reversal strategy is, by definition, trading against the prevailing move. During strong, persistent trends the oscillator can hook back and re-saturate repeatedly, and each early entry can be stopped out. This is the classic weakness of exhaustion systems.
- Regime dependence. The logic historically favors ranging conditions. In trending or breakout environments it may underperform or produce a string of losing signals.
- Parameter sensitivity. The
Threshold,StochLength, andSmoothPeriodvalues interact closely. Small changes can meaningfully alter how often and how early signals fire, so careful, honest testing matters. - Fixed position sizing. The
Lotsparameter is a fixed volume; it does not scale to account equity, so risk per trade changes as your balance grows or shrinks.
The goal here is to learn how conditioned oscillators and reversal timing behave — not to assume any single configuration is optimal.
Risk Management Tips
Sound risk management matters far more than any single entry signal. Consider these general principles as you study this strategy:
- Risk a small, fixed fraction per trade. Many educational sources suggest risking no more than 1–2% of account equity on any single position. Size your lots so the ATR-based stop distance stays within that limit.
- Use a demo account first. Run the EA in simulation for an extended period across different market conditions before considering any live capital. This lets you observe its behavior in trends, ranges, and news events without financial exposure.
- Understand drawdown. Countertrend strategies can experience clusters of consecutive losses during strong trends. Know how large a drawdown you are willing to tolerate before you begin, and stop if it is reached.
- Diversify and avoid over-leverage. Concentrating all risk in one symbol or using excessive leverage magnifies both losses and emotional stress. Keep leverage modest.
- Keep records and review. Track every trade and periodically review whether the strategy still behaves as expected. Markets change, and no fixed rule set stays suited to all conditions forever.
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
- Expert Advisor: PremierStochasticReversal.ex5 (22 downloads)
- Source Code: PremierStochasticReversal.mq5 (20 downloads)
- Documentation: PremierStochasticReversal.pdf (27 downloads)