Impulse Continuation Engine [ICE_Pro]
This EA detects impulse candle formations (high volume, strong body, directional close) and enters trades in the impulse direction, using ATR-based stop loss/take profit and adaptive session/volume/volatility filters. It features a smart trailing stop system with breakeven, fixed ATR, dynamic ATR, and hybrid modes to manage open positions.
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.59% | -0.51% | 6.07% | 140 | 46.00% | -0.09 | -0.10 | 6 | −$0.66 | Reliable |
| GBPUSD | -8.13% | -7.10% | 9.84% | 140 | 41.00% | -1.30 | -0.83 | 9 | −$6.02 | Reliable |
| USDJPY | +0.65% | +0.56% | 4.62% | 171 | 46.80% | 0.17 | 0.14 | 10 | +$0.38 | Reliable |
| XAUUSD | +21.70% | +17.62% | 90.37% | 145 | 53.10% | 0.95 | 0.24 | 8 | +$14.97 | Reliable |
Profitable on 2 of 4 markets with reliable results.
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.
Against the other Momentum EAs with a reliable result on the same market: EURUSD: better than 47% of 68 · GBPUSD: better than 17% of 66 · USDJPY: better than 66% of 68 · XAUUSD: better than 64% of 75
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 62% | +1.43% 2026-10 | -3.70% 2026-04 |
| GBPUSD | 38% | +1.05% 2026-06 | -4.48% 2026-04 |
| USDJPY | 62% | +2.47% 2026-02 | -2.26% 2025-12 |
| XAUUSD | 62% | +159.80% 2026-03 | -72.00% 2026-02 |
From the backtest equity curve, sampled about every two days; only reliable results.
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 'impulse continuation' — when the market produces an abnormally high-volume directional candle, the EA assumes momentum will persist and enters in that direction. Entry conditions require the current bar's volume to exceed an adaptive multiple of the average (0.9x in London/NY sessions, 1.3x in Asian/Pacific), body ratio above an adaptive threshold, close position above 60% of the candle range, range expansion greater than 5% over the previous bar, and price must align with the 50-period MA direction (slope confirmation). Exit conditions include ATR-multiplier stop loss (1.2x) and take profit (1.8x), plus four trailing stop modes: no trailing, breakeven only, fixed ATR trailing, dynamic ATR trailing, and hybrid. Position sizing is calculated based on risk percentage of account balance (default 0.1%). Money management includes minimum equity check, margin level check, post-loss risk reduction feature, and a 61.8% Fibonacci retracement impulse decay monitoring mechanism. Additional safety mechanisms include adaptive session filtering, low volume filtering, and spread filtering.
Strengths
- Multi-layer adaptive filtering system (session, volume, volatility, spread) effectively reduces false signals
- Complete money management system: equity check, margin level check, post-loss risk reduction, ATR-based stop loss
- Four trailing stop modes (breakeven/fixed ATR/dynamic ATR/hybrid) provide flexible position management
- 61.8% Fibonacci retracement decay monitoring is more scientific than simple bar counting for determining impulse failure
- MA slope + positional dual trend confirmation prevents counter-trend entries
Weaknesses
- IsGoodTradingSession() creates an iATR handle (handle_long) on every call but never releases it, causing serious resource leaks
- Duplicate checks in CheckTradingConditions(): steps 6 and 7 redundantly re-check spread and trading session
- Large blocks of commented-out alternative code (three ProcessNewBar versions, two IsImpulseDecayed versions, etc.) bloat the codebase and hurt maintainability
- Missing check for existing open positions, which could lead to duplicate entries and overexposure
- Impulse decay check uses iOpen based on start_bar index, but start_bar is incremented in ProcessNewBar, potentially referencing wrong bar data
Possible improvements
- Fix the indicator handle leak in IsGoodTradingSession(): move the long-period ATR handle creation to OnInit() and release it in OnDeinit()
- Remove all commented-out alternative code blocks, use version control to manage code variants, keep source files clean
- Add position checking logic to prevent duplicate entries from the same impulse signal, limit max positions per direction
- Remove duplicate spread and session checks in CheckTradingConditions() (lines 6-7 duplicate lines 3-5)
- Implement actual logic for InpUseVolatilityAdjust parameter, which is declared but not used in trailing calculations
Risk assessment
Overall risk: Medium
- IsGoodTradingSession() creates new ATR handle on every call without releasing, long-running sessions may exhaust memory/handles
- Missing position count check may cause duplicate entries on the same impulse leading to excessive risk exposure
- Inconsistent start_bar index management in impulse decay logic may reference wrong historical data under certain conditions
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
InpTradingMode | TRADING_MODE_DEMO | Trading mode (live/demo/disabled) |
InpTradeSymbol | Trading symbol (empty = chart symbol) | |
InpMagicNumber | 888888 | Unique magic number for order identification |
InpTradeComment | Ritz-ICE-Pro | Trade comment displayed in terminal and history |
InpDebugMode | true | Enable verbose debug logging |
InpEnableAdaptive | true | Enable market-condition adaptive logic |
InpLookbackPeriod | 20 | Historical bars for ICE pattern detection |
InpVolumeMultiplier | 1.3 | Minimum volume multiplier to confirm impulse |
InpMinBodyRatio | 0.5 | Minimum candle body-to-range ratio (impulse strength) |
InpClosePosition | 0.6 | Minimum close position within candle range (0-1) |
InpMinImpulseBars | 2 | Minimum bars for a valid impulse |
InpMaxImpulseBars | 5 | Maximum bars allowed in impulse sequence |
InpUseSessionFilter | true | Trade only during active sessions |
InpRiskPerTrade | 0.1 | Risk per trade as percentage of account balance |
InpReduceAfterLoss | false | Reduce risk after a loss |
InpReductionFactor | 0.2 | Risk reduction factor after loss (0.2 = -20%) |
InpMinEquityToTrade | 10.0 | Minimum equity to continue trading (USD) |
InpMinMarginLevel | 110.0 | Minimum margin level (%) |
InpATRMultiplierSL | 1.2 | SL distance as ATR multiplier |
InpATRMultiplierTP | 1.8 | TP distance as ATR multiplier |
InpSlippagePoints | 30 | Maximum allowed slippage in points |
InpImmediateEntry | true | Enter immediately after impulse detection |
InpMaxEntryBars | 3 | Max bars to wait for entry after detection |
InpTrailingMode | TRAIL_ATR_FIXED | Trailing stop mode (Fixed/ATR/Hybrid) |
InpBreakevenAt | 0.5 | Move SL to breakeven at 50% of TP |
InpTrailATRMulti | 1.0 | ATR multiplier for trailing stop distance |
InpTrailActivation | 0.3 | Profit percentage to activate trailing logic |
InpUseVolatilityAdjust | true | Dynamically adjust trailing based on volatility |
InpMaxSpread | 40.0 | Maximum allowed spread in points |
InpMinATRPoints | 50 | Min ATR volatility filter (~5 points) |
InpMaxATRPoints | 1500 | Max ATR volatility filter (~150 points) |
InpFilterLowVolume | true | Block trading under low volume conditions |
Similar Momentum EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.