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 Impulse Hook Continuation strategy is a price-action, trend-continuation system built around the classic "Ross Hook" pattern and the Average True Range (ATR) indicator. Rather than relying on oscillators or moving-average crossovers, it reads raw candle data (open, high, low and close) to detect a fresh momentum breakout, then waits for the market's first shallow pullback — the "hook" — before looking to join the move. ATR, a volatility gauge that measures the average size of a bar's price range, is used only to size the stop-loss and to scale the strategy's various thresholds so that it adapts automatically across symbols and timeframes.
The core economic idea is simple and well understood by discretionary traders: a genuine trend rarely reverses on its very first correction. When price thrusts out of a base and posts a new N-bar high or low, the first small pause where it fails to extend is usually just short-term profit-taking. Traders who missed the initial breakout often wait to buy that dip. The Impulse Hook Continuation strategy tries to systematize that behaviour — it does not chase the breakout bar itself, but instead enters on the break of the pre-pullback peak, aiming to ride the resumption of the trend.
As a learning tool, this strategy is well suited to anyone studying trend-following, breakout mechanics, or classic pattern-based trading. Because it is a compact state machine driven purely by OHLC data, it is also a clear example of how a discretionary chart pattern can be translated into fully mechanical, testable rules. It is intended for study and backtesting, not as a shortcut to results.
How It Works
The strategy runs as a small five-stage state machine, evaluated once per newly closed bar. Here is what happens at each stage:
- Ignition (breakout detection): The strategy signals a fresh impulse when a closed bar closes above the highest high (for a long) or below the lowest low (for a short) of the previous
BreakoutLookbackbars. This marks the start of a new directional leg, and the strategy begins tracking the running extreme — the peak of an up-leg or the trough of a down-leg. - Extend: While each new bar keeps making a new extreme in the impulse direction, the leg is considered still running. No hook has formed yet, so no trade is armed.
- Arm the hook: The first bar that fails to make a new extreme marks the hook. Its peak (long) or trough (short) becomes the trigger level, and the strategy starts tracking the pullback's counter-extreme — the higher-low of an up-move or the lower-high of a down-move.
- Trigger (entry): If price breaks back through the hook level by a small ATR-based buffer (
BreakBufferAtr× ATR), the trend is deemed to have resumed and the strategy signals an entry in the impulse direction. The buffer helps avoid firing on a marginal poke through the level. - Invalidate: A hook is by definition a minor correction. If the pullback drags on for more than
MaxHookBarsbars, or retraces deeper thanMaxPullbackAtr× ATR, the setup is discarded and the machine waits for the next ignition. A brand-new breakout in the opposite direction also flips the whole state machine.
Stop-loss logic: For a long, the stop is placed just below the pullback's lowest point, minus a fraction of ATR (AtrStopMult × ATR) for breathing room. For a short, the stop sits just above the pullback's highest point, plus the same ATR fraction. This anchors risk to the actual structure of the hook rather than an arbitrary fixed distance.
Take-profit logic: The target is set at a fixed reward-to-risk multiple (RewardRisk) of the measured entry-to-stop distance. With the default of 2.0, the take-profit is placed twice as far from entry as the stop.
Trade management: Only one position per magic number is held at a time. Once a position is open, the ATR-based stop and the reward:risk target manage the exit — there is no additional trailing logic. New entries are also skipped whenever the current spread exceeds MaxSpreadPoints, which helps filter out low-quality fills during illiquid conditions.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| BreakoutLookback | 20 | 8 | 60 | Number of prior bars whose highest high / lowest low a close must clear to count as a fresh breakout impulse (trend ignition). |
| MaxHookBars | 4 | 1 | 12 | The hook (first pullback) must resolve into a break within this many bars; otherwise the correction is too slow to be a hook and the setup is discarded. |
| BreakBufferAtr | 0.10 | 0.0 | 1.0 | Trigger buffer beyond the hook level, expressed as a fraction of ATR, to avoid firing on a marginal poke through the peak/trough. |
| MaxPullbackAtr | 2.5 | 0.5 | 6.0 | Maximum pullback depth (impulse extreme to hook counter-extreme) as a multiple of ATR. A deeper retrace means the impulse likely failed. |
| AtrPeriod | 14 | 5 | 30 | ATR lookback period used for the stop, the trigger buffer and the depth thresholds. |
| AtrStopMult | 0.5 | 0.1 | 2.0 | Stop breathing room beyond the pullback counter-extreme, as a multiple of ATR. |
| RewardRisk | 2.0 | 1.0 | 4.0 | Take-profit distance as a multiple of the (entry − stop) risk. |
| MaxSpreadPoints | 60 | 5 | 300 | Skip new entries when the current spread (in points) is wider than this value. |
| Lots | 0.10 | 0.01 | 1.0 | Position size in lots. |
| Magic | 40719 | 0 | 9,999,999 | Magic number used to tag and filter this strategy's positions. |

Recommended Chart Settings
The Impulse Hook Continuation strategy was designed with trending instruments in mind — a trending FX major, a metal, or an index such as GBPUSD, XAUUSD or US30 — on intraday timeframes in the M15 to H1 range. Because the code reads only the primary symbol and timeframe selected at test time, and because every threshold self-scales through ATR, the same default parameters are intended to travel reasonably well across different markets and timeframes.
That said, no single set of chart settings performs uniformly across all environments. The pattern is built for directional, impulsive markets; results will vary considerably depending on volatility, session, and how trending or choppy the underlying instrument happens to be. Treat the recommended settings as a starting point for your own testing rather than a fixed prescription.
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 biggest merit is its clarity. It encodes a genuine, widely-studied price-action idea — buying the first pullback after a breakout — into deterministic, testable rules. Entries are structural: the stop is tied to the actual pullback low or high rather than a blunt fixed distance, and the fixed reward:risk target imposes disciplined trade management. Because everything scales through ATR, the logic adapts to changing volatility without manual retuning, which makes it a clean template for studying how discretionary patterns can be mechanized.
Known limitations. The Ross Hook pattern works best in clean, trending conditions. In ranging or choppy markets, breakouts frequently fail and the "first hook" often turns into a full reversal, which historically produces a run of losing trades for breakout-continuation systems. The strategy also acts only on closed bars, so it may enter a bar or two after the ideal moment. The fixed reward:risk exit means winning trades are capped even when a trend runs much further, and the single-position rule means the EA can sit idle through extended setups. Finally, the spread filter helps but does not eliminate the impact of slippage, gaps, or news-driven volatility.
Where it may underperform. Expect weaker behaviour during low-volatility consolidation, during choppy sessions with many false breakouts, and around high-impact news when spreads widen and price whipsaws. As with any single-pattern system, it should be validated on out-of-sample data before you draw conclusions about its behaviour.
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 educators suggest risking no more than 1–2% of account equity on any single position, so that a normal losing streak cannot do outsized damage.
- Size positions deliberately. The
Lotsinput is a static size; consider adjusting it to your account size and the stop distance rather than leaving it at the default. - Test on a demo account first. Run the EA on a demo or simulation account until you understand how it behaves across different market conditions.
- Understand drawdown. Every strategy endures losing streaks. Review the historical maximum drawdown in your own backtests and ask whether you could tolerate that decline in real time.
- Backtest and forward-test. Validate on multiple symbols, timeframes and date ranges, and be wary of over-optimizing parameters to a single historical period.
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: ImpulseHookContinuation.ex5 (28 downloads)
- Source Code: ImpulseHookContinuation.mq5 (28 downloads)
- Documentation: ImpulseHookContinuation.pdf (34 downloads)