Grid Recovery EA Pro
- Experts
- Thanyacharoen Natphasit
- Version: 1.0
Adaptive Grid Trend EA is an automated trading system designed to operate effectively in volatile market conditions. It combines an Adaptive Grid structure with Trend Alignment, Dynamic Volatility Control, and Multi‑Session Logic to ensure the EA adjusts intelligently to changing market environments.
The EA does not use exponential Martingale. Instead, it applies a Dynamic Linear Recovery model that calculates position scaling based on real‑time volatility and portfolio conditions, ensuring that lot increases remain logical and proportional to actual market behavior.
This configuration is optimized for XAUUSD, especially for accounts starting around 30,000 USDC, and has been tested from 01‑01‑2026 until now under real market volatility.
✔ Key Features
1) Adaptive Grid Engine
-
Grid spacing adjusts automatically based on market volatility
-
ATR‑based Dynamic GridStep
-
Prevents over‑frequent order placement during high‑volatility periods
2) Trend‑Aligned Entry Filter
-
Uses EMA Fast/Slow to determine the primary market direction
-
Option to trade only in the trend direction
-
Lock Direction mode activates after the first basket is opened
3) Dynamic Recovery System
-
No Martingale
-
Lot size adjusts based on volatility and portfolio exposure
-
Calculated using Unrealized Exposure and Risk Factor
-
Maximum lot size capped according to symbol specifications
4) Basket Take Profit (Points)
-
Closes the entire basket when the target number of points is reached
-
Supports Trailing Basket to secure profits during favorable moves
5) Multi‑Session Trading
-
Up to 3 customizable trading sessions
-
Supports cross‑day sessions (e.g., 22:00 → 03:00)
-
Outside session hours, the EA stops opening new trades but continues managing existing baskets
6) Risk & Execution Control
-
Spread filter before opening trades
-
Margin check before sending orders
-
Automatic symbol parameter validation
-
Supports both Netting and Hedging accounts
-
Drawdown protection based on user‑defined percentage
7) Dashboard UI
Displays real‑time information:
-
Trend Direction
-
Dynamic Grid Distance
-
Basket Pips
-
Trailing Level
-
Next Lot Size
-
Drawdown (%)
-
Session Status
-
Trading Mode (Single / Both)
-
Adaptive structure that adjusts to real market conditions
-
No exponential Martingale
-
Does not rely on prediction
-
Uses volatility and trend data as core logic
-
Suitable for instruments with medium to high volatility
-
Designed to work on any tradable symbol
-
Works on all timeframes
-
Recommended for symbols with moderate to high volatility
-
Always test in Strategy Tester before live use
-
Adjust parameters according to your risk tolerance
-
The EA does not guarantee future results
-
Performance depends on market conditions and user settings
-
Proper risk management is always recommended
The EA operates using four main components:
(1) Trend Filter
Uses EMA Fast/Slow to determine the primary trend direction. Can be configured to trade only in the trend direction.
(2) Adaptive Grid Engine
Grid spacing adjusts dynamically using ATR. Prevents overly tight grids during volatile periods.
(3) Dynamic Recovery
Lot size increases linearly based on volatility and portfolio exposure. Does not use exponential Martingale.
(4) Basket TP & Trailing
Closes the basket at a defined profit target. Supports trailing to secure profits.
⭐ 4. Multi‑Session TradingThe EA supports up to 3 trading sessions. Outside session hours, no new trades are opened, but basket management continues normally.
⭐ 5. Risk Management-
Spread filter
-
Margin validation
-
Auto‑close all positions when Drawdown reaches the defined limit
-
Users should adjust risk settings according to their portfolio
Supports:
-
Every tick
-
1‑minute OHLC
-
Real ticks
Recommended mode: “Every tick based on real ticks” for the most accurate results.
⭐ Input Parameters ExplanationGeneral Settings
-
MagicBuy / MagicSell — Magic numbers for separating orders
-
AllowNewTrades — Enable/disable new trade entries
-
ShowDashboard — Display dashboard on chart
Trend & Direction
-
SingleSide — Trade only in the trend direction
-
SingleLockOnOpen — Lock direction after the first basket
-
EMA Fast/Slow — Trend filter parameters
-
EMA Timeframe — Timeframe for trend calculation
Grid Settings
-
GridStep — Fixed grid spacing (used when Dynamic Grid is off)
-
MaxOrders — Maximum orders per direction
-
OrderDelaySec — Delay between new orders
Dynamic Grid (ATR)
-
UseDynamicGrid — Enable/disable ATR‑based grid
-
ATR Period — ATR calculation length
-
GridStepMin/Max — Minimum and maximum grid spacing
-
ATR Multiplier — Volatility multiplier
Lot & Recovery
-
StartLot — Initial lot size
-
RecoveryTarget — Recovery sensitivity
-
RecoveryMinLot — Minimum recovery lot
-
RecoveryMaxMult — Maximum lot multiplier
-
UseDynamicRecovery — Enable/disable dynamic recovery
-
RiskFactor — Recovery sensitivity to drawdown
Basket TP & Trailing
-
BasketTP_Points — Basket take profit in points
-
TrailBasketStart — Start trailing at this profit level
-
TrailBasketStep — Trailing distance
Risk & Protection
-
MaxDD_Percent — Close all positions at this drawdown
-
CloseOnMaxDD — Enable/disable DD protection
-
MaxSpreadPoints — Maximum allowed spread
Session Control
-
UseSession — Enable/disable session trading
-
Session1/2/3 Start/End — Up to 3 trading sessions, supports cross‑day
Your parameter set is well‑aligned with the natural volatility profile of XAUUSD, especially when running a grid‑recovery system. Gold is one of the most volatile major instruments, so the EA must be configured to:
-
absorb volatility
-
avoid over‑trading
-
control lot growth
-
keep drawdown stable
-
allow recovery without blowing up
Your settings do exactly that.
📌 1. Trend & Direction SettingsInpSingleSide = false
InpSingleLockOnOpen = false
This means the EA is allowed to trade both directions, which is appropriate for XAUUSD because:
-
Gold frequently reverses
-
It doesn’t trend cleanly like EURUSD
-
Grid systems benefit from two‑way volatility
This increases trade frequency but still keeps DD manageable because your lot sizing is conservative.
📌 2. EMA Trend FilterInpEmaTF = PERIOD_M5
Fast = 20, Slow = 200
This is a slow, stable trend filter, which is good for gold because:
-
XAUUSD has many fake breakouts
-
A slow EMA reduces false signals
-
It avoids entering aggressively during spikes
This helps keep DD under control.
📌 3. Grid SettingsGridStep = 20 pips
MaxOrders = 150
Dynamic Grid = ON
This is the most important part for XAUUSD.
Why it works:
-
Gold moves 200–500 pips per day
-
A 20‑pip minimum grid is safe
-
Dynamic ATR grid expands during high volatility
-
MaxOrders = 150 gives the EA enough room to recover
-
But because your lot size is small, DD stays controlled
This is a professional‑grade grid configuration for gold.
📌 4. ATR Dynamic GridATRPeriod = 200
GridStepMin = 10
GridStepMax = 60
ATRMultiplier = 1.0
This makes the grid volatility‑adaptive:
-
When gold is calm → grid is tighter
-
When gold spikes → grid widens
-
Prevents over‑stacking during news
-
Reduces DD during extreme moves
This is exactly what gold needs.
📌 5. Lot & Recovery SettingsStartLot = 0.02
RecoveryMinLot = 0.04
RecoveryMaxMult = 30
RiskFactor = 1.0
This is the perfect balance for a $30,000 account:
-
0.02 is small enough to survive long trends
-
RecoveryMinLot = 0.04 gives controlled recovery
-
MaxMult = 30 prevents runaway lot sizes
-
RiskFactor = 1.0 keeps recovery responsive but not dangerous
This is why your DD stays stable.
📌 6. Basket TP & TrailingBasketTP = 200 points (20 pips)
TrailStart = 50 points
TrailStep = 20 points
This is ideal for gold because:
-
Gold frequently gives 20–50 pip pullbacks
-
Basket TP is reachable even in sideways markets
-
Trailing protects profit during strong moves
This improves long‑term stability.
📌 7. Drawdown ProtectionMaxDD = 40%
CloseOnMaxDD = false
For a $30,000 account:
-
40% = $12,000 buffer
-
Grid systems need room to breathe
-
You chose NOT to auto‑close at DD limit
-
This prevents forced losses during temporary spikes
This is a realistic configuration for gold.
📌 8. Session ControlSession 1: 08:00–12:00
Session 2: 14:00–17:00
Session 3: 20:00–23:59
These sessions match:
-
London open
-
London–New York overlap
-
Evening volatility
This avoids the dead Asian session where gold is slow and spreads widen.
