Golden Zone Trading Robot
- Experts
- Versione: 1.0
- Attivazioni: 10
Overview
Golden Zone Trading Robot is an automated trading EA designed exclusively for XAUUSD (Gold).
This EA integrates two independent entry strategies into a single system:
- Bollinger Band Mean-Reversion Strategy (BB)
- Support/Resistance Breakout & Retest Strategy (SR)
The BB and SR strategies each use their own independent timeframe and magic number, so they can be individually enabled/disabled, backtested, optimized, and tuned.
The EA also features trading logic based on the three major sessions — Tokyo, London, and New York. Trade direction, take-profit, stop-loss, maximum holding time, and other parameters can be configured independently for each session, allowing the EA to adapt to the different price behavior of Gold at different times of day.
Two Independent Trading Strategies
1. Bollinger Band Strategy (BB)
The BB strategy primarily judges entries based on price contact with the Bollinger Bands and mean reversion (counter-trend trading).
In addition to the Bollinger Bands themselves, the following filters can be combined:
- RSI
- ATR
- Trend Filter
- Moving Average
- ADX
- Band Touch Count
- Pin Bar Condition
BB Period, Deviation, TP, SL, Maximum Holding Time, and exit conditions can also be configured independently for the Tokyo, London, and New York sessions, allowing the BB strategy to be tuned to the different volatility of each time period.
2. Support/Resistance Strategy (SR)
The SR strategy analyzes historical price data to identify key Support/Resistance zones, then judges entries based on breakouts and retests of those zones. The timeframe used to detect S/R zones can be separated from the timeframe used to judge actual entries.
Key settings include:
- S/R Analysis Timeframe
- Entry Timeframe
- Lookback Bars
- Breakout Buffer
- Retest Tolerance
- Maximum Bars to Retest
- Maximum Retest Time
- ATR Rebound
- Touch Count Filter
- Rebound Candle Confirmation
- Session-based TP/SL
- Maximum Holding Time
- Dedicated SR Trailing
Support/Resistance zones can be displayed directly on the chart, allowing you to visually confirm which price areas the EA is using to make decisions.
Session-Based Trading
Golden Zone Trading Robot supports the three major sessions: Tokyo, London, and New York.
Each session can be individually turned on/off, with configurable start and end times. For each strategy, the following can also be adjusted per session:
- Buy/Sell direction
- TP
- SL
- ATR-based TP/SL
- Maximum holding time
- Various exit conditions
Because Gold's volatility and liquidity change significantly depending on the time of day, using the same parameters across all sessions is not ideal — this EA allows settings tailored to the characteristics of each session.
Exit & Trailing Features
Golden Zone Trading Robot includes multiple exit and trailing features for position management.
Break-Even When a set risk-reward (RR) ratio is reached, the stop-loss can be moved to near the entry price. An offset can also be configured to lock in a certain amount of profit when moving the SL.
Trailing Stop Once the configured condition is met, the stop-loss automatically trails the price. Trailing distance can be set using either a fixed-pips method or an ATR-based method. The ATR method adjusts the trailing distance according to current market volatility.
Enhanced Trailing An additional stage can be configured to tighten the trailing distance as profit increases further. The BB strategy includes break-even, ATR trailing, minimum/maximum trailing distance, and a "tighten after profit extension" setting. The SR strategy has its own independent trailing configuration as well.
Risk Management
Fixed Lot / Dynamic Lot In addition to a standard fixed lot size, Dynamic Lot can calculate lot size based on account balance and risk percentage. A maximum lot cap can also be set.
Risk Profile Risk settings can adjust lot multipliers and certain entry conditions, allowing you to scale from a conservative to a more aggressive approach depending on your trading policy.
Daily Drawdown Protection New trades can be stopped once the daily loss rate reaches a configured threshold. Depending on settings, open positions can also be force-closed when the daily DD limit is hit.
Weekly Drawdown Protection A cap can also be set on weekly losses. When the weekly DD limit is reached, trading stops, and can be configured to automatically resume the following week.
Maximum Drawdown Protection Peak-based maximum DD protection can restrict trading once drawdown from the account equity peak exceeds a set threshold — an additional layer of protection separate from the daily/weekly DD limits.
Cooldown After Consecutive Losses After a configured number of consecutive losses, new entries can be paused for a set period — a feature designed to reduce the risk of repeated entries during periods when the strategy and market conditions are temporarily misaligned.
Spread & News Filters
Spread Filter New entries can be restricted when the spread exceeds a configured threshold, helping avoid entries when trading costs suddenly widen.
News Filter New entries can be paused before and after major economic news releases. Configurable items include:
- High Impact
- Medium Impact
- Pre-release pause duration
- Post-release pause duration
- Target currencies
Day-of-Week Parameters
Golden Zone Trading Robot allows a different .set file to be used for each day of the week — Monday through Friday. You can use the same parameters across all days, or use settings optimized for each individual day.
Discord Notifications
The EA includes a notification feature via Discord Webhook. Notification types include entries, exits, order failures, drawdown events, economic news, and session information. Notification colors can also be set differently for Buy and Sell trades, making it easier to monitor the EA's activity without constantly watching the MT5 screen.
Parameter Reference
Common Parameters
| Parameter | Description |
|---|---|
| Lots | Fixed lot size when Dynamic Lot is not used |
| Trading Day | Days of the week the EA is active |
| Trading Sessions | Enable/disable and trading hours for Tokyo, London, and New York |
| DynamicLot_RiskPct | Account risk percentage when Dynamic Lot is used |
| Risk Profile | Adjusts lot multiplier and certain entry conditions |
| Spread Filter | Maximum allowable spread |
| Daily / Weekly / Maximum DD | Daily, weekly, and peak-based drawdown protection |
| News Filter | Entry pause duration before/after news releases |
| Cooldown | New-entry pause duration after consecutive losses |
| EOD Force Close | Force-closes remaining positions at a specified time |
BB Key Parameters
| Parameter | Description |
|---|---|
| BB Period | Bollinger Band calculation period. Shorter = more sensitive to price changes; longer = smoother bands |
| BB Deviation | Determines band width. Smaller = more band touches; larger = waits for bigger price moves |
| RSI | Momentum condition for Buy/Sell entries |
| ATR | Used to judge whether current volatility meets the configured condition |
| Trend Filter | Judges trend state using moving averages, ADX, etc. |
| Band Touch | Uses price contact with the upper/lower band as an entry condition |
| TP / SL | Configurable per session; fixed pips or ATR-based |
| Maximum Holding Time | Closes the position if held longer than the specified duration |
SR Key Parameters
| Parameter | Description |
|---|---|
| Lookback Bars | Number of historical bars used to determine S/R |
| Breakout Buffer | How far price must move beyond S/R to be recognized as a breakout |
| Retest Tolerance | How closely price must return to the S/R zone to be recognized as a retest |
| Maximum Bars to Retest | Maximum number of bars to wait for a retest after a breakout |
| Maximum Retest Time | Time-based limit for waiting on a retest |
| ATR Rebound | Evaluates rebound strength near S/R using ATR |
| Touch Count | Filters S/R zones by number of touches |
| Session TP / SL | Session-based TP/SL and maximum holding time for the SR strategy |
Parameter Optimization & Tuning Guide
Golden Zone Trading Robot has a large number of settings, so a staged optimization approach is recommended rather than optimizing everything at once. In the MT5 Strategy Tester, you can select the input parameters to optimize, set their Start/Step/Stop values, and choose between the fast genetic algorithm and a full/exhaustive search.
STEP 1 — Choose the Test Period Use a period that includes as many different market conditions as possible — uptrend, downtrend, range, high volatility, and low volatility. Rather than seeking the highest profit over a short window, look for a setting that doesn't break down excessively across different market conditions.
STEP 2 — Optimize BB and SR Separately Optimize BB (BB=ON, SR=OFF) → optimize SR (BB=OFF, SR=ON) → final check (BB=ON, SR=ON). This makes it easier to determine which strategy is driving profit, loss, and drawdown.
STEP 3 — Optimize Key Parameters First
- BB: BB Period → BB Deviation → RSI → TP/SL → Maximum Hold, then adjust Trailing, Trend Filter, and other entry/exit filters once a stable range is found.
- SR: Lookback → Breakout Buffer → Retest Tolerance → Touch Count → TP/SL → Maximum Hold, then adjust ATR Rebound, Trailing, and additional confirmation conditions.
STEP 4 — Optimize by Session Check Tokyo → London → New York in order, following Direction → TP → SL → Hold for each. Since the optimal settings differ between sessions, evaluate each one individually.
STEP 5 — Set Minimum Quality Criteria The EA includes Optimize_MinTrades, Optimize_MinPF, and Optimize_MaxDDPercent. Rather than simply choosing the result with the highest total profit, evaluate Profit Factor, maximum DD, number of trades, Recovery Factor, expected payoff, equity curve, and forward test results together.
STEP 6 — Look for a Stable Parameter Range Optimization isn't just about finding the single best-performing value. For example, if values of 18–24 all perform "Good" while 36 shows a spike in profit and 38 performs "Poor," a range like 18–24 (where neighboring values are also stable) is preferable to a single outlying peak at 36. Since the genetic optimizer selects candidates based on the chosen evaluation criterion, what you choose to maximize also matters.
STEP 7 — Forward Test Validate parameters on a period not used for optimization (e.g., optimize on March–June, forward test on July–September). Settings that perform very well during optimization but degrade significantly during forward testing should be deprioritized. Favor settings that hold up reasonably well in both backtesting and forward testing.
STEP 8 — Refine the Stable Range Start with a broad, coarse search (e.g., 50 → 100 → 150 → 200). Once a stable range is identified (e.g., around 100–150), narrow the range and reduce the step size (e.g., 100 → 110 → 120 → 130 → 140 → 150).
STEP 9 — Combined BB + SR Test After individually tuning BB and SR, re-test with both enabled (BB=ON + SR=ON). Check total profit, Profit Factor, maximum DD, number of trades, Buy/Sell balance, equity curve, maximum consecutive losses, and per-session performance — evaluating the combined drawdown and equity curve as they would run on the same account simultaneously, rather than judging each strategy's profit in isolation.
STEP 10 — Final Confirmation on a Demo Account Before going live, the final .set file should be verified on a demo account, paying particular attention to spread, slippage, stop level, contract size, execution, filling mode, trading hours, and news timing. MT5's tester also supports real-tick testing for a closer simulation of actual market conditions.
When to Re-Tune Parameters
Changing parameters after just a few losing trades is not recommended. Consider re-evaluating when:
- Forward performance has deteriorated over a sustained period
- Drawdown has begun to significantly exceed the expected range
- Profit Factor has clearly declined
- The number of trades has changed significantly
- Performance has broken down in a specific session only
- Market volatility characteristics have changed substantially
Frequently adjusting parameters in response to short-term losses can lead to overfitting.
Recommended Tuning Flow
① Determine test period → ② Optimize BB standalone → ③ Forward-test BB → ④ Optimize SR standalone → ⑤ Forward-test SR → ⑥ Optimize by session → ⑦ Select a stable range → ⑧ Fine-tune → ⑨ Combined BB + SR test → ⑩ Final forward test → ⑪ Demo account verification → ⑫ Confirm risk settings and go live
Recommended Environment
- Symbol: XAUUSD
- Timeframes: M3 / M5 / M15
- Initial Optimization: For a large number of parameters, a broad search using the genetic algorithm is available (MT5 supports both the fast genetic algorithm and full/exhaustive search)
- Forward Testing: Recommended after optimization
- Broker Account: A broker supporting standard order execution for Gold
- Before Live Trading: Verify spread, stop level, and execution conditions on a demo account
Important Notes on Optimization
The goal of optimization is not simply to find the parameters with the highest historical profit. What matters is evaluating reasonable profit, an adequate number of trades, acceptable drawdown, a stable surrounding parameter range, and solid forward-test results together — the aim is to find a "stable parameter range," not a single overfitted peak.
Risk Disclosure
Past performance does not guarantee future profits. Backtest results, optimization results, and forward-test results are based on historical market data and do not guarantee future trading outcomes.
Actual results may differ due to market conditions, volatility, liquidity, spread, slippage, execution conditions, broker specifications, and other factors. Before using this EA on a live account, please conduct sufficient demo testing and configure lot size, drawdown, and other risk-related parameters according to your own risk tolerance.
