Exp_CorrectedAverage
This EA implements a breakout trading system based on the CorrectedAverage custom moving average indicator. It enters long when price breaks above the moving average by a specified level, and enters short when price breaks below. Positions are managed with fixed stop loss and take profit levels, with optional permissions for buy/sell entry and exit.
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
This EA implements a breakout strategy based on the CorrectedAverage custom moving average indicator. The core concept is to confirm a trend initiation when price deviates from the moving average by a specified breakthrough level (Level points) and enter accordingly. Entry conditions: a buy signal triggers when the current bar's close exceeds the indicator value plus the breakthrough level, with the previous bar's close at or below that threshold to confirm a fresh breakout rather than a continued deviation; sell conditions are symmetrical. Exit conditions include fixed stop loss and take profit levels in points, plus counter-signal exits — a buy signal closes short positions if permitted, and a sell signal closes long positions if permitted. Position sizing is controlled by the MM parameter: negative values represent fixed lot sizes, while positive values represent a share of the deposit. Money management relies on the TradeAlgorithms.mqh library functions for execution. The strategy only checks for signals on new bar formation (unless SignalBar=0), preventing duplicate trades, and uses a Recount mechanism to retry data fetching on failure.
Strengths
- Clear strategy logic based on moving average breakout — simple, effective, easy to understand and optimize
- Independent buy/sell entry and exit permission controls provide high flexibility to adapt to different market views
- New bar detection mechanism prevents duplicate trades within the same bar, reducing overtrading risk
- Complete stop loss and take profit parameters combined with counter-signal exits provide multiple exit protections
- Recount mechanism ensures signals are not lost on data fetch failures, enhancing data reliability
Weaknesses
- Lacks dynamic stop loss/take profit adjustment — fixed-point stops may be inflexible when volatility changes
- No trading session or market volatility filter, potentially generating unfavorable trades during low liquidity or high volatility periods
- No spread filter, so on high-spread instruments the breakout signal may be consumed by the spread
- The MM parameter's dual meaning (negative=lot, positive=share) is unintuitive and prone to user misconfiguration
- Depends on the external custom CorrectedAverage indicator and TradeAlgorithms.mqh library, reducing independence and requiring these dependencies at deployment
Possible improvements
- Add ATR-based or volatility-adaptive stop loss/take profit instead of fixed points, enabling dynamic risk management that adjusts to market volatility
- Add spread filter and trading session filter to avoid entries during high spread or low liquidity periods
- Add a trailing stop feature to lock in floating profits when the trend continues
Risk assessment
Overall risk: Medium
- Fixed stop loss/take profit does not adapt to market volatility changes — stops may be too tight or targets too wide during volatile moves
- No spread filter means breakout signals may be invalid in high-spread environments
- The MM parameter's negative=lot logic is prone to misoperation — accidentally setting a positive value could result in oversized positions
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | -0.1 | Money management ratio or fixed lot |
StopLoss_ | 1000 | Stop loss (points) |
TakeProfit_ | 2000 | Take profit (points) |
Deviation_ | 10 | Maximum allowed slippage |
BuyPosOpen | true | Open long on bullish divergence signal |
SellPosOpen | true | Open short on bearish divergence signal |
BuyPosClose | true | Close long on bearish divergence signal |
SellPosClose | true | Close short on bullish divergence signal |
InpInd_Timeframe | PERIOD_H4 | Indicator timeframe |
MA_Method | MODE_SMA | MA averaging method (SMA/EMA/SMMA/LWMA) |
Length | 12 | MA smoothing depth/period |
Applied_price | PRICE_CLOSE | Price type applied to indicator |
Level | 300 | Breakout level (points) |
SignalBar | 1 | Bar index for entry signal |
Similar Breakout EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.