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 Tirone Level Range Reversion strategy is a mean-reversion system built around Tirone Levels, a classic support-and-resistance construction that divides a recent price range into thirds. Named after technician John Tirone, this method takes the highest high and lowest low over a lookback window and draws three horizontal reference lines: an upper third (resistance), a lower third (support), and a center line that sits exactly halfway between the extremes. Mean reversion is the idea that price, after stretching away from a "fair value," tends to snap back toward it — and in this strategy the center line acts as that gravitational fair value.
This Expert Advisor (EA) is designed specifically for balanced, sideways, non-trending markets — the kind of choppy conditions where price oscillates within a band rather than marching in one direction. When a market is genuinely ranging, the outer thirds tend to reject price repeatedly while the center line pulls it back. The strategy attempts to fade (trade against) those outer-third rejections, aiming for the center as a modest, high-probability target. To avoid the classic trap of fading a real breakout, it uses a drift-ratio filter that measures how far price has net-traveled across the window relative to the range; if the window has trended, the EA simply stands aside.
As a learning tool, Tirone Level Range Reversion is well suited to traders who want to study range identification, structural support/resistance, and disciplined risk control. It demonstrates how a simple geometric level system can be combined with a regime filter, an ATR-based volatility gate, a tight structural stop, and a breakeven mechanism. It is best viewed as an educational example of how mean-reversion logic is assembled — not as a shortcut to any particular outcome.
How It Works
The strategy evaluates conditions once per newly closed bar on the chart's primary timeframe, while managing open trades on every tick. Here is the logic in plain English.
Building the Tirone Levels:
- Over the last N closed bars (the
Lookback), the EA finds the highest high (HH) and lowest low (LL). - Top line = HH − (HH − LL) / 3 — the upper resistance third.
- Bottom line = LL + (HH − LL) / 3 — the lower support third.
- Center line = (HH + LL) / 2 — the mid-range magnet, used as the take-profit target.
Regime and quality filters (all must pass before any entry):
- Ranging gate: the absolute net drift across the window (newest close minus oldest close) divided by the range must be at or below
RangeThreshold. A small ratio means the market is balanced; a large ratio means it has trended, and the strategy skips. - Range-significance gate: the range must be at least
MinRangeAtrmultiples of the Average True Range (ATR — a measure of typical bar volatility). This filters out dead, noise-only windows too thin to trade. - Spread gate: new entries are skipped while the spread (in points) exceeds
MaxSpreadPoints. - One position at a time: only a single trade per magic number is allowed open.
Long entry — the strategy signals a buy when:
- The market is in the ranging regime described above.
- The signal bar's low pierces down to or through the Bottom line, but the bar closes back above it (a rejection of the lower support third).
- The close is still below the Center line, leaving room to run toward the magnet.
- The bar is bullish (close above open).
- The entry is at the Ask, the take-profit is the Center line, and the stop-loss sits just below the signal bar's low.
Short entry — the strategy signals a sell when:
- The market is in the ranging regime.
- The signal bar's high pierces up to or through the Top line, but the bar closes back below it (a rejection of the upper resistance third).
- The close is still above the Center line.
- The bar is bearish (close below open).
- The entry is at the Bid, the take-profit is the Center line, and the stop-loss sits just above the signal bar's high.
Reward/risk check:
- Before any order is placed, the distance to the Center target divided by the stop distance must be at least
MinRewardRisk. Setups where the target is too close relative to the stop are rejected.
Exit and stop management:
- Take-profit: the Center line — a structural, modest target that historically tends to be reached more often than a distant one.
- Stop-loss: placed
AtrStopMult× ATR beyond the signal bar's rejecting extreme, keeping the stop tight and structural. - Breakeven lock: once price has traveled
BreakevenFracof the way from entry to the Center target, the stop is pulled to the entry price. This is checked on every tick so that trades which move favorably are protected from turning into losses.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| Lookback | 40 | 15 | 120 | Number of closed bars used to build the Tirone HH/LL range and its thirds. |
| RangeThreshold | 0.55 | 0.20 | 0.90 | Ranging gate: absolute net drift across the window divided by range must be at or below this. Smaller = more strictly ranging. |
| MinRangeAtr | 4.0 | 1.5 | 10.0 | Requires the range to be at least this many ATRs wide, ensuring a real, tradable range. |
| AtrPeriod | 14 | 5 | 30 | Lookback period for the Average True Range used in filtering and stop sizing. |
| AtrStopMult | 0.6 | 0.2 | 2.5 | Stop-loss buffer, in multiples of ATR, placed beyond the signal bar's extreme. |
| MinRewardRisk | 0.7 | 0.3 | 3.0 | Minimum acceptable reward-to-risk ratio; setups below this are rejected. |
| BreakevenFrac | 0.5 | 0.1 | 0.95 | Fraction of the entry-to-Center distance price must travel before the stop is moved to breakeven. |
| MaxSpreadPoints | 60 | 0 | 500 | Skip new entries while the current spread (in points) exceeds this value. |
| Lots | 0.10 | 0.01 | 1.00 | Order volume in lots. |
| Magic | 7742 | 0 | 9,999,999 | Magic number used to identify and manage this EA's trades. |

