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?
Directional Power Expansion is a momentum-based expert advisor (EA) that combines a MACD-derived "power line," a Bollinger-width volatility band, and an ATR (Average True Range) filter to isolate the handful of bars that carry a genuine, one-sided thrust. In plain terms, the strategy assumes most price bars are noise, and it only wants to act when momentum is accelerating hard enough to break through the market's current volatility envelope. This is a trend-continuation style built for traders who want a filter that stays quiet during chop and only speaks up when a directional expansion is clearly underway.
The core measurement is momentum acceleration. Rather than reading the MACD line itself (the difference between a fast and a slow exponential moving average, or EMA), the strategy reads the bar-to-bar change in that line. That change is only large and consistently signed while price is actively pulling away from its recent average — and it flips sign the moment the thrust stalls. This acceleration reading, scaled up by a sensitivity factor, is then compared against a live volatility "threshold band" so that only moves that are genuinely large relative to current conditions are allowed to fire.
As a learning tool, Directional Power Expansion is well suited to intraday traders who want to study how momentum, volatility normalization, and trend filtering can be layered together. It demonstrates several important concepts at once: acceleration versus level, self-scaling thresholds, dead-zone chop filters, and disciplined ATR-based risk. Frame it as a strategy analysis exercise — a way to understand how a rules-based momentum filter is constructed — rather than a shortcut to trading outcomes.
How It Works
The strategy evaluates its signal logic once per newly closed bar, so it does not react to every intrabar tick. On each closed bar it computes four ingredients and requires them to line up before acting.
- Power line (momentum acceleration): The strategy calculates the MACD line as EMA(FastPeriod) minus EMA(SlowPeriod), then takes the difference between the current bar's MACD value and the prior bar's value. That change is multiplied by the
Sensitivityfactor to scale the tiny number up onto the price scale. Positive power indicates building bullish momentum; negative power indicates building bearish momentum. - Threshold band (volatility filter): A Bollinger-style band width is measured as
2 × BandMult × standard deviation of closeoverBandPeriodbars. This is a live, self-scaling gauge of how much movement the market is currently "allowed." Power must push through this band to count as a real expansion. - Dead zone (chop filter): Power must also exceed a small ATR-based dead zone (
DeadZoneAtrMult × ATR). This mutes small oscillations during quiet, range-bound conditions where the band alone might be thin. - Baseline trend gate: A slow baseline EMA (
TrendPeriod) defines the larger trend. The strategy only takes longs when price is above this EMA and only takes shorts when price is below it, so it avoids fighting the dominant direction.
The entry rules combine these conditions:
- Long signal: power is positive, power is greater than the band width, power exceeds the dead zone, and the closing price is above the baseline EMA.
- Short signal: power is negative, the absolute value of power is greater than the band width, that absolute value exceeds the dead zone, and the closing price is below the baseline EMA.
Exit and risk logic is handled in three ways:
- Stop-loss: Placed at
AtrSlMult × ATRaway from entry, so the stop distance adapts to current volatility rather than being a fixed pip value. - Take-profit: Placed at
AtrTpMult × ATRfrom entry, giving a volatility-scaled target. - Breakeven trail: Once an open position reaches
BeTriggerRmultiples of its initial risk (R) in profit, the stop is moved to the entry price. This is designed so that a reversal after a position has run in your favor costs comparatively little. - Opposite-power early exit: If a position is open and the power line surges in the opposite direction, the strategy closes the trade early rather than waiting for the stop. It never adds to (pyramids) an existing position.
A spread gate also blocks new entries whenever the current spread in points exceeds MaxSpreadPoints, which helps keep entries realistic during illiquid or news-driven conditions.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| FastPeriod | 20 | 5 | 40 | Fast EMA length used in the MACD power line. |
| SlowPeriod | 40 | 20 | 120 | Slow EMA length for the MACD power line (auto-nudged to always exceed FastPeriod). |
| BandPeriod | 20 | 10 | 50 | Lookback for the close standard deviation used in the Bollinger-width threshold band. |
| BandMult | 2.0 | 1.0 | 3.0 | Multiplier applied to standard deviation when building the volatility threshold band. |
| Sensitivity | 150 | 50 | 300 | Scales the small bar-to-bar MACD change up onto the price/band scale. |
| DeadZoneAtrMult | 0.15 | 0.0 | 1.0 | ATR multiple defining the chop-filtering dead zone power must also clear. |
| TrendPeriod | 100 | 20 | 250 | Length of the slow baseline EMA that gates trade direction. |
| AtrPeriod | 14 | 5 | 30 | Lookback for ATR used in risk sizing and the dead zone. |
| AtrSlMult | 1.5 | 0.5 | 4.0 | ATR multiple for stop-loss distance from entry. |
| AtrTpMult | 2.5 | 0.5 | 6.0 | ATR multiple for take-profit distance from entry. |
| BeTriggerR | 1.0 | 0.3 | 3.0 | Open profit (in R multiples) required before the stop moves to breakeven. |
| MaxSpreadPoints | 30 | 1 | 200 | Maximum allowed spread in points; wider spreads block new entries. |
| Lots | 0.10 | 0.01 | 1.0 | Fixed trade volume in lots. |
| Magic | 3771 | 0 | 9,999,999 | Unique identifier so the EA only manages its own trades. |

