MTT GoldGSB - Grid Scaling Expert Advisor for Gold (XAUUSD)
OVERVIEW
MTT GoldGSB is a long-only (BUY) grid-based Expert Advisor designed specifically for Gold (XAUUSD). It waits for an oversold RSI condition, confirms a rebound with a bullish candle closing above a moving average, then enters at a grid level and manages profit with two different dynamic modes depending on the number of open positions.
RECOMMENDATIONS & REQUIREMENTS
- Recommended Symbol: XAUUSD (GOLD)
- Recommended Timeframe: M15 (Supports M5 - M15)
- Recommended Deposit: $1,000 - $2,000 per 0.01 Lot
- Account Type: Standard / ECN / Raw Spread (2-digit Gold broker format; divide point values by 10 if using a 3-digit Gold broker)
- VPS: Recommended for 24/5 continuous operation
HOW IT WORKS
- Phase 1 - RSI Awakener: A bearish candle with RSI at or below the oversold level starts a signal window (RSI_MaxBarsLookback bars).
- Phase 2 - Confirmation: A bullish candle closing above the MA with a body smaller than BullishBodyMaxPts confirms the setup and builds a grid.
- Phase 3 - Entry: The first BUY order (B1_#1) opens when price touches the nearest grid level above. If no entry occurs within Phase3MaxBarsLookback bars, the setup resets.
- Phase 4 - Scaling: While B1_#1 is open and price is below its entry, further BUY orders open at lower grid levels (one order per grid level).
DYNAMIC PROFIT MANAGEMENT
- Case 1 - One open order: Trailing stop only (TrailingStartPts / TrailingDistancePts). No fixed profit target.
- Case 2 - Two or more open orders: Trailing stops are no longer moved; all orders of the cycle are closed together when total floating profit reaches CloseAllUSDTarget.
RECOVERY
After a terminal or VPS restart, the EA scans existing positions (by magic number and comment), rebuilds its grid, and continues managing them seamlessly.
MAIN INPUTS
[RSI Awakener (Phase 1-2)]
- RSI_TF: Timeframe used for RSI calculation (Default: 15 Minutes).
- RSI_Period: Period for the RSI indicator (Default: 14).
- RSI_Price: Applied price for RSI calculation (Default: Close price).
- RSI_Oversold: Oversold level to trigger Phase 1 signal window (Default: 32.0).
- RSI_MaxBarsLookback: Maximum bars to wait for Phase 2 confirmation (Default: 15).
[Phase 3 Timeout & Body Filter]
- Phase3MaxBarsLookback: Maximum bars to wait for price to reach the entry grid level before resetting (Default: 15).
- BullishBodyMaxPts: Maximum candle body size in points allowed for the confirmation candle (Default: 800).
[Moving Average (MA)]
- MA_TF: Timeframe used for the Moving Average (Default: 15 Minutes).
- MA_Period: Moving Average period for trend/rebound confirmation (Default: 30).
- MA_Method: Moving Average smoothing method (Default: Simple).
- MA_Price: Applied price for Moving Average (Default: Close price).
[Spread Filter]
- UseSpreadFilter: Enable or disable maximum spread protection (Default: true).
- MaxSpreadPoints: Maximum allowed spread in points to open new orders (Default: 50).
[Grid Settings]
- GridStartPrice: Base reference price for building static grid levels. Set near the current round-number price of Gold (Default: 4000.0).
- GridDistancePts: Distance in points between each grid level (Default: 2500).
- GridLineCount: Number of grid lines generated above and below the base price (Default: 100).
[BUY1 Grid]
- B1_LotSize: Fixed lot size for each BUY order (Default: 0.01).
[Profit Management (Dynamic Switch)]
- TrailingStartPts: Profit in points required to activate trailing stop when only 1 order is open (Default: 1250).
- TrailingDistancePts: Trailing stop distance in points from current price when 1 order is open (Default: 50).
- UseCloseAllCycle: Enable basket close when 2 or more orders are open (Default: true).
- CloseAllUSDTarget: Total floating profit in USD to close all open orders in the cycle (Default: 1.0).
TEST SETTINGS USED FOR SCREENSHOTS
- Symbol: XAUUSD
- Timeframe: M15
- Initial Deposit: $1,000 - $2,000
- Leverage: 1:500
- Modeling: Every tick based on real ticks (99.9% quality)
- Lot Size: 0.01
- Input Values: Default settings shown above
RISK WARNING
This EA adds positions during price pullbacks (grid averaging) and the number of orders is not limited by default. In a strong, sustained downtrend, drawdown and margin usage can grow significantly and a stop-out is possible. Always test on a demo account first, use a small lot size relative to your balance and leverage, and never risk money you cannot afford to lose. Past test results do not guarantee future performance.
LIVE PERFORMANCE & MONITORING
Track real-time trading results and verify live account performance via my official MQL5 Signal: