Exp_Directed_Movement_Candle
This EA trades based on the Directed_Movement_Candle custom indicator, which uses a dual-smoothed RSI approach to determine directional momentum. It opens buy positions when the indicator signals bullish momentum (color value 2) and sell positions when it signals bearish momentum (color value 0), with configurable stop loss and take profit levels. The EA uses a new bar detection mechanism to avoid redundant signal processing and supports both trade opening and closing based on indicator signals.
Open the interactive view (equity curve, symbol switch)Key facts
Backtest results (H1, about 1 year)
| Symbol | P&L | Annual | Max DD | Trades | Win rate | Sharpe | Recovery | Losing streak | Per trade | Status |
|---|---|---|---|---|---|---|---|---|---|---|
| EURUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| GBPUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| USDJPY | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| XAUUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
Why this EA never traded: no entry rule survived the conversion.
Converted from MQL5 to Python and run with the same rules for every EA. Positions use MT5 lot sizes (100,000 units per FX lot, 100 oz per gold lot) with 1:100 leverage, one order at a time, and a stop-out below 10% of the starting balance. Sharpe is computed from the equity curve. Results marked as unreliable are shown for completeness only.
Blow-up risk: No blow-up pattern found
None of the usual blow-up patterns were found in the code, and the account was not stopped out in our backtests. That is not a guarantee: any EA can lose money.
High: stopped out in our backtest, or martingale/grid sizing without a stop loss. Elevated: martingale or grid sizing with a stop loss, or several positions at once without a stop loss. What the label means and what we found →
Strategy analysis
The strategy concept is based on the Directed_Movement_Candle indicator, which internally uses RSI processed through two different smoothing algorithms to determine directional market momentum. Entry conditions are: open a buy position when indicator buffer 4's current value is 2 (bullish) and the previous bar's value is less than 2; open a sell position when the current value is 0 (bearish) and the previous bar's value is greater than 0. Exit conditions include: active position closing when the indicator signal reverses (close buy when signal turns bearish, close sell when signal turns bullish), plus fixed stop loss at 1000 points and take profit at 2000 points. Position sizing is controlled via the MM parameter, supporting either fixed lots or dynamic lot sizing based on margin percentage. Money management uses the MarginMode enumeration to select lot calculation method, with a default 0.1 margin ratio being relatively conservative. The strategy allows users to independently control buy and sell opening and closing switches, providing flexible trading direction configuration.
Strengths
- Dual-smoothed RSI indicator design reduces false signals, double filtering improves signal reliability
- Independent configurable switches for opening and closing allow directional-only trading or signal-based closing only
- New bar detection mechanism prevents repeated position opening within the same bar, reducing overtrading risk
- Both stop loss and take profit are set, providing a basic risk control framework
- Error checking and handling when indicator fails to load, relatively robust initialization
Weaknesses
- Fixed stop loss of 1000 points and take profit of 2000 points are excessively large, posing extreme risk on most instruments
- No spread filter, though less impactful on H4, slippage can still affect trades during low liquidity
- No position check logic, may repeatedly open positions in the same direction when already holding
- HighLevel/MiddleLevel/LowLevel parameters are declared but unused in trading logic, making them dead parameters
- Depends on external custom indicator Directed_Movement_Candle, EA cannot run if indicator is not installed and error messaging is insufficient
Possible improvements
- Add position check logic to avoid repeated opening in the same direction which leads to overexposure
- Change stop loss and take profit to ATR-based dynamic calculation to adapt to different instruments' volatility characteristics
- Remove unused parameters like HighLevel/MiddleLevel/LowLevel, or integrate them into actual trading logic
- Add spread filter and maximum position count limit to improve risk control capability
Risk assessment
Overall risk: Medium
- Fixed 1000-point stop loss is excessively large and may cause significant losses on volatile instruments
- Lack of position check may lead to repeated same-direction openings and over-concentrated exposure
- Dependency on external custom indicator means missing or mismatched indicator files will prevent EA from trading properly
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Money management ratio parameter, controls position sizing |
MMMode | LOT | Position sizing mode: free margin/balance/post-loss free margin/post-loss balance/fixed lot |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum allowed slippage |
BuyPosOpen | true | Buy open signal mode: dot signal/direction signal/disabled |
SellPosOpen | true | Sell open signal mode: dot signal/direction signal/disabled |
BuyPosClose | true | Enable buy position close signal |
SellPosClose | true | Enable sell position close signal |
InpInd_Timeframe | PERIOD_H4 | Indicator timeframe |
SignalBar | 1 | Bar index used to retrieve trading signal |
Mode | MODE_SECOND | RSI smoothing mode selection (first or second) |
RSIPeriod | 14 | RSI period length |
MA_Method1 | MODE_SMA_ | First smoothing method |
Length1 | 12 | First level smoothing period length |
Phase1 | 15 | First smoothing phase parameter |
MA_Method2 | MODE_JJMA | Second smoothing method |
Length2 | 5 | Second level smoothing period length |
Phase2 | 15 | Second smoothing phase parameter |
Shift | 0 | Indicator offset |
HighLevel | 70 | Overbought level line |
MiddleLevel | 50 | Middle axis level line |
LowLevel | 30 | Oversold level line |
Similar Momentum EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.