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 Corrective Leg Reclaim strategy is a trend-continuation system for MetaTrader 5 that combines a fractal swing-pivot pattern with an Exponential Moving Average (EMA) trend filter. An EMA is a moving average that weights recent prices more heavily than older ones, making it responsive to the current direction of the market. In this strategy, the EMA acts as the gatekeeper: trades are only considered when price is trading on the correct side of the EMA and the EMA is sloping in the same direction.
The core idea comes from classic price-structure analysis. In a healthy trend, price does not move in a straight line — it advances in strong "impulse" legs separated by shorter counter-trend pullbacks, known as corrective legs. A fractal swing pivot (a local high or low with lower/higher bars on both sides) marks the end of an impulse leg. The bars that follow form the corrective leg. When price closes back beyond that pivot, the corrective leg is considered "broken," and the strategy interprets this as the dominant trend resuming. That reclaim is the entry trigger.
This makes the Corrective Leg Reclaim a study in trend-following and pullback-continuation trading. It is best suited as a learning tool for traders who want to understand how swing structure, trend filters, and volatility-based risk placement can be combined into a single rules-based system. It is designed for trending market conditions and is not intended for choppy, range-bound environments where false breakouts are common.
How It Works
The strategy evaluates its logic once per newly closed bar, on a single timeframe. Every decision uses confirmed (closed) price data, which helps avoid acting on incomplete candles. Here is how the logic flows:
- Trend filter (the gatekeeper): The strategy calculates an EMA of closing prices. For a long setup, the most recent closed bar must close above the EMA and the EMA must be sloping upward. For a short setup, price must close below the EMA and the EMA must be sloping downward. This ensures the system only trades with the prevailing trend and never fades it.
- Swing pivot confirmation: A fractal swing high or swing low is confirmed a number of bars back (set by
SwingLookback), once there are enough bars on both sides to validate it. A swing high marks the end of an upward impulse leg; a swing low marks the end of a downward impulse leg. The most recent confirmed pivot is "armed" and stored until it is used. - Long entry signal: In a confirmed uptrend, the strategy signals a buy when the previous closed bar was at or below the armed swing high and the newest closed bar closes above it. This represents the corrective pullback failing and the trend reclaiming its swing high.
- Short entry signal: In a confirmed downtrend, the strategy signals a sell when the previous closed bar was at or above the armed swing low and the newest closed bar closes below it — the mirror image of the long condition.
- One trade at a time: Only one position per magic number is allowed. Once a pivot triggers an entry, it is "consumed" so that the same swing can never fire a second trade.
Stop-loss logic: The strategy places the stop at the further of two reference points. The first is the structural extreme of the recent pullback (the lowest low for a long, or the highest high for a short), padded by a fraction of the Average True Range (ATR). ATR is a volatility measure of the average distance price travels per bar. The second reference is a fixed ATR multiple away from entry (AtrStopMult). By choosing whichever is further, the stop respects genuine market structure while never sitting inside normal market noise.
Take-profit logic: The take-profit is set at a fixed reward-to-risk multiple of the stop distance, controlled by RewardRatio. For example, with a reward ratio of 2.0, the target sits twice as far from entry as the stop. This keeps every trade governed by a consistent, pre-defined risk-to-reward relationship.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| TrendEmaPeriod | 50 | 20 | 200 | Number of bars used for the EMA trend filter. Higher values track slower, longer-term trends; lower values react faster. |
| SwingLookback | 3 | 2 | 6 | Fractal half-width — how many bars on each side of a pivot are required to confirm a swing high or low. Larger values demand more significant swings. |
| AtrPeriod | 14 | 7 | 30 | Number of bars used to calculate the ATR volatility measure that shapes stop placement. |
| AtrStopMult | 1.5 | 0.5 | 4.0 | ATR multiple defining the volatility-based "noise floor" for the stop-loss distance. |
| RewardRatio | 2.0 | 1.0 | 5.0 | Reward-to-risk multiple used to set the take-profit relative to the stop distance. |
| Lots | 0.10 | 0.01 | 1.0 | Fixed trade size in lots for each position. |

Recommended Chart Settings
The Corrective Leg Reclaim runs on a single timeframe, meaning it uses whichever chart timeframe you attach it to for every calculation. This makes it flexible, but it also means you should test it deliberately on the timeframe you intend to use.
As a trend-continuation system, it is generally most coherent on major forex pairs (such as EUR/USD or GBP/USD) and on intraday-to-swing timeframes like the H1 (1-hour) or H4 (4-hour) charts, where trends and their corrective legs are clearly defined and spread costs are relatively small compared to average moves. Lower timeframes tend to generate more false swing pivots and are more sensitive to noise. Remember that results will vary significantly across different symbols, timeframes, and market conditions, so no single setting is universally "correct."
How to Install on MetaTrader 5
- Download the
.ex5file 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
The Corrective Leg Reclaim has some clear conceptual strengths. By requiring both a trend filter and a broken corrective leg, it avoids one of the most common beginner mistakes — trading breakouts against the dominant trend. Its structure-aware stop-loss, which respects the actual pullback extreme rather than an arbitrary fixed distance, is a thoughtful piece of risk design. The "one pivot, one trade" rule also prevents the strategy from repeatedly firing on the same exhausted swing.
That said, every approach has limitations. Trend-continuation systems historically struggle in range-bound or choppy markets, where the EMA slope flips frequently and swing pivots produce repeated false signals. Because entries occur after a swing high or low is reclaimed, the strategy may enter relatively late in a move, which can result in wider stops or entries near short-term extremes. Fractal-based pivots are also inherently lagging — a pivot is only confirmed several bars after it forms. During strong news events or gaps, the volatility-based stop may not behave as modelled. As with any single-timeframe system, it has no awareness of the broader higher-timeframe context, so a trade that looks valid locally may run into major structure on a higher timeframe.
Treat this EA as a framework for studying how trend filters and price structure interact — not as a finished solution to deploy blindly.
Risk Management Tips
Sound risk management matters far more than any single entry rule. Consider these general principles as part of your education:
- Position sizing: Rather than using a fixed lot size out of the box, size each trade relative to your account and the distance to your stop-loss. Many educators suggest risking no more than 1–2% of account equity on any single trade.
- Test on a demo account first: Run the strategy on a demo or paper account until you understand its behaviour, its typical trade frequency, and how it responds to different market conditions.
- Understand drawdown: Every strategy experiences losing streaks. Study the maximum drawdown (the largest peak-to-trough drop) so you know what a normal rough patch looks like and can avoid abandoning a plan at the worst moment.
- Respect leverage: Leverage amplifies both gains and losses. Use it conservatively and always know your total exposure.
- Keep a trading journal: Record why each trade was taken and how it resolved. Reviewing this over time is one of the most effective ways to learn.
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: CorrectiveLegReclaim.ex5 (1 downloads)
- Source Code: CorrectiveLegReclaim.mq5 (1 downloads)
- Documentation: CorrectiveLegReclaim.pdf (0 downloads)