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 Adaptive Decay Impulse Breakout is an intraday breakout strategy built entirely on a self-adapting leaky integrator of order-flow impulse — a custom volume-and-price accumulator derived purely from raw OHLCV data, with no traditional indicator library behind it. Instead of reading moving averages or oscillators, it measures the market's directional conviction by combining tick volume with bar-to-bar price change, then tracks how quickly that conviction fades. Because the calculation leans on both participation (tick volume) and momentum (close-to-close change), it belongs to the volume-weighted momentum-breakout family of trading styles.
The strategy is designed for liquid, fast-moving intraday conditions where genuine directional pushes can be separated from noise. Its central idea is that real conviction is not a single large candle, but a sustained imbalance that the opposing side has not yet absorbed. To capture that, the accumulator "forgets" old flow at a rate the market itself dictates: when volatility expands, memory shortens so stale flow drops away quickly; when the market is calm, memory lengthens. A signal is only considered when this accumulator escapes its own statistical envelope while still accelerating in the same direction.
As a learning tool, this strategy is best suited to intermediate traders who already understand candlesticks and want to study how volatility-adaptive filters, z-score envelopes, and dynamic position sizing fit together in code. It is framed here as a strategy analysis — a way to explore adaptive, self-calibrating logic — not as a shortcut to trading success. Every claim below should be read as educational analysis of how the mechanism behaves, not as a prediction of outcomes.
How It Works
The strategy processes one confirmed (fully closed) bar at a time to avoid repainting, then builds its signal from several stacked conditions. Here is the logic in plain English:
- Order-flow impulse: For each closed bar, the strategy computes an impulse equal to tick volume multiplied by the change in closing price (
TickVolume × (Close − PreviousClose)). Larger participation combined with a larger directional move produces a stronger signed impulse. - Adaptive decay (the leaky integrator): Impulses are accumulated into a running total
I, but each step the prior total is multiplied by a decay factorlambdabetween 0.50 and 0.98. This is the "leaky" part — old flow slowly bleeds out. - Self-adapting memory: The decay rate is not fixed. It is derived from the ratio of short-horizon to long-horizon move volatility (a "speed" reading). When the market speeds up, memory shortens; when it calms, memory lengthens. This is what makes the decay adaptive.
- Z-score envelope (the breakout trigger): The accumulator is standardised against its own recent mean and standard deviation over a rolling window, producing a z-score (how many standard deviations the accumulator sits from its average). A z-score is simply a measure of how unusual the current reading is.
- Entry — escape while accelerating: The strategy signals a long when the z-score rises to or above
ZEntry, the accumulator is still increasing (positive acceleration), and the accumulator itself is positive. It signals a short in the mirror-image case. The acceleration gate is meant to separate a genuine, still-building escape from an exhausted push sitting at an extreme. - Exit — imbalance absorbed: An open position is closed when the accumulator mean-reverts back through zero (the z-score crosses to the opposite side of its centre), which the model interprets as the imbalance having been absorbed by the market.
- Exit — hard reversal / flip: If a fresh, accelerating escape fires in the opposite direction, the strategy closes the current position and may flip to the new side.
- Stop-loss logic: Stops are placed at a distance of
SlMultmultiplied by a rolling true-range volatility reading (a simple mean of true range, not a Wilder-smoothed ATR). Volatile regimes therefore get wider stops, quiet regimes tighter ones. - Take-profit logic: Targets are set at
TpMultmultiplied by that same volatility reading, so the risk-to-reward geometry scales with current market conditions rather than a fixed pip value. - Dynamic position sizing: Volume scales inversely with volatility (within a 0.5×–2.0× band). Quieter regimes are allotted a larger clip and more volatile regimes a smaller one, in an attempt to keep per-trade risk more consistent.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| DecayBase | 0.90 | 0.70 | 0.97 | Base of the adaptive decay factor. Lower values make the accumulator forget old order flow faster. |
| ZEntry | 1.50 | 0.50 | 3.50 | Z-score threshold the accumulator must escape before a trade is considered. Higher values demand rarer, more extreme readings. |
| VolShort | 10 | 3 | 30 | Length of the short-horizon move-volatility window used in the speed ratio. |
| VolLong | 50 | 20 | 150 | Length of the long-horizon move-volatility window. The short/long ratio drives the adaptive decay. |
| ZWindow | 60 | 20 | 200 | Number of bars used to compute the mean and standard deviation of the accumulator (the z-envelope). |
| AtrWindow | 14 | 5 | 40 | Window for the rolling true-range volatility used to size stops, targets, and position volume. |
| SlMult | 2.00 | 0.50 | 5.00 | Stop-loss distance as a multiple of the true-range volatility reading. |
| TpMult | 3.00 | 0.50 | 8.00 | Take-profit distance as a multiple of the true-range volatility reading. |
| Lots | 0.10 | 0.01 | 1.00 | Base trade volume, before the inverse-volatility sizing adjustment is applied. |

