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 Directional Energy Asymmetry strategy is a fully automated MetaTrader 5 Expert Advisor (EA) built around a single custom volume-and-price "energy" indicator, and it belongs to the trend-participation style of trading rather than the classic indicator-crossover school. Instead of relying on moving averages, RSI, or chart patterns, it derives everything it needs from raw OHLCV data — the Open, High, Low, Close, and tick volume of each completed candle. The core idea is to measure not just where price moved, but with how much force it moved there.
To do this, the strategy borrows a concept from physics. It treats each bar as a physical impulse, assigning it a "mass" equal to its tick volume (the number of price changes in that bar) and a "velocity" equal to its signed body move (Close minus Open). Following the kinetic-energy formula, each bar is given an energy value of mass multiplied by velocity squared. Over a rolling window, this energy is pooled into an "up reservoir" and a "down reservoir," and the imbalance between the two produces an asymmetry score. A persistent surplus of energy on one side is interpreted as conviction that may lead price — a hypothesis the strategy is designed to test and act upon.
This EA is best understood as a learning tool for traders curious about volume-weighted momentum concepts and self-adapting signal design. It is designed for trending or impulsive market conditions where one side of the order flow dominates. Because it standardizes its own signal against recent behavior, it suits students who want to study how an adaptive threshold system behaves across different symbols and volatility regimes, rather than anyone seeking a fixed, set-and-forget system.
How It Works
The strategy processes only closed bars — it acts once per completed candle, ignoring the still-forming bar — and it builds a running series of asymmetry values that it continuously re-standardizes. Here is the logic in plain English:
- Energy calculation: For each of the last
EnergyWindowbars, the strategy computes an energy value equal to tick volume multiplied by the squared body move (Close − Open). Up-closing bars add to the up reservoir; down-closing bars add to the down reservoir. - Asymmetry score (A): The strategy calculates A = (E_up − E_dn) / (E_up + E_dn), which always falls between −1 and +1. A value near +1 means nearly all recent energy came from up-bars; near −1 means it came from down-bars.
- Self-adaptation (S): Because a raw A value is not comparable across symbols or timeframes, the strategy converts it into a z-score. It takes the mean and standard deviation of the A-series over the last
AdaptLookbackbars and measures how many standard deviations the current A sits away from its own recent average. This adaptive signal, S, is expressed in "sigma units" and retunes itself automatically as the energy distribution widens or narrows. - Long entry: The strategy signals a long (buy) when S rises to or above
EntryThreshold— energy is skewed up beyond its normal range. - Short entry: The strategy signals a short (sell) when S falls to or below the negative of
EntryThreshold— energy is skewed down beyond its normal range. - Exit on rebalance: An open position is closed when the absolute value of S falls to or below
ExitBand, meaning the energy reservoirs have re-balanced and the measured edge is considered spent. - Exit on reversal: A position is also closed if an entry-grade signal appears on the opposite side (for example, a long position closes if S drops to or below the short threshold).
- Stop-loss logic: Risk is volatility-scaled using the Average True Range (ATR), a common measure of recent price range. The stop distance is set to
AtrMultmultiplied by the ATR value, so stops widen in volatile markets and tighten in calm ones. - Take-profit logic: The take-profit distance is the stop distance multiplied by
RewardRatio, giving a dynamic profit target that scales with volatility rather than a fixed pip amount.
Only one position per magic number is held at a time. Once a trade is open, the strategy either closes it on a rebalance or opposite signal, or otherwise lets the stop-loss and take-profit levels run their course.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| EnergyWindow | 20 | 6 | 60 | Number of bars pooled into the up/down energy reservoirs. Smaller values react faster; larger values smooth the signal. |
| AdaptLookback | 120 | 40 | 300 | Lookback used to compute the running z-score of the asymmetry series. Controls how the adaptive threshold self-calibrates. |
| EntryThreshold | 1.2 | 0.5 | 3.0 | The signal strength (in standard-deviation units) required to open a trade. Higher values demand stronger, rarer imbalances. |
| ExitBand | 0.3 | 0.0 | 1.5 | The absolute S value at or below which an open position is closed because the reservoirs have re-balanced. |
| AtrPeriod | 14 | 7 | 40 | Number of bars used to calculate the ATR that scales the stop-loss and take-profit. |
| AtrMult | 2.0 | 0.5 | 4.0 | Multiplier applied to ATR to set the stop-loss distance. Larger values give wider stops. |
| RewardRatio | 1.6 | 0.5 | 5.0 | Ratio of take-profit distance to stop distance. A value of 1.6 targets 1.6 units of reward per unit of risk. |
| Lots | 0.10 | 0.01 | 1.0 | Fixed trade size in lots. Should be adjusted to your account size and risk tolerance. |

Recommended Chart Settings
This strategy was designed to run on a single symbol and the chart's primary timeframe — it does not reference any higher or lower timeframe. Because its signal is derived from tick volume, it tends to be studied on liquid instruments such as major forex pairs or index CFDs, where tick-volume data is reasonably representative of activity. A common starting point for evaluation is a mid-range timeframe such as the H1 (one-hour) chart, which produces enough closed bars to fill the adaptive lookback within a reasonable period while avoiding the noise of very low timeframes. Keep in mind that results will vary considerably across different symbols, brokers, and market conditions, and that the ideal timeframe should be established through your own testing rather than assumed.
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 chief strength of the Directional Energy Asymmetry approach is its originality and its self-adapting design. By weighting body moves by volume and squaring them, it emphasizes high-conviction bars over quiet drift, which can distinguish a genuine impulse from a low-energy grind. Because the entry and exit thresholds are expressed in adaptive standard-deviation units rather than fixed pips, the model attempts to retune itself as volatility expands and contracts, which can help it remain coherent across changing regimes without manual re-optimization.
There are important limitations to understand. Tick volume in the retail forex market is a proxy for real traded volume, not actual exchange volume, so the "mass" term reflects broker-side activity and may differ between brokers. The strategy assumes that a persistent energy surplus leads price — a hypothesis that will not hold in every market. In choppy, range-bound, or news-driven conditions, the asymmetry signal can whipsaw, producing entries that reverse before the target is reached. Squaring the velocity term also makes the score sensitive to a few outlier bars, which can distort the reservoirs after a spike. Finally, because it trades one position at a time and waits for the reservoirs to rebalance, it may hold through drawdown or exit early relative to a trader's expectations. Treat it as an instrument for studying adaptive signal behavior, not as a finished solution.
Risk Management Tips
Sound risk management matters far more than any single signal. Consider the following general principles as you study this or any EA:
- Position sizing: Size trades so that a losing streak cannot threaten your account. Many educational sources suggest risking no more than 1–2% of account equity on any single trade.
- Use a demo account first: Run the strategy on a demo or paper account for an extended period so you can observe its behavior across different conditions before ever committing real capital.
- Understand drawdown: Every strategy experiences losing periods. Study the depth and duration of drawdowns you can tolerate emotionally and financially before you begin.
- Test across conditions: Evaluate the strategy across multiple symbols, timeframes, and market phases — trending, ranging, and volatile — rather than judging it on a single favorable stretch.
- Keep leverage modest: High leverage magnifies both gains and losses. Conservative leverage gives your account room to survive adverse sequences.
- Review regularly: Markets evolve. Periodically re-examine whether the strategy's assumptions still hold rather than leaving it unattended indefinitely.
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: DirectionalEnergyAsymmetry.ex5 (0 downloads)
- Source Code: DirectionalEnergyAsymmetry.mq5 (0 downloads)
- Documentation: DirectionalEnergyAsymmetry.pdf (0 downloads)