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 Predictability Emergence Trend strategy is a trend-following approach built around Approximate Entropy (ApEn), a complexity statistic introduced by Steven Pincus in 1991 that measures how regular or self-similar a short window of price action is. Instead of reacting to a moving-average cross or a candlestick pattern, this strategy tries to detect the precise moment when a noisy, directionless market begins to organise itself into a structured, tradable move — in other words, when price becomes predictable.
The core idea is simple to state. Approximate Entropy is high when short price patterns rarely repeat, which is the signature of a random, choppy market. It is low when those patterns recur reliably, which is the signature of an organised market — either a clean directional glide or a smooth wave. By z-scoring (standardising) the closes inside the measurement window before the entropy is calculated, the statistic becomes scale-free: it ignores the symbol's price level and volatility and responds only to the shape of recent price action. The strategy watches for the entropy to collapse through a threshold, which historically corresponds to chaos giving way to structure.
As a learning tool, this strategy is well suited to traders who want to move beyond conventional indicators and explore how information-theory and complexity measures can be applied to financial time series. It is a regime-emergence strategy rather than a level-based or pattern-based one, and it pairs the entropy signal with a conventional drift filter and disciplined risk controls. It is not a shortcut to results, and it should be studied and tested rather than deployed blindly.
How It Works
The strategy makes one trading decision per completed bar and manages any open position on every tick. Here is the full logic in plain English.
Entry conditions — the strategy signals a trade when:
- Entropy collapse (the trigger): Approximate Entropy is computed on a window of z-scored closes. A signal is armed only on a fresh down-cross — the ApEn value was at or above the
EntropyThresholdon the previous bar and has dipped below it on the current bar. This "was above, now below" rule means the strategy fires once at the transition and does not re-fire while entropy stays low. - Direction from drift: Once the collapse is detected, direction comes from the prevailing drift in the window, measured as a least-squares regression slope of recent closes.
- Baseline confirmation: The slope must agree with price relative to a baseline Exponential Moving Average (EMA). For a long, the slope must be positive and the last close must be above the baseline EMA. For a short, the slope must be negative and the last close must be below the baseline EMA. If the two directional tests disagree (no clean, one-sided drift), the strategy stands aside.
- One position at a time: A new trade is only opened when the account is flat for the strategy's magic number, so there is never stacking or averaging in.
Stop-loss logic:
- The initial stop is a compact, volatility-based distance:
AtrStopMult × ATR(Average True Range). Entering right as structure forms means the stop can sit close behind the move.
Take-profit logic:
- The take-profit is placed at a reward-to-risk multiple of the stop distance:
RewardRiskRatio × (AtrStopMult × ATR). With the defaults, that targets roughly 2.2 units of reward for every 1 unit of risk.
Trade management (runs on every tick):
- Breakeven lock: Once price advances by
BreakevenAtr × ATRin the trade's favour, the stop is moved to just past the entry price (locking a small amount), removing most of the initial risk. - ATR trail: After the breakeven lock is earned, an ATR-based trailing stop follows price at a distance of
TrailAtr × ATR. The stop only ever tightens — it never loosens — so profits are protected as the move extends and losers are typically cut near scratch.
This combination of a single, fresh entry, a tight initial stop, an early breakeven lock, and a one-way trail reflects the strategy's stated low-drawdown design goal (around a 1% target).

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| EntropyWindow | 30 | 16 | 60 | Number of bars of z-scored closes fed to the Approximate Entropy estimator. Larger windows smooth the entropy signal; smaller windows react faster. |
| EmbedTolerance | 0.20 | 0.10 | 0.50 | The match tolerance r, in standard-deviation units. It defines how close two template patterns must be to count as a recurrence. |
| EntropyThreshold | 0.55 | 0.20 | 1.20 | The ApEn level whose down-cross flags the chaos-to-structure transition. Lower values demand more organisation before a signal. |
| SlopePeriod | 12 | 5 | 30 | Number of bars used for both the least-squares drift slope and the baseline EMA. |
| AtrPeriod | 14 | 5 | 40 | Lookback period for the Average True Range used in stop, target, breakeven, and trail calculations. |
| AtrStopMult | 1.6 | 0.5 | 4.0 | Stop distance as a multiple of ATR. Kept tight to support the low-drawdown design. |
| RewardRiskRatio | 2.2 | 1.0 | 5.0 | Take-profit distance as a multiple of the stop distance (the reward-to-risk ratio). |
| BreakevenAtr | 1.0 | 0.3 | 3.0 | The advance, in ATR units, that price must make before the stop is locked to breakeven. |
| TrailAtr | 1.4 | 0.5 | 4.0 | The ATR trailing distance applied once the position is past breakeven. |
| Lots | 0.10 | 0.01 | 1.0 | Fixed trade size in lots. |

Recommended Chart Settings
The strategy is designed to run on a single timeframe — whatever timeframe the chart is set to at test time — and it is not locked to any particular market. Its suggested home is a liquid FX major such as EURUSD on the M15 to H1 timeframes, where spreads are tight and price action produces the kind of noise-to-trend transitions the entropy engine is built to detect.
Because Approximate Entropy is scale-free (thanks to the z-scoring), the strategy can be studied on other symbols and timeframes as well. Keep in mind that results will vary considerably across different instruments, sessions, and market conditions, so any change of symbol or timeframe should be re-tested from scratch.
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 of this approach. The strategy's biggest conceptual strength is that it does not rely on a fixed price level or a single candle. Approximate Entropy is a genuinely different lens — it measures the organisation of price rather than its direction — so it can flag emerging trends that lag-based indicators miss until later. The z-scoring makes the signal comparable across symbols and volatility regimes, and the layered risk controls (tight stop, breakeven lock, one-way trail) are designed to keep individual losses small.
Known limitations. Approximate Entropy is computationally intensive and sensitive to its parameters: the window length, the tolerance r, and the threshold all interact, and a value that works on one market may not transfer to another. Entropy collapses can also occur before smooth reversals or continuation patterns, not only clean trends, so the drift and EMA filters are essential — but no filter is perfect, and false transitions will occur.
Conditions where it may underperform. Like most trend-emergence systems, this approach can struggle in persistently choppy, low-volatility ranges where entropy hovers near the threshold and produces marginal or whipsawing signals. Sudden volatility spikes or news-driven gaps can also blow through a tight ATR stop before the trade has room to work. The strategy historically performs best when a genuine directional move follows the entropy collapse; when it does not, the compact stop is designed to limit the damage rather than avoid the loss entirely.
Risk Management Tips
Regardless of how a strategy is designed, sound risk management is what keeps a trading account intact while you learn. Consider the following general principles:
- Risk a small, fixed fraction per trade. A common guideline is to risk no more than 1–2% of account equity on any single position. Size your lots so that the distance to your stop-loss represents that fraction, rather than trading a fixed lot size blindly.
- Test on a demo account first. Run the EA on a demo or paper account across a variety of market conditions before considering any live use. This lets you observe how the entropy signal behaves in real time without financial exposure.
- Understand drawdown. Even a well-designed strategy will experience losing streaks. Study the maximum drawdown in your own testing and be honest about whether you could tolerate it emotionally and financially.
- Never over-leverage. Leverage magnifies both gains and losses. Use it conservatively, and remember that a low-drawdown design goal is a target, not a guarantee.
- Keep records and review. Log your trades and periodically review whether the strategy's assumptions still hold in the current market.
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: PredictabilityEmergenceTrend.ex5 (26 downloads)
- Source Code: PredictabilityEmergenceTrend.mq5 (24 downloads)
- Documentation: PredictabilityEmergenceTrend.pdf (25 downloads)