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 Triple Advance Pullback strategy is a selective, trend-continuation system built around the classic Three White Soldiers and Three Black Crows candlestick patterns, filtered through an Exponential Moving Average (EMA) trend baseline and an Average True Range (ATR) volatility measure. An EMA is a moving average that gives more weight to recent prices, so it tracks the trend closely; ATR measures how much price typically moves in a bar, giving a sense of current volatility. Together they let the strategy judge both the direction and the health of a move before it acts.
What makes this approach distinctive is when it enters. A naïve trader might see three strong candles in a row and immediately chase the third one — usually the worst possible spot, because the move is already extended and the stop-loss has to sit far away. Triple Advance Pullback does the opposite. A clean, non-climactic three-candle march simply arms a setup. The strategy then waits patiently for the first shallow pullback (a brief dip against the trend) and enters only when price reclaims the prior bar's extreme. This is the point where risk is smallest and the odds of the trend resuming are historically most favourable.
As a learning tool, this strategy is well suited to traders who want to study disciplined trend-following and structural risk placement rather than pattern-chasing. It is designed for markets that produce clean, orderly trends — such as major FX pairs, metals, and index CFDs on intraday-to-swing timeframes. Because it demands strict, multi-condition confirmation, it trades infrequently, which makes it a useful case study in patience and quality-over-quantity signal filtering.
How It Works
The strategy operates in two stages — first it arms a setup after a valid advance, then it triggers an entry on the pullback. All logic runs on a single, user-selected timeframe.
Stage 1 — Arming a healthy advance (the strategy signals a valid setup when):
- Three consecutive same-direction candles print (bullish for longs, bearish for shorts), each with a strong body — the body must be at least
MinBodyFractionof that candle's high-to-low range. - Each candle closes beyond the previous one and prints a new extreme (progressively higher highs for an advance, lower lows for a decline).
- Each candle opens inside the previous candle's body — a steady march with no gaps or thin bars.
- The third candle is not a blow-off climax — its body must not exceed three times the first candle's body.
- The full three-bar span (top-to-bottom) is significant — at least
MinAdvanceAtr× ATR, so noise is filtered out. - Price is not over-extended — the close must sit within
MaxExtensionAtr× ATR of the EMA, leaving room to run and a tight stop. - The EMA agrees — for longs, price is above a rising EMA; for shorts, below a falling EMA.
Stage 2 — The pullback and reclaim entry (the strategy signals an entry when):
- Within
MaxPullbackBarsbars, a genuine pause appears — at least one completed bar closes against the trend (a real dip). - The retrace stays shallow — the pullback may give back at most
PullbackFractionof the advance span; a deeper retrace voids the setup as a possible reversal. - Price remains on the correct side of the EMA throughout; losing the EMA cancels the setup.
- A reclaim bar then closes back above the prior bar's high (for longs) or below the prior bar's low (for shorts), still in trend. That bar is the entry.
Stop-loss logic: The stop is placed structurally, just beyond the shallow pullback extreme plus a small ATR buffer. If the resulting risk is larger than StopAtrMult × ATR, the setup is rejected as too loose — this keeps risk per trade tightly controlled.
Take-profit logic: The target is a fixed reward-to-risk multiple (RewardRatio) of that small structural stop distance, so a winner is sized relative to the risk taken.
Trade management: Once price advances BreakevenAtr × ATR in favour, the stop ratchets to breakeven and then trails TrailAtr × ATR behind price, checked on every tick. Only one position per magic number is held at a time.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| TrendEmaPeriod | 50 | 20 | 150 | EMA period defining the trend baseline; longs only above a rising EMA, shorts below a falling one. |
| MinBodyFraction | 0.55 | 0.40 | 0.80 | Minimum body size as a fraction of each candle's range, ensuring conviction candles. |
| MinAdvanceAtr | 1.0 | 0.50 | 3.00 | The three-candle span must be at least this multiple of ATR to count as significant. |
| MaxExtensionAtr | 3.0 | 1.50 | 6.00 | Rejects over-extension: the close must be within this ATR multiple of the EMA. |
| MaxPullbackBars | 3 | 1 | 8 | How many bars the pullback may take before the armed setup goes stale. |
| PullbackFraction | 0.55 | 0.30 | 0.80 | Maximum fraction of the advance the pullback may retrace before the setup is voided. |
| AtrPeriod | 14 | 7 | 40 | ATR length used for significance, extension, stops, targets, and trailing. |
| StopAtrMult | 1.2 | 0.60 | 3.00 | Maximum allowed structural risk as an ATR multiple; looser setups are skipped. |
| RewardRatio | 2.0 | 1.00 | 4.00 | Take-profit distance as a multiple of the structural stop distance. |
| BreakevenAtr | 0.8 | 0.30 | 2.50 | Move the stop to breakeven once price advances this many ATRs in favour. |
| TrailAtr | 1.5 | 0.50 | 4.00 | After breakeven, trail the stop this many ATRs behind price. |
| Lots | 0.10 | 0.01 | 1.00 | Fixed position size in lots. |

Recommended Chart Settings
Triple Advance Pullback was designed with clean intraday and swing trends in mind. Suitable candidates include EURUSD, XAUUSD (gold), and US30 (Dow index CFD) on timeframes from M15 to H4. The timeframe is never hardcoded — the strategy runs on whatever timeframe you attach it to — so you are free to test other markets and periods. Keep in mind that trend character varies greatly across symbols and timeframes, and results will differ across changing market conditions.
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. The strategy's core edge is discipline. By refusing to chase the third candle and instead buying a shallow, confirmed pullback, it places its stop close to structure — which keeps individual losses small and improves the reward-to-risk profile. The breakeven-and-trail management aims to protect open profit so a winner is less likely to collapse into a loss. Its many filters make it highly selective, which can reduce the number of low-quality trades.
Limitations. Candlestick clusters like Three White Soldiers are well documented but are not predictive certainties — they simply describe momentum that may or may not continue. Because the strategy insists on a specific advance-then-shallow-pullback sequence, it will miss trends that run without pausing, and it can be whipsawed when a promising advance rolls straight into a reversal. In choppy, sideways, or low-volatility markets, valid setups may be rare or may fail repeatedly as price oscillates around the EMA. News-driven spikes can also blow past a tight structural stop.
Where it may underperform. Ranging conditions, erratic gaps, and very high-volatility regimes all reduce the reliability of orderly candlestick marches. Treat this EA as a framework for studying trend-continuation logic — not as a set-and-forget solution.
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 one position. Adjust the
Lotsparameter to match your account size rather than accepting the default blindly. - Understand drawdown. Even a well-designed strategy will experience losing streaks. Know how a series of losses would affect your balance before committing real capital.
- Test on a demo account first. Run the EA in MT5's Strategy Tester and on a demo account across different symbols and market conditions to understand its behaviour before considering live use.
- Don't over-optimise. Tuning parameters to fit past data perfectly ("curve-fitting") often produces results that do not hold up going forward. Favour robust settings that work reasonably across many conditions.
- Keep leverage modest. Leverage magnifies both gains and losses; conservative sizing helps you survive the inevitable rough patches.
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: TripleAdvancePullback.ex5 (25 downloads)
- Source Code: TripleAdvancePullback.mq5 (23 downloads)
- Documentation: TripleAdvancePullback.pdf (30 downloads)