Exp_Directed_Movement
This EA trades based on the crossover of the Directed Movement indicator's upper and lower lines, which are derived from a doubly-smoothed RSI. It opens buy positions when the upper line crosses above the lower line and sell positions on the opposite crossover, with configurable position closing and money management options.
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 EA's strategy concept is based on the crossover of the Directed Movement custom indicator's two lines, which is essentially a doubly-smoothed RSI momentum system. Entry conditions are: a buy signal is generated when the upper line crosses above the lower line, and a sell signal is generated when the upper line crosses below the lower line, with signals evaluated at the SignalBar-th bar back. Exit conditions include fixed stop loss and take profit in points, as well as closing positions on reverse signals via BuyPosClose and SellPosClose parameters. Position sizing uses multiple modes from TradeAlgorithms.mqh, supporting lot calculation based on free margin, balance, loss-adjusted free margin or balance percentages, or fixed lot size. Money management is controlled by the MM parameter (default 0.1) for risk ratio, and MMMode selects the calculation mode (default fixed lot LOT). The strategy applies two layers of smoothing to RSI, with the first layer defaulting to SMA period 12 and the second to JJMA period 5, aiming to filter RSI noise for more stable signals.
Strengths
- Doubly-smoothed RSI effectively filters noise and reduces false signals
- Multiple money management modes provide high flexibility
- Complete stop loss and take profit settings for controllable risk
- Independent control of open and close directions allows flexible strategy configuration
- IsNewBar mechanism prevents repeated trading within the same bar
Weaknesses
- Depends on custom indicator Directed_Movement and external include files, making deployment and maintenance complex
- No spread filter, though less critical on H4 timeframe it still poses risk
- Lacks logic for handling simultaneous long and short positions, potential hedging conflicts
- Signals based only on two-bar crossover lack trend confirmation mechanism
- Default stop loss 1000 and take profit 2000 points are excessive for most instruments
Possible improvements
- Add a trend filter (e.g., higher timeframe MA direction confirmation) to avoid frequent entries in ranging markets
- Add spread filter and maximum position checks for enhanced risk control
- Convert stop loss and take profit to ATR-based dynamic calculation to adapt to different instruments' volatility characteristics
Risk assessment
Overall risk: Medium
- No spread filter, slippage can be significant during high volatility
- No maximum position count limit, potential over-exposure in extreme conditions
- Fixed point stop loss/take profit doesn't adapt to all instruments' volatility characteristics
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Money management parameter, lots or ratio |
MMMode | LOT | Margin calculation mode (fixed lots, balance percentage, etc.) |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum allowed slippage |
BuyPosOpen | true | Allow buy to open |
SellPosOpen | true | Allow sell to open |
BuyPosClose | true | Close long positions on reverse signal |
SellPosClose | true | Allow closing short positions on signal reversal |
InpInd_Timeframe | PERIOD_H4 | trend_arrows indicator timeframe |
RSIPeriod | 14 | RSI indicator period |
RSIPrice | PRICE_CLOSE | RSI applied price type |
MA_Method1 | MODE_SMA_ | First smoothing algorithm type |
Length1 | 12 | First J2JMA smoothing period |
Phase1 | 15 | First J2JMA phase parameter (-100 to +100) |
MA_Method2 | MODE_JJMA | Second smoothing algorithm type |
Length2 | 5 | Second J2JMA smoothing period |
Phase2 | 15 | Second J2JMA phase parameter (-100 to +100) |
SignalBar | 1 | Signal bar index (0 for current bar) |
Similar Momentum EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.