Exp_ColorXdinMA
This EA trades based on the ColorXdinMA custom indicator, which is a dual-length smoothing average that changes color based on trend direction. It opens buy positions when the indicator turns upward and sell positions when it turns downward, with configurable stop loss, take profit, and money management options.
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 is based on trend direction changes of the ColorXdinMA indicator, which uses two different period smoothing algorithms (main and plus periods) to generate trend signals. Entry conditions: a buy position opens when the indicator values show a downtrend on older bars (Value[1]<Value[2]) and the latest value reverses upward (Value[0]>Value[1]); a sell position opens when the indicator values show an uptrend on older bars (Value[1]>Value[2]) and the latest value reverses downward (Value[0]<Value[1]). Exit conditions rely on fixed stop loss (default 1000 points) and take profit (default 2000 points), and also support closing via signal reversal (BuyPosClose/SellPosClose). Position sizing supports multiple modes: based on free margin, balance, free margin after losses, balance after losses, or fixed lot size. Money management is controlled through the MM parameter and MMMode enumeration to manage the risk ratio per trade. The strategy also includes a new bar detection mechanism to avoid duplicate signals, and history data loading to ensure complete indicator calculation.
Strengths
- Supports 10 smoothing algorithms (SMA/EMA/JJMA/JurX/ParMA/T3/VIDYA/AMA etc.), flexibly adapting to different market conditions
- Built-in new bar detection mechanism (CIsNewBar) effectively prevents duplicate entries on the same signal
- Independent control of open and close signals, allowing separate enable/disable of buy/sell opening and closing
- Multiple money management modes available to satisfy different risk preferences
- Default stop loss to take profit ratio of 1:2 provides a positive expectancy risk-reward ratio
Weaknesses
- Default stop loss of 1000 points and take profit of 2000 points are excessively large, potentially leading to significant per-trade losses
- No spread filter mechanism, trades can be opened during high spread periods, increasing trading costs
- No position check logic, potentially leading to repeated entries and stacked positions in the same direction
- Depends on external custom indicator ColorXdinMA and include files, creating higher deployment dependencies
- SignalBar defaults to 1 but allows 0, creating ambiguous logic when SignalBar=0
Possible improvements
- Add a spread filter mechanism to prevent opening positions when spread exceeds a threshold, reducing trading costs
- Add position check logic to avoid repeated entries in the same direction that lead to excessive position stacking
- Optimize default stop loss/take profit values or introduce ATR-based dynamic stops to adapt to different instrument volatilities
Risk assessment
Overall risk: Medium
- No position direction check, potentially allowing repeated entries in the same direction leading to excessive risk exposure
- Default 1000-point stop loss is large, potentially causing single-trade losses exceeding account tolerance under high leverage
- No spread filter, trades still execute when spreads widen during high volatility periods
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Risk percentage or lot size |
MMMode | LOT | Money management mode |
StopLoss_ | 1000 | StopLoss in points |
TakeProfit_ | 2000 | TakeProfit in points |
Deviation_ | 10 | Maximum allowable slippage |
BuyPosOpen | true | Allow buy to open position |
SellPosOpen | true | Allow sell to open position |
BuyPosClose | true | Allow buy to close position |
SellPosClose | true | Allow sell to close position |
InpInd_Timeframe | PERIOD_H6 | Indicator calculation timeframe |
MA_Method1 | MODE_SMA | Smoothing algorithm type (SMA/EMA/JJMA etc.) |
Length_main | 10 | Main MA period |
Length_plus | 20 | Auxiliary MA period |
PhaseX | 15 | Smoothing algorithm phase parameter |
IPC | PRICE_CLOSE | Price type used for indicator calculation |
SignalBar | 1 | Bar index for signal retrieval |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.