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 Three Line Strike Reversal is a pure price-action, mean-reversion strategy built on the classic Three Line Strike candlestick pattern and filtered by the Average True Range (ATR) — a volatility indicator that measures the average size of a bar's price range. Rather than following a trend, this strategy is designed to fade exhausted moves: it looks for a strong, one-sided push that has run out of steam at a market extreme, then trades the sharp reversal that follows.
The "Three Line Strike" is a well-known four-candle formation. The first three candles march in a single direction (three consecutive down-closes or up-closes), representing a persistent, one-sided push. The fourth candle — the "strike" — moves in the opposite direction with enough force to close beyond the entire origin of that three-bar run. In effect, a single bar erases three bars of effort, which many price-action traders read as the market rejecting the prior move. Because the textbook pattern fires almost anywhere and can be noisy, this version adds three layers of filtering: location (the run must end at a fresh swing extreme), magnitude (the run must be a real move measured in ATR), and conviction (the strike bar must have a strong body).
As a learning tool, this strategy is well suited to traders who want to study candlestick reversal patterns, support-and-resistance concepts, and volatility-based risk sizing in a single, self-contained system. It works only from raw open-high-low-close (OHLC) price data plus ATR, so there are no lagging indicator stacks to interpret. This makes it a clear case study for understanding how contextual filters can turn a common pattern into a more disciplined, rule-based approach. It is intended for educational analysis, not as a profit opportunity.
How It Works
The strategy evaluates the market once per newly closed bar. It labels the four most recent completed candles as A (the origin of the run), B (the middle bar), C (the last bar of the run), and D (the "strike" candle that just closed). It then checks a sequence of conditions before signalling a trade.
Entry conditions for a long (buy) signal:
- A down-run exists — bars A, B, and C are all bearish (each closes below its open) and their closes step progressively lower, confirming a persistent downward push.
- The run is large enough — the run's displacement (bar A's open down to bar C's close) is at least
RunAtrMult× ATR, so the strategy only fades a genuine exhaustion move, not three tiny bars of chop. - It ends at a fresh swing low — the lowest low of the run is at or below the lowest low of the
SwingLookbackwindow that comes before bar A, meaning the push terminates at genuine support rather than mid-range. - The strike confirms the reversal — the strike candle D is bullish and closes back above bar A's open (engulfing the run's origin), showing decisive buying control.
- The strike has conviction — the strike candle's body divided by its full range is at least
StrikeBodyRatio, filtering out weak, indecisive reclaim bars.
Entry conditions for a short (sell) signal: these mirror the long logic exactly. The strategy signals a short when a three-bar up-run with progressively higher closes reaches a fresh swing high, the run is at least RunAtrMult × ATR in size, and a strong-bodied bearish strike candle closes back below bar A's open.
Stop-loss logic:
- For a long, the stop is placed below the run's lowest low, offset by
StopAtrMult× ATR as a buffer. - For a short, the stop is placed above the run's highest high, offset by the same ATR buffer.
- This anchors risk to the actual structure of the move — the point at which the reversal thesis would be invalidated.
Take-profit logic:
- The distance from entry to stop defines the trade's risk.
- The take-profit is set at
RewardRiskmultiplied by that risk. With the default of 1.80, the target sits 1.8 times further from entry than the stop, giving a fixed reward-to-risk profile.
The strategy also enforces a single open position per magic number at a time, so it will not stack multiple trades on the same signal. Every trade carries both a stop-loss and a take-profit from the moment it is opened.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| SwingLookback | 10 | 4 | 40 | Number of bars before the run used to confirm it terminates at a fresh swing high or low. Larger values demand a more significant extreme. |
| RunAtrMult | 1.20 | 0.50 | 3.00 | Minimum size of the three-bar run, in ATR units. Higher values require a bigger exhaustion move before a fade is considered. |
| StrikeBodyRatio | 0.55 | 0.35 | 0.85 | Minimum body-to-range ratio of the strike candle. Higher values demand a more decisive, strong-bodied reversal bar. |
| AtrPeriod | 14 | 5 | 30 | Lookback period for the ATR used in the magnitude filter and stop sizing. |
| StopAtrMult | 0.50 | 0.10 | 2.00 | Stop-loss buffer placed beyond the run's extreme, in ATR units. |
| RewardRisk | 1.80 | 1.00 | 4.00 | Take-profit distance expressed as a multiple of the entry-to-stop risk. |
| Lots | 0.10 | 0.01 | 1.00 | Position size in lots. |

Recommended Chart Settings
This strategy was designed with liquid FX majors and metals in mind — for example EURUSD or XAUUSD (gold) — on swing timeframes from M30 through H4. These instruments tend to produce clean candlestick structure and respect swing extremes, which suits a pattern-based reversal approach.
That said, the logic is timeframe-agnostic and will run on whatever primary symbol and timeframe your platform or backtest selects. Reversal patterns behave differently across instruments and sessions, so results will vary considerably across different market conditions. Treat any timeframe or symbol choice as a starting point for your own study and testing rather than a fixed recommendation.
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 involves trade-offs, and understanding them is part of learning to use any tool responsibly.
Strengths of this approach:
- Multiple confirmation layers. By stacking location, magnitude, and conviction filters on top of the base pattern, the strategy is far more selective than a raw Three Line Strike signal, which reduces the number of low-quality setups it acts on.
- Structurally defined risk. Stops are anchored to the run's extreme rather than to an arbitrary fixed distance, so risk is tied directly to the point where the reversal idea fails.
- Transparent logic. Because it uses only OHLC data and ATR, the behaviour is easy to inspect, understand, and study bar by bar.
Known limitations and where it may underperform:
- Counter-trend by nature. Fading a strong move means trading against short-term momentum. In powerful, sustained trends, a "fresh extreme" can keep extending, and reversal entries may be stopped out repeatedly.
- Selectivity means fewer trades. The strict filters can produce long quiet periods with no signals, which requires patience and may not suit every trader.
- Pattern reliability varies. Candlestick reversals are context-dependent. During low-liquidity sessions, around major news, or on illiquid symbols, the same pattern may carry far less meaning.
- Parameter sensitivity. Values such as
RunAtrMultandStrikeBodyRatiochange how often the strategy trades and how aggressive each fade is. Over-tuning them to past data can produce results that do not carry forward.
The goal here is balanced understanding: this is a disciplined framework for studying reversal price action, not a system that removes risk or guarantees any particular outcome.
Risk Management Tips
Sound risk management matters more than any single entry signal. As you study this strategy, keep these general principles in mind:
- Risk a small, fixed fraction per trade. Many educational sources suggest risking no more than 1–2% of account equity on any single position, so a losing streak does not do lasting damage.
- Size positions deliberately. The
Lotsinput should reflect your account size and the stop distance, not a round number chosen at random. Smaller sizes give more room to learn. - Always test on a demo account first. Run the strategy on a demo or in the Strategy Tester across varied market conditions before ever considering live capital.
- Understand drawdown. Even a well-designed strategy will experience losing streaks. Know the maximum drawdown you are willing to tolerate, and how it feels, before committing real funds.
- Keep stops and targets in place. This EA attaches a stop-loss and take-profit to every trade — treat those protective orders as non-negotiable parts of the plan, not optional extras.
Risk management is what keeps you in the game long enough to keep learning. No amount of signal quality substitutes for it.
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: ThreeLineStrikeReversal.ex5 (29 downloads)
- Source Code: ThreeLineStrikeReversal.mq5 (25 downloads)
- Documentation: ThreeLineStrikeReversal.pdf (30 downloads)