Exp_MACD-2
This EA trades based on the MACD-2 custom indicator with three trend detection modes: histogram direction change, cloud crossover, and MACD zero-line crossover. It opens buy/sell positions and closes opposite positions when the selected trend signal triggers, using configurable lot sizing, stop loss, and take profit.
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 strategy concept revolves around three trend detection modes of the MACD-2 custom indicator: histogram mode detects momentum turning points by checking whether MACD histogram values are increasing or decreasing; cloud mode identifies trend shifts through crossovers of the indicator's upper and lower bands; zero-line mode determines bullish/bearish transitions by detecting MACD value crossing the zero axis. For entry conditions, in histogram mode, a buy signal triggers when the histogram shifts from declining to rising, and a sell signal triggers when it shifts from rising to declining; in cloud mode, crossovers of the Up and Dn buffers signal entries; in zero-line mode, MACD crossing above zero triggers buys and crossing below zero triggers sells. Exit conditions rely on fixed stop loss and take profit values, plus closing opposite positions when a reverse signal occurs, with no trailing stop or dynamic profit-taking mechanism. Position sizing supports five modes via the MarginMode enum: percentage of free margin, percentage of balance, percentage of net free margin, percentage of net balance, and fixed lot size. Money management is controlled by the MM parameter for risk ratio or fixed lot size, but lacks volatility-based dynamic position adjustment.
Strengths
- Offers three trend detection modes for flexibility across different market conditions
- Supports multiple money management modes allowing users to choose based on risk preference
- New bar detection mechanism prevents repeated trading on the same bar
- Buy and sell directions can be independently enabled or disabled for flexible strategy configuration
- Configurable stop loss and take profit parameters provide basic risk control
Weaknesses
- Depends on the custom MACD-2 indicator file; missing indicator causes EA failure
- Lacks trailing stop or dynamic take-profit mechanism, profitable positions may give back significant gains
- No spread filter, which may produce false signals on high-spread instruments
- No position count check, potentially opening multiple positions in the same direction
- Default stop loss of 1000 points and take profit of 2000 points may be too wide for some instruments
- Lacks volatility-adaptive (e.g., ATR-based) position sizing
Possible improvements
- Add trailing stop functionality to protect profits and let winning positions run
- Add a spread filter to avoid opening positions when spread is excessively wide
- Add position count check to prevent duplicate entries in the same direction
- Use ATR for dynamic stop loss and take profit adjustment to adapt to different instruments' volatility
- Add indicator data validity checks and more robust error recovery mechanisms
Risk assessment
Overall risk: Medium
- No position count check may lead to excessive risk exposure from duplicate same-direction entries
- Dependency on external custom indicator with no fallback handling when indicator fails to load
- No spread filter; widening spreads during high-volatility periods may cause slippage losses
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Money management ratio or lot size |
MMMode | LOT | Lot mode (fixed/balance/equity/free margin/margin drawdown) |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum allowed slippage |
BuyPosOpen | true | Allow opening long positions |
SellPosOpen | true | Allow opening short positions |
BuyPosClose | true | Close long on reverse signal |
SellPosClose | true | Close short on reverse signal |
InpInd_Timeframe | PERIOD_H4 | Indicator operating timeframe |
TrendMode | CLOUD | Trend determination mode (histogram/cloud/zero line) |
FastMACD | 12 | MACD fast line period |
SlowMACD | 26 | MACD slow line period |
SignalMACD | 9 | MACD signal line period |
PriceMACD | PRICE_CLOSE | MACD applied price type |
SignalBar | 1 | Signal bar index (0=current, 1=last closed bar) |
Similar Momentum EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.