Grid Recovery EA Pro
- エキスパート
- Thanyacharoen Natphasit
- バージョン: 1.0
Adaptive Grid Trend EA เป็นระบบเทรดอัตโนมัติที่ออกแบบมาเพื่อทำงานร่วมกับสภาวะตลาดที่มีความผันผวน โดยใช้โครงสร้างแบบ Adaptive Grid ผสานกับ Trend Alignment, Dynamic Volatility Control และ Multi‑Session Logic เพื่อให้ EA ปรับตัวตามตลาดได้อย่างยืดหยุ่น
EA ไม่ได้ใช้ Martingale แบบทวีคูณ แต่ใช้โครงสร้าง Dynamic Linear Recovery ที่คำนวณจากความผันผวนและสภาวะของพอร์ตในปัจจุบัน ทำให้การเพิ่มขนาดสัญญามีความสมเหตุสมผลตามสภาพตลาดจริง
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.
✔ คุณสมบัติหลัก
1) Adaptive Grid Engine
-
ระยะ Grid ปรับตามความผันผวนของตลาดแบบอัตโนมัติ
-
ใช้ ATR เพื่อกำหนด GridStep แบบ Dynamic
-
ป้องกันการเปิดออเดอร์ถี่เกินในช่วงตลาดแรง
2) Trend‑Aligned Entry Filter
-
ใช้ EMA Fast/Slow เพื่อกำหนดทิศทางหลักของตลาด
-
สามารถเลือกให้เทรดเฉพาะทิศทางเดียวตามเทรนด์
-
มีโหมด Lock Direction เมื่อเริ่มต้น Basket แรก
3) Dynamic Recovery System
-
ไม่ใช้ Martingale
-
ปรับขนาดสัญญาตามความผันผวนและภาวะของพอร์ต
-
คำนวณจาก Unrealized Exposure และ Risk Factor
-
จำกัดขนาดสัญญาสูงสุดตามโครงสร้างของสัญลักษณ์
4) Basket Take Profit (Points)
-
ปิด Basket เมื่อกำไรถึงจำนวนจุดที่กำหนด
-
รองรับ Trailing Basket เพื่อรักษากำไรเมื่อราคาเคลื่อนตามทิศทาง
5) Multi‑Session Trading
-
กำหนดช่วงเวลาเทรดได้สูงสุด 3 ช่วง
-
รองรับ Session แบบข้ามวัน (เช่น 22:00 → 03:00)
-
นอกเวลา Session จะไม่เปิดออเดอร์ใหม่ แต่ระบบจัดการ Basket ยังทำงานตามปกติ
6) Risk & Execution Control
-
ตรวจสอบ Spread ก่อนเปิดออเดอร์
-
ตรวจสอบ Margin ก่อนส่งคำสั่ง
-
ตรวจสอบ Symbol Parameters อัตโนมัติ
-
รองรับทั้งบัญชี Netting และ Hedging
-
มีระบบป้องกัน Drawdown ตามเปอร์เซ็นต์ที่กำหนด
7) Dashboard UI
แสดงข้อมูลสำคัญแบบเรียลไทม์:
-
Trend Direction
-
Dynamic Grid Distance
-
Basket Pips
-
Trailing Level
-
Next Lot Size
-
Drawdown (%)
-
Session Status
-
Trading Mode (Single / Both)
✔ จุดเด่นของ EA นี้
-
โครงสร้าง Adaptive ที่ปรับตามตลาดจริง
-
ไม่ใช้ Martingale แบบทวีคูณ
-
ไม่พึ่งพาการทำนายตลาด
-
ใช้ข้อมูลความผันผวนและเทรนด์เป็นหลัก
-
เหมาะกับตลาดที่มีการเคลื่อนไหวเป็นช่วง ๆ
-
ออกแบบให้ทำงานได้กับทุกสัญลักษณ์ที่รองรับการเทรด
✔ การใช้งาน
-
สามารถใช้ได้กับทุก Timeframe
-
แนะนำให้ใช้บนสัญลักษณ์ที่มีความผันผวนปานกลางถึงสูง
-
ควรทดสอบใน Strategy Tester ก่อนใช้งานจริง
-
ปรับค่าตามความเสี่ยงที่ต้องการ
✔ หมายเหตุสำคัญ
-
EA ไม่รับประกันผลลัพธ์ในอนาคต
-
ผลลัพธ์ขึ้นอยู่กับสภาวะตลาดและการตั้งค่าของผู้ใช้งาน
-
ควรใช้การบริหารความเสี่ยงที่เหมาะสมเสมอ
How It Works
EA ใช้โครงสร้าง 4 ส่วนหลัก:
(1) Trend Filter
ใช้ EMA Fast/Slow เพื่อกำหนดทิศทางหลักของตลาด สามารถเลือกเทรดเฉพาะทิศทางเดียวตามเทรนด์ได้
(2) Adaptive Grid Engine
ระยะ Grid ปรับตามความผันผวนของตลาดโดยใช้ ATR ช่วยให้ Grid ไม่ถี่เกินในช่วงตลาดแรง
(3) Dynamic Recovery
เพิ่มขนาดสัญญาแบบ Linear ตามความผันผวนและภาวะของพอร์ต ไม่ใช้ Martingale แบบทวีคูณ
(4) Basket TP & Trailing
ปิด Basket เมื่อกำไรถึงจำนวนจุดที่กำหนด รองรับ Trailing Basket เพื่อรักษากำไร
4. Multi‑Session Trading
EA สามารถกำหนดช่วงเวลาเทรดได้สูงสุด 3 ช่วง นอกเวลา Session EA จะไม่เปิดออเดอร์ใหม่ แต่ยังคงจัดการ Basket และความเสี่ยงตามปกติ
5. Risk Management
-
EA มีระบบตรวจสอบ Spread
-
ตรวจสอบ Margin ก่อนเปิดออเดอร์
-
ปิดออเดอร์ทั้งหมดเมื่อ Drawdown ถึงระดับที่กำหนด
-
ผู้ใช้ควรตั้งค่าความเสี่ยงให้เหมาะสมกับพอร์ตของตนเอง
6. Strategy Tester
รองรับการทดสอบทั้งแบบ:
-
Every tick
-
1-minute OHLC
-
Real ticks
แนะนำให้ใช้ “Every tick based on real ticks” เพื่อผลลัพธ์ที่แม่นยำที่สุด
Input Parameters Explanation
General Settings
-
MagicBuy / MagicSell — หมายเลข Magic สำหรับแยกออเดอร์
-
AllowNewTrades — เปิด/ปิดการเปิดออเดอร์ใหม่
-
ShowDashboard — แสดง Dashboard บนกราฟ
Trend & Direction
-
SingleSide — เทรดเฉพาะทิศทางเดียวตามเทรนด์
-
SingleLockOnOpen — ล็อกทิศทางหลังเปิด Basket แรก
-
EMA Fast/Slow — ค่าที่ใช้กำหนดทิศทางหลักของตลาด
-
EMA Timeframe — TF สำหรับ Trend Filter
Grid Settings
-
GridStep — ระยะ Grid แบบคงที่ (ใช้เมื่อ Dynamic Grid ปิด)
-
MaxOrders — จำนวนออเดอร์สูงสุดต่อทิศทาง
-
OrderDelaySec — เวลาหน่วงระหว่างการเปิดออเดอร์ใหม่
Dynamic Grid (ATR)
-
UseDynamicGrid — เปิด/ปิดระบบ Dynamic Grid
-
ATR Period — จำนวนแท่งที่ใช้คำนวณ ATR
-
GridStepMin/Max — ขอบเขตของ GridStep
-
ATR Multiplier — ตัวคูณ ATR เพื่อกำหนด GridStep
Lot & Recovery
-
StartLot — ขนาดสัญญาเริ่มต้น
-
RecoveryTarget — ความไวของระบบ Recovery
-
RecoveryMinLot — Lot ขั้นต่ำของ Recovery
-
RecoveryMaxMult — จำกัด Lot สูงสุด
-
UseDynamicRecovery — เปิด/ปิด Dynamic Recovery
-
RiskFactor — ความไวของ Recovery ต่อ Drawdown
Basket TP & Trailing
-
BasketTP_Points — จำนวนจุดที่ใช้ปิด Basket
-
TrailBasketStart — เริ่ม Trailing เมื่อกำไรถึงระดับนี้
-
TrailBasketStep — ระยะห่างของ Trailing
Risk & Protection
-
MaxDD_Percent — ปิดออเดอร์ทั้งหมดเมื่อ DD ถึงระดับนี้
-
CloseOnMaxDD — เปิด/ปิดระบบป้องกัน DD
-
MaxSpreadPoints — จำกัด Spread สูงสุดก่อนเปิดออเดอร์
Session Control
-
UseSession — เปิด/ปิดระบบ Session
-
Session1/2/3 Start/End — ช่วงเวลาเทรดสูงสุด 3 ช่วง รองรับ Session ข้ามวัน
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.
