GGM Gold Directional

GoldGridMaster — Directional Grid EA for XAUUSD (Gold) | M5

Overview

GoldGridMaster is a fully automated Expert Advisor built exclusively for XAUUSD (Gold) on the M5 timeframe. It combines directional trend filtering with a controlled martingale grid — trading only in the direction confirmed by the 200 EMA and RSI, never against the trend, and never holding opposing positions simultaneously.

The EA was developed through multiple iterations of live backtesting and journal analysis, with every protection mechanism stress-tested against real trade logs. The result is a system that captures consistent profits during trending sessions while strictly limiting losses through layered capital protection.

Minimum recommended deposit: $500
Recommended deposit for default settings: $1,000+
Timeframe: M5 only
Symbol: XAUUSD (Gold)
Broker type: Any ECN/STP broker with XAUUSD, spread under 35 points

How It Works

1. Directional Bias — 200 EMA

The EA determines trade direction exclusively from the 200-period EMA on the M5 chart:

  • Price clearly above the EMA → only BUY trades are opened
  • Price clearly below the EMA → only SELL trades are opened
  • Price within ±12 pips of the EMA → no trades (dead zone)

This single rule eliminates the most common cause of grid EA failure — trading in the wrong direction during a strong trend.

2. Entry Confirmation — RSI(14)

Before opening any position, the RSI must confirm momentum in the trade direction:

  • For BUY entries: RSI must be ≥ 50
  • For SELL entries: RSI must be ≤ 50

This filters out choppy, directionless conditions where price hovers near the EMA.

3. Session Filter — London & New York Only

Gold exhibits its highest quality directional moves during institutional trading hours. The EA restricts all entries to:

  • London session: 08:00–12:00 server time
  • New York session: 13:00–17:00 server time

This alone eliminates roughly 60% of low-quality signals generated during the Asian session.

4. Directional Grid with Controlled Martingale

When conditions are met, the EA opens a Level 1 position. If price moves against the entry by the defined grid step (default 20 pips), a Level 2 position opens at 1.5× the base lot. If price continues against, Level 3 opens at 2.0× the base lot.

Maximum 3 levels per direction. This caps the worst-case combined exposure to 4.5× the base lot — predictable and recoverable.

Critical design rule: the EA never holds BUY and SELL positions at the same time. When direction changes, the opposite side is closed before any new position is opened. This prevents the hedge trap that destroys most grid EAs.

5. Stepped Lot Sizing — Controlled Compounding

The base lot scales with account balance in discrete steps: every $1,000 of balance adds one unit of BaseLotPer1k . At the default setting of 0.01:

  • $10,000 balance → 0.10 lot base
  • $15,000 balance → 0.15 lot base
  • $20,000 balance → 0.20 lot base

Lot size only changes when the balance crosses a full $1,000 threshold — not continuously. This prevents the runaway compounding that causes equity spike-and-crash patterns.

6. Hard Broker-Level Stop Loss on Every Position

Every order is placed with a real stop loss set at the broker level (default 50 pips). If MT5 disconnects, the VPS crashes, or the internet drops — every position is protected. There is no reliance on code-only logic for loss limitation.

7. Take Profit System — Individual + Basket

  • Level 1 positions close individually at 40 pips profit
  • Level 2 positions close individually at 35 pips profit
  • Level 3 positions close individually at 30 pips profit
  • When a grid of 2+ positions has combined profit ≥ BasketTP_Dollars , all positions on that side close together

After any close (win or loss), the EA waits a configurable cooldown period before re-entering. This prevents immediately chasing price after a TP or re-entering into a continuing adverse move after a loss.

8. Trailing Stop

Once any position reaches TrailStartPips profit (default 20 pips), a trailing stop activates and follows price at TrailStepPips distance (default 10 pips), locking in profits on extended moves.

Capital Protection System

GoldGridMaster uses a 3-layer protection system designed to prevent single bad sessions from destroying weeks of accumulated profit.

Layer 1 — Daily Drawdown Limit

If equity drops more than DailyDD_Pct (default 4%) from the start-of-day equity, all positions close and the EA stops trading for the remainder of that calendar day. The daily budget is measured against equity at midnight — not balance — so overnight floating losses do not pre-consume the day's allowance.

Layer 2 — Weekly Drawdown Circuit Breaker

If equity drops more than WeeklyDD_Pct (default 10%) from Monday's opening equity, all positions close and the EA pauses until the following Monday. This requires 3+ consecutive bad daily sessions before firing — protecting against genuine adverse weeks while allowing normal losing streaks to recover.

Layer 3 — Friday Weekend Close

Every Friday at FridayCloseHour (default 21:00 server time), all open positions are closed regardless of their current profit or loss status. This eliminates weekend gap risk — the single most common cause of unexpected large losses in automated systems.

Input Parameters

Lot Sizing

Parameter Default Description
BaseLotPer1k 0.01 Base lot added per $1,000 of balance
MaxLot 0.50 Hard ceiling — lot never exceeds this

Martingale Grid

Parameter Default Description
Multi_L2 1.5 Level 2 lot = BaseLot × 1.5
Multi_L3 2.0 Level 3 lot = BaseLot × 2.0
GridStepPips 20.0 Pips between grid levels

EMA Filter

Parameter Default Description
EMA_Period 200 EMA period on M5
EMA_DeadZonePips 12.0 No trades within ±12 pip of EMA

RSI Confirmation

