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 Arnaud Legoux Trend Reclaim strategy is a trend-following, pullback-continuation system built around the Arnaud Legoux Moving Average (ALMA) — a Gaussian-weighted moving average that uses a phase offset to trim lag while staying smooth. Where a simple moving average weights every bar equally and an exponential moving average leans heavily on the most recent bar, ALMA lays a bell-shaped curve of weights across its window and slides the peak of that curve toward the newest bar. The result is an average that reacts faster than a traditional moving average without becoming jagged or noisy.
This strategy uses two ALMAs that share the same shape settings but different window lengths. A fast ALMA (short window) acts as a low-lag price tracker, while a slow ALMA (long window) serves as the trend "spine," or baseline. Rather than chasing fresh breakouts, the system waits for price to pull back into an established trend and then reclaim it — the fast line dips toward the spine and crosses back through it in the trend's direction. In plain terms, it looks to buy dips inside an uptrend and sell rallies inside a downtrend.
As a learning tool, the Arnaud Legoux Trend Reclaim is well suited to traders who want to study how adaptive moving averages, volatility-scaled regime filters, and continuation entries fit together. It is designed for trending market conditions on liquid instruments and is best treated as a framework for understanding pullback logic — not as a shortcut to results. If you are studying how to separate a genuine trend from directionless chop, this strategy offers a compact, well-commented example.
How It Works
The strategy evaluates its rules once per newly closed bar, using only completed bars so signals do not repaint. Here is what happens on each closed bar:
- Build the two ALMAs. The strategy computes a fast ALMA and a slow ALMA over the recent closing prices. Both use the same
OffsetandSigmashape settings, differing only in window length. - Check the trend regime (a real gate, not just a sign). The slow spine must have travelled at least
MinSlopeAtr× ATR over the lastSlopeBarsbars. By requiring the move to be meaningful relative to volatility, this filter keeps the system out of flat or choppy markets where reclaims tend to whipsaw. ATR (Average True Range) measures how much price typically moves per bar, so the threshold automatically adapts to each instrument's volatility. - Watch for a reclaim. After a pullback, the fast ALMA must cross back through the spine in the trend's direction on the just-closed bar. The strategy also confirms with the bar's closing price.
The entry rules break down as follows:
- Long entry — the spine is rising (uptrend); on the prior bar the fast ALMA had slipped to or below the spine (price pulled back into the trend); and on the just-closed bar the fast ALMA crosses back above the spine while the close finishes above it. The dip has been reclaimed in the direction of the trend, so the strategy signals a buy.
- Short entry — the mirror image. The spine is falling (downtrend); the fast ALMA popped to or above the spine; then it crosses back below the spine with a close under it. The strategy signals a sell of the reclaimed rally.
The exit logic is fully volatility-scaled and set at entry:
- Stop-loss — placed at
AtrStopMult× ATR away from the entry price (below entry for longs, above for shorts). Wider volatility produces a wider stop, so the trade is given room proportional to current market conditions. - Take-profit — set at a fixed
RewardRatiomultiple of the stop distance. With the default 2.0, the target sits twice as far from entry as the stop, which lets winners in a live trend run further than the risk taken. - One position per Magic number — the strategy holds only a single position at a time and lets the ATR stop or target manage the exit; it does not add to or average into trades.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| FastWindow | 9 | 4 | 30 | Length of the fast ALMA window — the low-lag price tracker. |
| SlowWindow | 30 | 15 | 80 | Length of the slow ALMA window — the trend spine / baseline. |
| Offset | 0.85 | 0.50 | 0.95 | ALMA phase offset (0–1). Higher values push the weight peak nearer the newest bar for more responsiveness. |
| Sigma | 6.0 | 2.0 | 12.0 | ALMA Gaussian width. Smaller values focus the weighting (more responsive); larger values smooth it. |
| SlopeBars | 5 | 2 | 20 | Number of bars over which the spine's slope (trend strength) is measured. |
| MinSlopeAtr | 0.30 | 0.00 | 2.00 | Minimum spine travel over SlopeBars, in ATR multiples, required to accept the trend regime. |
| AtrPeriod | 14 | 5 | 40 | ATR lookback used for volatility-scaled risk. |
| AtrStopMult | 1.8 | 0.5 | 5.0 | Stop-loss distance as a multiple of ATR. |
| RewardRatio | 2.0 | 1.0 | 5.0 | Take-profit distance as a multiple of the stop distance. |
| Lots | 0.10 | 0.01 | 1.00 | Order volume (position size) in lots. |
| Magic | 20714 | 0 | 9,999,999 | Magic number identifying this EA's trades. |

Recommended Chart Settings
This strategy was designed with a trending FX major or metal in mind — for example EURUSD or XAUUSD (gold) — on H1 to H4 timeframes, where trends tend to be more persistent and pullbacks cleaner. That said, the code reads every bar through the chart's own timeframe, so it will run on whatever symbol and timeframe you attach it to.
Keep in mind that results will vary considerably across different market conditions. A parameter set that behaves well in a strongly trending environment may struggle in a range-bound or highly news-driven market. Treat the recommended settings as a starting point for study, not a fixed configuration.
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 the approach. ALMA is a thoughtful choice for a trend spine because it reduces lag without the noise of a fast moving average, which can make continuation signals cleaner. The volatility-scaled regime filter is a genuine improvement over a simple "price above the moving average" rule: by demanding that the trend has actually travelled a meaningful distance relative to ATR, the strategy tries to avoid trading flat markets. Risk is also defined at entry and scaled to volatility, which is a disciplined structure to study.
Known limitations. Like all trend-following and moving-average-based systems, this strategy can struggle in sideways or choppy markets, where the fast line crosses the spine repeatedly and reclaims fail to follow through. The regime filter reduces this but cannot eliminate it. Because entries wait for a pullback and reclaim, the strategy may miss trends that run without pausing, and it can enter late relative to a fresh breakout. Sudden volatility spikes or news events can also blow through an ATR-based stop.
Where it may underperform. Expect weaker behavior during low-volatility consolidation, during violent whipsaws around economic releases, and in instruments that mean-revert rather than trend. No single parameter set will suit every market, so out-of-sample testing across multiple periods is essential before drawing any conclusions.
Risk Management Tips
Sound risk management matters more than any single entry rule. As you study this strategy, keep these general principles in mind:
- Risk a small, fixed fraction per trade. Many educational resources suggest risking no more than 1–2% of account equity on any single position. Size your lots so the ATR stop distance corresponds to that fraction.
- Understand drawdown. Even a well-built trend strategy will endure losing streaks. Review the maximum historical drawdown of any configuration and ask whether you could tolerate it emotionally and financially.
- Test on a demo account first. Run the EA on a demo or simulated account long enough to see it trade through varied conditions before considering anything else.
- Mind position sizing and leverage. Larger lot sizes and higher leverage magnify both gains and losses. Conservative sizing gives a strategy room to work through variance.
- Keep expectations realistic. Backtests and optimizations describe the past, not the future. Treat every result as a hypothesis to be challenged, not a promise.
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: ArnaudLegouxTrendReclaim.ex5 (64 downloads)
- Source Code: ArnaudLegouxTrendReclaim.mq5 (57 downloads)
- Documentation: ArnaudLegouxTrendReclaim.pdf (61 downloads)