Recommended Chart Settings
This strategy was designed with a liquid FX major such as EUR/USD in mind, on an intraday timeframe such as M15 (15-minute). Those conditions provide the steady tick-volume flow and frequent, well-defined moves the impulse accumulator relies on. Note, however, that the code takes its symbol and timeframe from the runtime context and never hard-codes them, so you are free to study it on other instruments and timeframes.
Because the strategy is volatility-adaptive, its behaviour will differ meaningfully across symbols, sessions, and market regimes. A setting that looks stable during trending, high-participation hours may behave very differently during thin, range-bound periods. Always test any configuration on historical data and a demo account before drawing conclusions, and expect results to vary as market conditions change.
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 an honest assessment matters more than optimism.
Strengths of this approach:
- The adaptive decay means the accumulator recalibrates its own memory to the current regime, rather than assuming a single fixed lookback fits all conditions.
- Standardising the signal with a z-score envelope makes the entry threshold relative to recent behaviour, which can help the logic travel between instruments of different scales.
- Stops, targets, and position size are all self-computed from live volatility, so risk geometry adjusts automatically instead of using static pip values.
- The acceleration gate is a deliberate attempt to filter out exhausted, decelerating moves sitting at an extreme.
Known limitations:
- Tick-volume-based logic depends heavily on broker tick-volume quality, which is a proxy for real volume and varies between brokers. Signals may not be comparable across data feeds.
- Breakout and momentum-style logic can suffer in choppy, mean-reverting, or low-liquidity conditions, where repeated escapes fail to follow through and stops are hit.
- The strategy can flip positions on a hard reversal, which may increase trading frequency and transaction costs (spread and commission) during volatile whipsaws.
- With nine tunable parameters, there is a real risk of curve-fitting — tuning settings so tightly to past data that they fail to generalise. Robust, out-of-sample study is essential.
- Like all trend/breakout systems, it may underperform in extended sideways markets and during sudden news-driven gaps that bypass its volatility-scaled stops.
Treat this EA as a framework for studying adaptive signal design, not as a finished, hands-off system.
Risk Management Tips
Sound risk management is what separates disciplined study from gambling. Regardless of the strategy, these general principles apply:
- Risk a small, fixed fraction per trade. Many educational sources suggest never risking more than 1–2% of account equity on any single position.
- Use a demo account first. Run the EA on a demo or historical tester for an extended period before considering any live capital, so you understand its drawdown profile.
- Understand drawdown. Study the largest peak-to-trough equity decline a configuration produced historically, and ask whether you could tolerate it emotionally and financially.
- Size positions deliberately. Even with the built-in inverse-volatility sizing, confirm that the resulting lot sizes are appropriate for your account balance and broker margin requirements.
- Account for costs. Spread, commission, and slippage can materially change outcomes, especially for a strategy that may flip positions.
- Never trade with money you cannot afford to lose, and consider seeking guidance from a qualified financial professional.
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: AdaptiveDecayImpulseBreakout.ex5 (0 downloads)
- Source Code: AdaptiveDecayImpulseBreakout.mq5 (0 downloads)
- Documentation: AdaptiveDecayImpulseBreakout.pdf (0 downloads)