XP Trade Manager Grid
This EA implements a grid trading strategy that places buy and sell pending orders at fixed price intervals around a central price level. It manages multiple orders simultaneously with configurable grid spacing, lot sizing, and take-profit targets for each grid level. The EA automates the entire grid lifecycle from order placement through profit-taking and grid reset.
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: High
- Opens a grid of orders at fixed price steps
- Has no stop loss or trailing stop
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 implements a classic grid trading strategy that places buy and sell pending orders at fixed intervals above and below a configurable center price level. Entry conditions are based on price reaching specific grid levels, where pending orders are automatically filled. Exit conditions set individual take-profit targets for each grid level, closing positions when price retraces to the target. Position sizing supports both fixed lot and progressive lot modes, where lot size increases with each successive grid level from the center. Money management features include maximum grid layer limits and an overall stop-loss function to control total exposure. The strategy excels in ranging markets where price oscillation continuously triggers grid profits, but faces significant risk in trending markets where multiple grid levels can be filled simultaneously, potentially creating large floating losses.
Strengths
- Generates consistent profits in ranging markets as each price retracement captures profit
- Fully automated operation without manual intervention, grid placement and management are hands-free
- Flexible parameter configuration for grid spacing, levels, and lot sizing adaptable to different market volatilities
- Dual-direction grid captures profit from both upward and downward price oscillations
- Individual take-profit per grid level provides clear and structured profit targets
Weaknesses
- In strong trending markets, multiple grid levels fill simultaneously causing rapidly escalating floating losses potentially leading to margin call
- LotMultiplier greater than 1 effectively becomes a Martingale variant with exponentially growing risk
- Grid strategy is inherently counter-trend averaging down, lacking directional analysis makes it vulnerable to sustained trends
- Total stop-loss set to 0 or poorly configured may fail to effectively limit maximum drawdown
- Holding numerous pending and open orders simultaneously consumes significant margin, reducing capital efficiency
Possible improvements
- Add a trend filter (e.g., MA direction or ADX) to pause or reduce grid levels in the trend direction, avoiding counter-trend accumulation during strong moves
- Implement dynamic grid spacing based on ATR to automatically adapt to changing market volatility, narrowing spacing in low-volatility and widening in high-volatility environments
Risk assessment
Overall risk: Caution
- Grid strategy accumulates floating losses rapidly when multiple levels fill in a strong trend, risking margin call
- LotMultiplier progressive sizing causes geometric risk growth, with extremely large positions at deep grid levels
- Without a properly configured MaxTotalLoss stop, extreme market conditions could cause catastrophic account loss
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
GridStep | 200 | Grid step, price distance between adjacent pending orders |
GridLevels | 5 | Grid levels (N levels above and below center) |
Lots | 0.01 | Starting lot size |
LotMultiplier | 1.0 | Lot increment multiplier (Martingale factor) |
TakeProfit | 200 | Take profit in points per level |
MaxSpread | 30 | Maximum allowed spread |
MagicNumber | 12345 | Magic number, unique EA order identifier |
CenterPrice | 0 | Grid center price (0=current price) |
MaxTotalLoss | 0 | Maximum total loss limit (0=no limit) |
UseBuyGrid | true | Enable buy grid |
UseSellGrid | true | Enable sell grid |
Similar Grid EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.