Gold Signal Generator detects BUY/SELL setups on Gold (XAU/USD) using MA crossover and RSI momentum, computes an ATR-based Stop Loss and 3–4 Take Profit levels, and draws everything on the chart. Signals-only by default (auto-trade is OFF), with optional risk-managed auto-trading.
Gold Signal Generator is a no-nonsense signal and trading Expert Advisor built specifically for gold instruments (XAU, GOLD)*. It evaluates the market once per closed bar — signals never repaint — and marks entry, Stop Loss and up to 4 Take Profit levels directly on the chart together with a live dashboard.
How the signal engine works
Three built-in signal modes, selectable in one click:
| Mode | Logic |
| MA Crossover | Fast MA crosses above/below the slow MA on the closed bar |
| MA + RSI (default) | Same crossover confirmed by RSI momentum (RSI below 62 for buys, above 38 for sells, plus directional RSI) — fewer, higher-quality signals |
| RSI Reversal | RSI crossing back up through the oversold level (30) = BUY, crossing down through overbought (70) = SELL |
All signals are taken from closed candles only — no repainting, no re-drawing of old signals.
Stop Loss & Take Profit logic
- Stop Loss = signal price ∓ SL ATR multiplier × ATR(14) — the stop adapts to current market volatility automatically.
- Take Profits = 3 or 4 levels, spaced by R-multiples of the SL distance (defaults TP1 +0.5R, TP2 +1.0R, TP3 +1.5R, TP4 +2.0R).
- Every SL/TP level is drawn as a labeled horizontal line with color coding and R-distance labels.
- Optional partial profit taking: close 20% at TP1, 25% at TP2, 25% at TP3, and let the broker's hard TP (TP4) handle the remainder — classic "let the runner run" money management.
Always-on chart toolkit
- Live dashboard panel — signal mode, live EMA fast/slow values + gap, live RSI, last signal time, entry/SL/TP1–TP4 prices, open position and account P&L.
- EMA fast/slow overlay lines — shows the signal engine state in real time (UPTREND / DOWNTREND / FLAT).
- BUY/SELL arrows plotted on the signal bar.
- Per-bar journal state line — each new bar the Expert logs trend, EMA and RSI values so you can audit every decision.
Optional Auto-Trading (OFF by default)
The EA is first and foremost a signal generator. Auto-trading is disabled out of the box. When enabled, it includes:
- Risk-based lot sizing — risk a % of account equity per trade based on the real SL distance
- Min-lot SL risk cap (default 5% of equity) — protects small accounts
- Spread filter (max 0.60 USD) — avoids opening in wide spreads
- Session filter — trades only inside a server-hour window you define
- Cooldown bars after a signal — suppresses signal spam
- Opposite signal closes the current position (single-position hedge-free logic)
- Broker stops-level validation and price normalization on every entry
Notifications
Popup alert, sound (alert.wav) and push notifications on every signal — each can be toggled.
📋 Input Parameters
🎛️ Signal Strategy
| Input | Default | Description |
| Signal mode | MA crossover + RSI | MA crossover / MA+RSI / RSI reversal |
| MA type | EMA | SMA or EMA |
| Fast MA period | 12 | — |
| Slow MA period | 26 | — |
| RSI period | 14 | — |
| RSI oversold (buy level) | 30 | RSI mode buy trigger |
| RSI overbought (sell level) | 70 | RSI mode sell trigger |
| MA+RSI: max RSI for buy | 62 | momentum filter |
| MA+RSI: min RSI for sell | 38 | momentum filter |
| Cooldown bars | 0 | skip N bars after a signal |
🥇 Gold Guard
| Input | Default | Description |
| Only trade gold symbols | true | blocks non-XAU/GOLD symbols |
| Session filter | false | only act in a defined hour window |
| Session start hour (server) | 8 | — |
| Session end hour (server) | 22 | — |
🛑 Stop Loss / Take Profit
| Input | Default | Description |
| ATR period | 14 | — |
| SL distance × ATR | 1.5 | Stop-loss = ATR multiple |
| Number of TP levels | 4 | 3 or 4 |
| TP1 × SL distance | 0.5 | TP1 |
| TP2 × SL distance | 1.0 | TP2 |
| TP3 × SL distance | 1.5 | TP3 |
| TP4 × SL distance | 2.0 | TP4 |
📊 Dashboard
| Input | Default | Description |
| Panel top margin (px) | 40 | dashboard offset |
🔔 Alerts & Logging
| Input | Default | Description |
| Popup alert | true | — |
| Sound alert | true | — |
| Push notification | false | — |
| Verbose journal per bar | true | — |
🤖 Optional Auto-Trade (OFF = signals-only)
| Input | Default | Description |
| Enable auto-trading | false | OFF = signals only |
| Risk per trade % equity | 1.0 | 0 < risk ≤ 20 |
| Max spread (USD) | 0.60 | entry guard |
| Min-lot SL risk cap % | 5.0 | small-account guard |
| Partial TP enabled | true | close shares at TP1–TP3 |
| % closed at TP1 | 20 | — |
| % closed at TP2 | 25 | — |
| % closed at TP3 | 25 | remainder at TP4 |
| Magic number | 778001 | isolates this bot's trades |
| Max deviation (points) | 20 | — |