Recommended Chart Settings
Directional Power Expansion is single-timeframe and indicator-based, reading whatever timeframe the chart is set to at run time. The design is best suited to an intraday chart — for example, EUR/USD on the M15 (15-minute) or H1 (1-hour) timeframe, where momentum acceleration and volatility bands tend to behave more consistently. You are free to test it on other symbols and timeframes, but be aware that results will vary considerably across different instruments, sessions, and market conditions. Always evaluate behavior on a demo account before drawing any conclusions.
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
The strength of Directional Power Expansion lies in its layered filtering. By reading momentum acceleration instead of the raw MACD level, it responds to fresh thrusts rather than lagging trend states. The volatility band and ATR dead zone together adapt the entry threshold to current conditions, so the strategy naturally becomes more selective when the market is quiet. The baseline EMA gate keeps trades aligned with the broader direction, and the ATR-based stops, targets, and breakeven trail impose a consistent, volatility-aware risk framework.
That said, every approach has limitations. Momentum-acceleration systems can be whipsawed during choppy, directionless markets where brief thrusts fail to follow through — the dead zone and band filters reduce this but do not eliminate it. Because the strategy waits for confirmed expansion, it may enter after a portion of a move has already occurred, and sharp reversals can still touch the ATR stop before the breakeven trail activates. Sensitivity and band-multiplier settings interact in ways that require careful, honest testing; overly loose settings will over-trade, while overly tight settings may rarely fire at all. Ranging or low-volatility environments are where this style historically struggles most.
Risk Management Tips
Sound risk management matters far more than any single parameter setting. Consider the following general principles as part of your education:
- Position sizing: Keep trade size proportional to account equity rather than using a large fixed lot. The default
Lotsvalue of 0.10 may be far too large or too small for your account. - Per-trade risk: Many educational sources suggest risking no more than 1–2% of account equity on any single trade. Adjust
AtrSlMultandLotstogether so your worst-case loss stays within that range. - Use a demo account first: Test thoroughly in a risk-free simulated environment until you understand how the EA behaves across different sessions and market regimes.
- Understand drawdown: Even a well-designed strategy will experience losing streaks. Study the maximum drawdown you could tolerate emotionally and financially before committing real capital.
- Monitor conditions: Spread widening, news events, and rollover periods can all affect execution. The
MaxSpreadPointsgate helps, but manual awareness remains essential.
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: DirectionalPowerExpansion.ex5 (18 downloads)
- Source Code: DirectionalPowerExpansion.mq5 (19 downloads)
- Documentation: DirectionalPowerExpansion.pdf (19 downloads)