GoldLab Fibo Pullback
- Experts
- Versione: 1.0
- Attivazioni: 5
Fibonacci pullback EA for XAUUSD: finds the last impulse swing, enters the 50-61.8% zone on a confirmation candle, stop past 78.6%, target 127.2%.
GoldLab Fibo Pullback is an Expert Advisor that trades Fibonacci retracements of the most recent impulse move. It was designed for XAUUSD (Gold) and also runs on forex pairs and other CFDs. All swing detection is done inside the EA - no external indicators are needed. Every trade has a stop-loss.
How it trades
- Swing detection: swing highs and lows are found in code (a bar that is the highest/lowest of N bars on each side, default 5). The most recent completed swing pair defines the impulse leg.
- Impulse filter: the leg must be at least a minimum size in ATR (default 2.0 x ATR), its extreme must not have been exceeded since, and the setup expires a set number of bars after the swing extreme.
- Entry zone: price retraces into the 50% - 61.8% zone of the impulse.
- Confirmation: a closed candle in the trend direction (bullish for an up impulse, bearish for a down impulse) that closes back on the trend side of the 61.8% level.
- Stop-loss: beyond the 78.6% retracement plus a small ATR buffer. If price trades through 78.6% before entry the setup is cancelled.
- Take-profit: the 127.2% extension of the swing (default), the 161.8% extension, or a retest of the swing extreme. Optional break-even when the trade has covered part of the way to target.
- Only one trade per swing; optional EMA trend filter.
Risk management
- Risk % per trade (default 1% of equity) - the lot is calculated from the actual stop distance. A fixed lot can be used instead.
- Daily loss limit (default 3% of the day-start equity).
- Maximum spread filter and optional trading hours.
- Free-margin check, broker volume limits and stop/freeze levels are respected before every order. One position at a time; works on hedging and netting accounts.
Main inputs
| Group | Input | Default | Meaning |
|---|---|---|---|
| Swing | Signal timeframe | H1 | Timeframe for swing detection (chart timeframe can be anything) |
| Swing | Swing depth (bars each side) | 5 | Swing point sensitivity |
| Swing | Lookback (bars) | 200 | Search range |
| Swing | Min impulse (x ATR) | 2.0 | Ignore small swings |
| Swing | Setup expiry (bars) | 40 | Bars allowed after the swing extreme |
| Entry | Zone start / end % | 50 / 61.8 | Retracement entry zone |
| Entry | Stop level % / Stop buffer (x ATR) | 78.6 / 0.2 | Stop placement |
| Entry | Target | 127.2% | 127.2%, 161.8% or 100% |
| Entry | Use trend EMA / EMA period | false / 100 | Optional trend filter |
| Entry | Break-even at % of target | 50 | 0 = off |
| Position size | Risk % / Fixed lot / Max lot | 1.0 / 0 / 10 | Position sizing |
| Safety | Daily loss limit % | 3.0 | 0 = off |
| Safety | Max spread (points) | 50 | 2-digit gold scale: 100 = 1.00 USD |
| Safety | Use hours / Start / End | false / 1 / 22 | Optional server-time window |
| Safety | Magic number | 26101001 | Change it to run several copies on one symbol |
Recommendations
- Symbol: XAUUSD (or your broker's gold symbol). Signal timeframe: M30, H1 or H4.
- Hedging or netting accounts; low-spread accounts preferred for gold.
- Start on a demo account with the default 1% risk and test the settings in the Strategy Tester with your broker's data first. A VPS is recommended for 24/5 operation.
Important No martingale, no grid, no averaging - every position has a stop-loss. Retracements sometimes turn into full reversals, and the EA waits for clean swings, so it may trade only a few times per week. Trading gold, forex and CFDs is high risk and you can lose your capital. No trading system wins every trade, and past or backtested results do not guarantee future results. Only trade money you can afford to lose and always test on a demo account first.
