Exp_DecEMA
This EA trades based on the DecEMA (Decimal EMA) custom indicator, opening buy positions when the DecEMA value turns upward and sell positions when it turns downward. It uses a crossover of three consecutive DecEMA buffer values to detect trend direction changes and applies configurable money management for position sizing with fixed stop loss and take profit levels.
Open the interactive view (equity curve, symbol switch)Key facts
Backtest results (H1, about 1 year)
Not backtested yet — this EA could not be converted automatically.
Strategy analysis
The core concept of this strategy is to capture trend reversals using directional changes in the DecEMA indicator. Entry conditions are: when Value[1]<Value[2] (indicator declining) and Value[0]>Value[1] (current value rising), an uptrend is detected and a buy position is opened; when Value[1]>Value[2] (indicator rising) and Value[0]<Value[1] (current value falling), a downtrend is detected and a sell position is opened. Exit conditions rely on fixed stop loss (1000 points) and take profit (2000 points), and when a reverse signal appears, the opposing position is closed before opening a new one. Position sizing is controlled through the MM parameter and MMMode enumeration, supporting five modes: free margin percentage, balance percentage, loss-free margin percentage, loss-balance percentage, and fixed lot size. Money management uses standardized functions from the TradeAlgorithms.mqh library to execute open and close operations, ensuring consistency in trading logic. The strategy defaults to H8 timeframe and uses SignalBar=1, meaning signals are based on the last closed bar to avoid signal flickering from incomplete bars.
Strengths
- Uses custom DecEMA indicator with better smoothing than standard EMA, reducing false signals
- Provides five position sizing modes for flexible money management
- Complete stop loss and take profit configuration with clear risk control parameters
- Independent on/off switches for buy/sell opening and closing offer high flexibility
- Uses SignalBar=1 based on closed bar signals, preventing signal flickering
Weaknesses
- Default stop loss of 1000 points and take profit of 2000 points are excessively large, creating huge risk exposure on most instruments
- No position count check, potentially allowing multiple same-direction positions leading to overexposure
- Lacks spread filter and trading session filter, may execute at unfavorable prices during high-spread periods
- Depends on external custom indicator DecEMA and two include library files, increasing deployment complexity
- No drawdown protection mechanism; no slowdown or pause logic during consecutive losses
Possible improvements
- Add maximum position count limit and same-direction position check to prevent overexposure
- Add spread filter and trading session filter to avoid opening positions under unfavorable conditions
- Add drawdown protection mechanism to pause trading when account drawdown exceeds a threshold
Risk assessment
Overall risk: Caution
- Default 1000-point stop loss is very large, a single loss could represent a significant portion of the account
- No position count check creates risk of overexposure from multiple same-direction positions
- Lack of spread filter may cause additional slippage losses during high-spread periods
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Money management scaling coefficient |
MMMode | LOT | Lot sizing mode (Balance/Equity/Free Margin/Fixed Lot) |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum allowed slippage |
BuyPosOpen | true | Allow buy position opening |
SellPosOpen | true | Allow sell position opening |
BuyPosClose | true | Allow buy position closing |
SellPosClose | true | Allow sell position closing |
InpInd_Timeframe | PERIOD_H8 | Indicator calculation timeframe |
EMA_Period | 3 | EMA period |
ELength | 15 | Smoothing length parameter |
IPC | PRICE_CLOSE | Applied price type |
SignalBar | 1 | Signal bar index (0=current bar, 1=last closed bar) |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.