Recommended Chart Settings
Tirone Level Range Reversion was designed to run on a single timeframe using only the chart it is attached to. Based on its mean-reversion, range-fading design, it is best studied on a liquid FX major such as EURUSD or GBPUSD on M15 to H1 timeframes, which suit range-oriented, intraday reversion trading. Lower timeframes tend to produce more, noisier signals, while higher timeframes produce fewer but potentially cleaner ranges.
Keep in mind that every market goes through phases. A pair that ranges cleanly one week may trend strongly the next, and the strategy's own drift-ratio gate will hold it back during trends. Results will vary meaningfully across different symbols, sessions, and market conditions, so treat any single configuration as a starting point for study rather than a fixed answer.
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
Strengths of this approach. The strategy is disciplined about when it acts. The combined drift-ratio and ATR range filters are designed to keep it out of the trending environments that punish naive level-faders, and the tight structural stop plus breakeven lock reflect a genuine focus on capital protection. Tirone Levels themselves are a transparent, easy-to-visualize construction, which makes this a clear teaching example of how support/resistance geometry can be encoded into rules.
Known limitations. Mean-reversion systems share a common weakness: they perform poorly when a range breaks and becomes a trend. Even with a drift filter, no gate is perfect, and a genuine breakout can trigger a losing fade before the filter would have blocked the next one. Because the target is the center line (a modest distance) while the stop, though tight, can still be hit, the strategy relies on a reasonably high hit rate — a run of stopped-out trades during a regime change can still accumulate. Additionally, the "one position at a time" rule means the EA may sit idle for long stretches when no clean ranging setup appears.
Where it may underperform. Strong trending markets, news-driven volatility spikes, illiquid pairs with wide spreads, and low-volatility "dead" ranges (filtered out by design, but reducing opportunity) are all conditions where this style historically struggles or simply does not trade. It is not a set-and-forget solution, and it should be evaluated carefully across many market regimes before any conclusions are drawn.
Risk Management Tips
Sound risk management matters far more than any single entry signal. Consider these general principles:
- Position sizing: size trades so that a losing trade costs only a small, predefined fraction of your account. A common educational guideline is to risk no more than 1–2% of account equity per trade.
- Use a demo account first: test the EA on a demo or a small account across different market conditions before considering real capital. This lets you observe behavior without financial pressure.
- Understand drawdown: even well-designed strategies experience losing streaks. Study the maximum peak-to-trough decline (drawdown) and ask whether you could tolerate it emotionally and financially.
- Mind the spread and costs: the
MaxSpreadPointsfilter helps, but commissions, swaps, and slippage still erode results — factor them into any evaluation. - Avoid over-optimization: tuning parameters until a backtest looks ideal often produces results that do not carry forward. Prefer robust settings that work reasonably across a range of conditions.
- Never risk essential funds: only ever allocate money you can afford to lose entirely.
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: TironeLevelRangeReversion.ex5 (2 downloads)
- Source Code: TironeLevelRangeReversion.mq5 (1 downloads)
- Documentation: TironeLevelRangeReversion.pdf (1 downloads)