Fafnir EA - User Guide: setup, presets, inputs and FAQ

Fafnir EA - User Guide: setup, presets, inputs and FAQ

12 November 2026, 14:07
Alejandro Orbananos Fernandez
0
18

This is the user guide for Fafnir, an Expert Advisor for MetaTrader 5 that runs two independent strategies from a single XAUUSD M5 chart: SOL (gold breakouts by day) and ECLIPSE (FX fade by night).

Live signal: https://www.mql5.com/en/signals/2399375


1. QUICK START

  1. Use a hedging account and open one chart: XAUUSD, M5. Any gold symbol name works (XAUUSD, XAUUSD+, GOLD ...).
  2. Attach Fafnir and allow Algo Trading. If something is missing, the EA says so in the Experts log.
  3. Choose your risk per trade with InpSolRisk (default 1 %). Everything else can stay at its default.
  4. Leave it on the chart. ECLIPSE finds EURUSD, GBPUSD, AUDUSD and USDCAD (and the VIX symbol, if your broker has one) by itself and trades them from the same chart.

One chart per account: a second Fafnir with the same magic number refuses to start.


2. REQUIREMENTS

  • Account: hedging.
  • Broker: low-spread gold (RAW or ECN account), server time GMT+2 / GMT+3.
  • Leverage: 1:100 or higher. Accounts limited to 1:30 or less will miss some Talon entries.
  • Recommended deposit: from 1,000 USD. If the minimum lot would risk more than twice the risk you set, Fafnir skips that trade.
  • A VPS close to the broker is recommended: Talon needs fast stop fills (50 ms or less).


3. PRESETS

The three presets differ in one input only, so you do not need a file: load the defaults and change InpSolRisk.

  • Conservative - InpSolRisk = 1 (the default)
  • Balanced - InpSolRisk = 3
  • Aggressive - InpSolRisk = 10

In the Strategy Tester (XAUUSD M5, every tick based on real ticks, 10 Nov 2025 - 9 Nov 2026, deposit 1,000 USD, leverage 1:500) the maximum equity drawdown was 7.6 % at 1 % risk, 14.3 % at 2 %, 20.5 % at 3 % and 53 % at 10 %. Drawdown grows with risk, in the tester and in live trading. These are Strategy Tester results, not live trading.


4. POSITION SIZE

SOL (input InpSolSizing):

  • Risk % of balance (default) - every trade risks InpSolRisk % of the balance.
  • Risk % of equity - the same, measured on equity.
  • Fixed lot - InpSolLot (Runner and Talon trade half of it).
  • Auto lot - InpSolStepLot for every InpSolStep of equity (default 0.01 lot per 1,000).

InpSolMaxLot limits the lot per order (0 = broker limit).

ECLIPSE (input InpEclSizing):

  • Same risk as SOL (default, recommended) - follows InpSolRisk. InpEclMult scales it (0.5 = half).
  • Fixed lot per leg - InpEclLot.
  • Auto lot per leg - InpEclStepLot for every InpEclStep of equity (default 0.01 lot per 2,000).

InpEclMaxLot limits the lot per leg (0 = no limit).


5. ALL INPUTS

General

  • InpMagicBase - magic number (SOL uses +0 to +32, ECLIPSE +100 and +2100).
  • InpComment - order comment.
  • InpPanel - show or hide the on-chart panel.

SOL - gold breakouts (XAUUSD)

  • InpSolOn - SOL on or off.
  • InpSolSizing, InpSolRisk, InpSolLot, InpSolStepLot, InpSolStep, InpSolMaxLot - position size, see section 4.
  • InpSolBreakout - Sniper and Runner, on rolling liquidity levels.
  • InpSolRatchet - fast trailing on Runner fills (needs Breakout).
  • InpSolTalon - 72-hour breakout scalper.
  • InpTalonGuard - Talon pauses itself if its entries slip more than this many USD on average (default 0.88, 0 = off).
  • InpTalonGuardN - number of Talon fills in that average (default 50).
  • InpTalonGuardFrom - count only fills after this date. Set it after moving to a faster broker or VPS.

ECLIPSE - FX night (EURUSD, GBPUSD, AUDUSD, USDCAD)

  • InpEclOn - ECLIPSE on or off.
  • InpEclSizing, InpEclMult, InpEclLot, InpEclStepLot, InpEclStep, InpEclMaxLot - position size, see section 4.
  • InpVix - name of the VIX symbol at your broker (empty = shield off).
  • InpVixLevel - no new baskets while the VIX is above this level (default 40).

Protection

  • InpNews - SOL stands aside around high-impact news.
  • InpDailyLoss - pause both strategies after a daily loss of this % of equity (0 = off).
  • InpMaxDD - pause both strategies after a drawdown from the peak of this % (0 = off).
  • InpWeekendFlat - close everything before the weekend (default on).
  • InpWeekendMin - minutes before gold's Friday close (default 60).

Strategy Tester

  • InpTesterLog - file name for a trade log (empty = off).


6. HOW TO BACKTEST

  • Symbol XAUUSD, timeframe M5, mode "Every tick based on real ticks".
  • It is a multi-currency test: ECLIPSE trades the four FX pairs in the same run.
  • The news filter also works in the tester, because the calendar is embedded in the EA.
  • Results depend on your broker's tick history, spread and execution.


7. QUESTIONS AND ANSWERS

Does Fafnir use martingale? No. The lot is never multiplied. Every gold order carries a stop loss on the server from the moment it is placed. ECLIPSE can add up to 5 equal legs to a basket; its legs have no individual stop loss and the basket closes by its target or by time (12 hours at most).

Can I run only gold, or only FX? Yes. InpSolOn and InpEclOn switch each strategy on or off, and each gold module has its own switch.

Why does it trade little in some weeks? The gold engines arm only when the 14-day average daily range of gold is wide (above 60 USD for Sniper, above 80 USD for Ratchet and Talon). In quiet markets Fafnir trades less instead of forcing entries.

Talon has paused itself. What now? The slippage brake pauses Talon when its last 50 entries slipped more than InpTalonGuard on average. After moving to a faster broker or VPS, set InpTalonGuardFrom to that date so that only the new fills count.

Where do I get support? In the Comments tab of the product page, or by private message here on MQL5.


RISK NOTICE: Trading leveraged products involves a high risk of loss. Strategy Tester results do not guarantee future performance. Fafnir depends on the volatility of gold: in calm years its results were small. Test it on a demo account before using real money.