EA-13589 · Trend Following

Exp_EMA_Prediction

This EA trades based on signals from the custom EMA_Prediction indicator, which uses two EMAs (fast and slow) to predict price direction. It opens buy positions on upward prediction signals and sell positions on downward prediction signals, with configurable stop loss, take profit, and position closing logic. The EA supports multiple money management modes and allows independent control of entry and exit for both long and short positions.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Rating★★☆☆☆
TypeTrading EA
TimeframesH1, H4, H6, D1
IndicatorsEMA, EMA_Prediction
Author—

Backtest results (H1, about 1 year)

Not backtested yet — this EA could not be converted automatically.

Strategy analysis

The core strategy of this EA is a trend-following system based on the EMA_Prediction indicator. Entry conditions: a buy position is opened when the indicator's upward signal line (buffer 1) produces a non-zero, non-empty value on the specified signal bar; a sell position is opened when the downward signal line (buffer 0) produces a non-zero, non-empty value. Exit conditions: positions are closed when the indicator produces a reverse signal on historical bars, and also through fixed StopLoss and TakeProfit parameters. Position sizing is controlled by the MM parameter, supporting five modes: by free margin, by balance, by free margin after losses, by balance after losses, and fixed lot size. The EA implements a new bar detection mechanism to prevent repeated entries within the same bar, and allows per-tick signal checking when the signal bar is set to zero. When both entry and exit are enabled and no current close signal exists, the EA backtracks through historical bars to find earlier reverse signals for closing decisions.

Strengths

  • Supports multiple money management modes with high flexibility to accommodate different risk preferences
  • Buy and sell entry/exit can be independently controlled, facilitating strategy optimization and directional bias filtering
  • Implements new bar detection mechanism to prevent repeated entries within the same candle, reducing overtrading
  • Complete stop loss and take profit parameters provide a fundamentally sound risk control framework
  • Signal recount mechanism (Recount flag) improves fault tolerance for indicator data reading

Weaknesses

  • Fast EMA period of 1 and slow EMA period of 2 are extremely small, likely generating excessive false signals and overtrading
  • Historical bar backtracking exit logic is inefficient, potentially iterating through large amounts of data and delivering delayed close signals
  • Lacks spread filter, trading session restrictions, and maximum position count controls as risk management measures
  • Depends on the custom EMA_Prediction indicator which must be separately compiled and deployed, increasing maintenance complexity
  • No trailing stop or breakeven functionality, meaning profitable positions may lose most gains during pullbacks

Possible improvements

  • Add spread filter and trading session restrictions to avoid entries during high spread or low liquidity periods
  • Optimize historical bar backtracking exit logic by limiting lookback depth or replacing with ATR-based dynamic stops
  • Add trailing stop and breakeven functionality to better protect unrealized profits
  • Recommend adjusting default EMA periods to more reasonable values (e.g., 8 and 21) to reduce false signals

Risk assessment

Overall risk: Medium

  • EMA periods of 1 and 2 generate extremely frequent signals, potentially causing overtrading and high transaction costs
  • Historical bar backtracking exit logic may delay position closing during strong trends, leading to unnecessary losses
  • Lack of spread filter may result in immediate losses when opening positions during high spread periods

Evaluation scores

Code quality3.0
Strategy logic2.0
Risk management3.0
Robustness3.0
Innovation2.0
Documentation1.0
Overall2.3

Parameters

ParameterDefaultDescription
MM0.1Money management ratio controlling risk per trade
MMModeLOTLot mode: Free margin/Balance/Balance after loss/Fixed lot
StopLoss_1000Stop loss in points
TakeProfit_2000Take profit in points
Deviation_10Maximum allowed slippage
BuyPosOpentrueAllow opening long positions
SellPosOpentrueAllow opening short positions
BuyPosClosetrueAllow closing long positions
SellPosClosetrueAllow closing short positions
InpInd_TimeframePERIOD_H6Indicator calculation timeframe
FastMAPeriod1Fast EMA period
FastMATypeMODE_EMAFast MA calculation method
FastMAPricePRICE_CLOSEFast MA applied price
SlowMAPeriod2Slow EMA period
SlowMATypeMODE_EMASlow MA calculation method
SlowMAPricePRICE_CLOSEApplied price for slow MA
SignalBar1Bar index for trade signal

Similar Trend Following EAs

Backtests are historical simulations and do not guarantee future results. Not financial advice.

Get the weekly Arena report

One email a week: ranking changes, new signals and new research. No spam; unsubscribe any time.