Two MA Other TimeFrame Correct Intersection
This EA trades based on the crossover of two Moving Averages calculated from a different (higher) timeframe than the chart it runs on. It correctly handles multi-timeframe MA alignment by using bar synchronization to avoid repainting, entering long on bullish cross and short on bearish cross, with optional stop loss and take profit.
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 | — | — | — | — | — | Conversion problem |
| GBPUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Conversion problem |
| USDJPY | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Conversion problem |
| XAUUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Conversion problem |
Why this EA never traded: the conversion compares two identical indicators (the fast and slow settings were lost), so they can never cross.
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 a dual moving average crossover, but unlike conventional MA crossover EAs, this one runs on the current chart timeframe while using MA data from a higher timeframe (e.g., H1, H4) for signal generation. Entry conditions are: go long when the fast MA crosses above the slow MA on the higher timeframe, and go short when the fast MA crosses below the slow MA. The key technical feature is 'correct intersection' — through precise bar time synchronization, it ensures that higher-timeframe MA values do not repaint on the current chart, meaning signals only trigger after the corresponding higher-timeframe bar closes and confirms. Exit conditions rely on opposite crossover signals to close positions, or through optional stop loss and take profit parameters. Position sizing uses a fixed lot approach with no dynamic sizing mechanism. Money management is limited — stop loss and take profit are optional parameters, and if not set, the EA fully relies on signal reversal for exits, creating a significant risk exposure.
Strengths
- Correctly handles multi-timeframe MA synchronization, avoiding the common repainting trap and producing more reliable signals
- Using higher timeframe signals filters out lower-timeframe noise, improving trade quality
- Clear and concise logic with few parameters, easy to understand and optimize
- Supports both long and short positions, enabling profitability in trending markets in both directions
Weaknesses
- Fixed lot sizing with no dynamic position management, unable to adapt based on account equity or volatility
- Stop loss and take profit are optional and disabled by default, creating extreme risk exposure if users don't set them manually
- Lacks a new bar check mechanism, potentially opening duplicate positions within the same higher-timeframe bar
- No filtering mechanism (e.g., ADX trend strength, volume confirmation), prone to false signals and frequent trading in ranging markets
Possible improvements
- Add dynamic position sizing that calculates lot size based on account balance or ATR
- Implement a new bar check to ensure only one trade per higher-timeframe bar
- Add a trend filter (e.g., ADX or higher timeframe trend confirmation) to reduce false signals in ranging markets
- Enable stop loss by default and add a trailing stop feature to protect profits
Risk assessment
Overall risk: Medium
- Stop loss and take profit are disabled by default; without manual setup, the EA relies entirely on signal reversal, potentially causing large drawdowns
- Lack of new bar check may cause duplicate position openings in the same direction, increasing risk exposure
- Fixed lot sizing ignores account size, so small accounts could blow up quickly from oversized single trades
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
TimeFrame | PERIOD_H4 | Higher timeframe for MA calculation |
FastMA_Period | 10 | Fast moving average period |
SlowMA_Period | 50 | Slow moving average period |
FastMA_Method | MODE_SMA | fastMAmethod (SMA/EMA/SMMA/LWMA) |
SlowMA_Method | MODE_SMA | slowMAmethod (SMA/EMA/SMMA/LWMA) |
LotSize | 0.1 | Default trading lot size |
StopLoss | 0 | Stop loss in points per level, 0 for none |
TakeProfit | 0 | Take profit in points per level |
MagicNumber | 123456 | EA magic number for order identification |
Similar Multi-Timeframe EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.