Grid
This EA implements a classic grid trading strategy that places buy and sell pending orders at fixed price intervals above and below the current market price. It aims to profit from price oscillations within a range by closing positions when they reach a configurable take-profit target, while continuously maintaining the grid of orders.
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
- Can hold up to 10 positions at once
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
This EA employs a grid trading strategy where the core concept is placing buy and sell pending orders at fixed intervals above and below the current price, forming a price grid. Entry conditions are based on a predefined grid step distance, placing buy limit orders below and sell limit orders above the current market price. Exit conditions trigger when any grid order reaches a configurable take-profit target, though many grid EAs lack proper stop-loss mechanisms. Position sizing typically uses either fixed lot sizes or incrementally increasing lots at deeper grid levels. Money management is generally weak, as most grid EAs lack effective drawdown control and rely on price oscillating within a range to generate profits. The strategy performs well in ranging markets but can lead to catastrophic losses or account blow-up during strong trending conditions due to continuously adding positions in the losing direction.
Strengths
- Generates consistent profits in ranging/sideways markets by capturing price oscillations repeatedly
- Simple and intuitive strategy logic with few parameters, easy to understand and optimize
- Can run 24/7 automatically without manual intervention, suitable for non-trending markets
- Grid density and spacing are flexible and adjustable for different instruments and volatility levels
Weaknesses
- Continuously adds positions against the trend during strong directional moves, potentially causing massive drawdowns or account liquidation
- Lacks effective stop-loss mechanisms, with theoretically unlimited risk exposure
- Capital requirement grows linearly with grid levels, demanding significant account balance
- Absence of stop-loss is the greatest flaw, as accumulating losing positions can deplete all margin
Possible improvements
- Add a trend filter (e.g., moving average or ATR) to pause opening new grid orders or reduce grid density during strong trending conditions
- Implement maximum floating loss limits and overall account drawdown protection that force-close all grid positions when thresholds are breached
- Introduce dynamic grid spacing that adapts grid density based on ATR or volatility to accommodate different market regimes
Risk assessment
Overall risk: Dangerous
- No effective stop-loss mechanism; strong trends can cause account liquidation
- Counter-trend position accumulation leads to exponentially growing floating losses
- Capital requirements grow linearly with grid levels; insufficient margin triggers forced liquidation
- Lack of drawdown control can rapidly wipe out small accounts
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
GridStep | 20 | Grid spacing in points |
TakeProfit | 50 | Take profit in points |
Lots | 0.01 | Lot size per order |
GridLevels | 10 | Grid layers |
StopLoss | 0 | stop losspoints (0meansnostop loss) |
MagicNumber | 12345 | EA magic number |
MaxSpread | 30 | Maximum allowed spread |
Similar Grid EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.