Parameter Default Description
RSI_Period 14 RSI period
RSI_BuyMin 50 Minimum RSI for BUY entries
RSI_SellMax 50 Maximum RSI for SELL entries

Session Filter

Parameter Default Description
UseSessionFilter true Enable/disable session restriction
London_StartHour 8 London session start (server time)
London_EndHour 12 London session end
NY_StartHour 13 New York session start
NY_EndHour 17 New York session end

Stop Loss & Take Profit

Parameter Default Description
SL_Pips 50.0 Hard broker SL on every position
TP_L1_Pips 40.0 Level 1 individual take profit
TP_L2_Pips 35.0 Level 2 individual take profit
TP_L3_Pips 30.0 Level 3 individual take profit
BasketTP_Dollars 50.0 Close entire grid when combined profit ≥ $X
TrailStartPips 20.0 Trailing stop activates after this profit
TrailStepPips 10.0 Trailing stop distance

Protection

Parameter Default Description
UseWeeklyDD true Enable weekly circuit breaker
WeeklyDD_Pct 10.0 Weekly equity drop % to trigger pause
DailyDD_Pct 4.0 Daily equity drop % to close and pause
MaxTradesPerDay 6 Maximum new L1 entries per day
CooldownBars 6 M5 bars to wait after any position close
FridayCloseHour 21 Hour on Friday to close all positions

General

Parameter Default Description
SpreadMaxPips 35.0 Skip entries if spread exceeds this
MagicNumber 20250428 Unique EA identifier
TradeComment "GGM4" Trade comment prefix

Setup Guide

Step 1 — Broker requirements Use an ECN broker with XAUUSD spreads typically below 25 points. Recommended leverage: 1:100 or higher. The EA works with any broker that supports market execution on gold.

Step 2 — Server time adjustment The session filter uses broker server time. Check your broker's GMT offset and adjust London_StartHour , London_EndHour , NY_StartHour , and NY_EndHour accordingly. Most brokers operate on GMT+2 (winter) / GMT+3 (summer). For GMT+3: London = 10–14, NY = 15–19.

Step 3 — Attach to chart Attach the EA to a XAUUSD M5 chart. Enable "Allow Automated Trading" in MT5. The EA manages everything from this single chart instance — do not attach multiple copies.

Step 4 — Recommended starting settings by account size

Account BaseLotPer1k MaxLot DailyDD WeeklyDD
$500 0.01 0.10 3.0% 8.0%
$1,000 0.01 0.20 4.0% 10.0%
$3,000+ 0.01 0.50 4.0% 10.0%

Step 5 — VPS recommended For consistent execution, run the EA on a VPS close to your broker's server. This ensures the Friday close fires on time and SL orders remain active even if your local computer is off.

What This EA Does NOT Do

  • No martingale without direction — Every grid level is opened only while price remains on the correct side of the 200 EMA. The grid does not open into an EMA cross.
  • No hedging — Opposing positions are never held simultaneously. Direction switches result in the old side being closed before the new side opens.
  • No overnight grid accumulation — The daily DD limit and session filter prevent the EA from adding grid levels through the night.
  • No unlimited grid depth — Maximum 3 levels. Period.
  • No news trading — The session filter naturally avoids major news spikes outside London/NY windows. For extra protection, disable the EA manually before FOMC and NFP events.
  • No fixed lot — The stepped lot system ensures the EA naturally scales down during drawdown periods (as balance decreases, lot size decreases).

Risk Disclosure

Trading foreign exchange and gold carries significant risk of loss. Past performance is not indicative of future results. The martingale component of this EA means that consecutive losing trades result in increasing position sizes — while the maximum grid depth is capped at 3 levels and all levels are direction-filtered, adverse market conditions can still result in losses. Always test on a demo account before deploying on a live account. Never risk capital you cannot afford to lose.

Frequently Asked Questions

Q: Which brokers does this work with? Any broker offering XAUUSD with market execution and spreads under 35 points. ECN/STP brokers are preferred for tighter spreads and faster execution.

Q: Do I need to run this 24/5? Yes. The EA needs to be running to monitor the Friday close, daily DD limits, and trailing stops. A VPS is strongly recommended.

Q: Can I run this on multiple accounts? Yes. Use a different MagicNumber for each account to prevent cross-account interference.

Q: What happens during high-impact news events? The session filter limits trading to London and NY windows which naturally avoids most Asian-session news. For FOMC, NFP, and CPI releases that fall within trading hours, it is recommended to temporarily disable automated trading in MT5 before the event and re-enable after.

Q: Can I adjust the grid step? Yes. GridStepPips = 20 is the default and works well for gold's typical intraday volatility. In higher-volatility periods you can increase this to 25–30. Lower values increase frequency but also increase the chance of multiple levels stacking quickly.

Q: What timeframe does the EA use? M5 only. All indicator calculations, entry logic, and the bar timer operate on M5. Do not attach to any other timeframe.


Mais do autor
Gold Trading Coach
Rahinj Rohit Deepak
Product Overview This product is a gold trading indicator that provides clear, real-time buy and sell signals based on smart market conditions. It is not automated and does not provide guidance or coaching —it simply helps you spot trading opportunities faster. Key Advantages 1. Fast & Clear Signals Instantly shows buy and sell opportunities on the chart No need for complex analysis 2. ️ Real-Time Performance Works live on gold (XAUUSD), especially on lower timeframes like M5 Helps captu
Filtro:
Sem comentários
Responder ao comentário