Fafnir EA user guide for version 4.0, setup, presets, inputs and FAQ

Fafnir EA user guide for version 4.0, setup, presets, inputs and FAQ

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

This is the user guide for Fafnir version 4.0, an Expert Advisor for MetaTrader 5. From a single XAUUSD M5 chart it runs two independent strategies. SOL trades gold by day with five modules, and ECLIPSE fades the New York close on four FX pairs by night.

Live signal /en/signals/2399375

How the live account compares with the Strategy Tester, trade by trade /en/blogs/post/782258


1. QUICK START

  1. Use a hedging account and open one chart, XAUUSD M5. Any gold symbol name works (XAUUSD, XAUUSD+, GOLD and so on).
  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 by itself (and the VIX symbol, if your broker has one) and trades them from the same chart.

Use one chart per account. A second Fafnir with the same magic number refuses to start.


2. REQUIREMENTS

  • A hedging account.
  • A broker with low spread on gold (RAW or ECN account) and server time GMT+2 or GMT+3.
  • Leverage of 1:100 or more. With 1:30 or less some Talon orders will not fit in the margin.
  • A VPS close to the broker. Talon trades breakouts with stop orders, so fill speed matters. On the live signal the stop orders fill with a median delay of about 65 ms.
  • Recommended deposit from 1,000 USD. Smaller accounts work, with one thing to know. When your risk setting asks for less than the broker's minimum lot, Talon and Gavel trade the minimum lot with their normal stop, so the real risk of that trade is higher than the one you set. Sniper and Runner skip such a trade when the minimum lot would risk more than twice your setting.


3. WHAT EACH MODULE DOES

SOL, gold by day

  • 1 Sniper rests a stop order on the 12 hour high and low with a 5 USD stop. It banks part at +2R, adds at +3R and then trails. It trades while the 14 day average range of gold is above 60 USD.
  • 1 Runner breaks the daily extremes with a stop at 0.3 times the daily range, takes half at +1.2R and leaves after 8 hours. It keeps working when gold is quiet.
  • 2 Ratchet follows Runner fills with a tight trailing stop. It trades while the 14 day range is above 80 USD.
  • 3 Talon (new in 4.0) waits 2 USD before a swing high or low that has held for 5, 8, 12 or 24 hours, one order per time scale. Stop 2 USD, target 15 USD, and from 1 USD of profit it closes a trade that gives back half of its gain. While the 14 day range is 90 USD or more it adds a second order 3 USD before the level on the scales of 8 hours and more. It trades while the 14 day range is above 70 USD.
  • 5 Gavel sells gold at 10.15 London time and closes at 10.30, before the London morning auction. Once a day, with a stop on the server, while the 14 day range is above 60 USD. It skips UK bank holidays and steps aside by itself if its last 60 sessions stop being positive.

ECLIPSE, FX by night

  • 4 Night fades the move around the New York close on EURUSD, GBPUSD, AUDUSD and USDCAD. A basket can grow to five equal legs and closes at its target or by time, 12 hours at most. Since 4.0 a basket with all five legs carries a common stop at 0.5 times the average daily range from its average price, placed on the server, and no basket opens in the first hour of Monday.


4. 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

With version 2.0 in the Strategy Tester (XAUUSD M5, every tick based on real ticks, 10 Nov 2025 to 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 %. Those runs include neither Gavel nor the new Talon. Drawdown grows with risk, in the tester and in live trading.


5. POSITION SIZE

SOL, input InpSolSizing

  • Risk % of balance (default). Every trade risks InpSolRisk % of the balance. Each Talon order risks a quarter of it, because Talon can place several orders on one level.
  • Risk % of equity. The same, measured on equity.
  • Fixed lot. InpSolLot per order. Runner trades half of it and each Talon order a quarter.
  • Auto lot. InpSolStepLot for every InpSolStep of equity (default 0.01 lot per 1,000).

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

ECLIPSE, input InpEclSizing

  • Same risk as SOL (default, recommended). Follows InpSolRisk. InpEclMult scales it (0.5 is 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 means no limit).


6. ALL INPUTS

General

  • InpMagicBase magic number. SOL uses +0 to +57, ECLIPSE +100 and +2100.
  • InpComment order comment.
  • InpPanel shows or hides the panel on the chart.

SOL, gold

  • InpSolOn SOL on or off.
  • InpSolSizing, InpSolRisk, InpSolLot, InpSolStepLot, InpSolStep, InpSolMaxLot position size, see section 5.
  • InpSolBreakout module 1, Sniper and Runner.
  • InpSolRatchet module 2, Ratchet (needs module 1).
  • InpSolTalon module 3, Talon.
  • InpTalonGuard Talon pauses itself if its last 100 breakouts slipped more than this many USD on average (default 0.88, 0 is off). Orders filled together on one break count once.
  • InpTalonGuardFrom counts only fills after this date. Set it after moving to a faster broker or VPS.
  • InpTalonScales the time scales of Talon in hours (default 5,8,12,24).
  • InpTalonSecond the second order of Talon, 3 USD before the level (default on).
  • InpSolGavel module 5, Gavel.

ECLIPSE, FX night

  • InpEclOn module 4, ECLIPSE on or off.
  • InpEclSizing, InpEclMult, InpEclLot, InpEclStepLot, InpEclStep, InpEclMaxLot position size, see section 5.
  • InpVix name of the VIX symbol at your broker (empty switches the shield off).
  • InpVixLevel no new baskets while the VIX is above this level (default 40).
  • InpEclStop the common stop of a full basket (default on).
  • InpEclMonday no new baskets in the first hour of Monday (default on).

Protection

  • InpNews SOL stands aside around high impact news. The calendar is built into the EA and runs to June 2027.
  • InpDailyLoss pauses both strategies after a daily loss of this % of equity (0 is off).
  • InpMaxDD pauses both strategies after a drawdown from the peak of this % (0 is off).
  • InpWeekendFlat closes everything before the weekend (default on).
  • InpWeekendMin how many minutes before the Friday close of gold (default 60).

Strategy Tester

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


7. HOW TO BACKTEST

  • Symbol XAUUSD, timeframe M5, mode Every tick based on real ticks.
  • ECLIPSE trades the four FX pairs in the same run, so the tester downloads their history too.
  • 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. To see how close the tester gets to a real account, compare them trade by trade as in the post linked at the top.


8. QUESTIONS AND ANSWERS

Does Fafnir use martingale? No. The lot is never multiplied after a loss. Every gold order carries a stop loss on the server from the moment it is placed. ECLIPSE adds up to five equal legs to a basket. The legs have no stop of their own, and a full basket carries a common stop on the server.

Why did Talon open several trades at the same moment? When one swing high or low has held on several time scales, each scale places its own order on it, and with very active gold the longer scales add a second order. Up to seven orders can fill on one break. They are one trade idea and they win or lose together, each with its own 2 USD stop.

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

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

Talon has paused itself. What now? The slippage brake pauses Talon when its last 100 breakouts 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.

I updated from version 3. Do I need to change anything? No. Your settings are kept and the new inputs start at their defaults. The old Talon input InpTalonGuardN no longer exists, because the brake now always counts 100 breakouts.

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


VERSIONS

  • 4.0, 21 November 2026. New Talon on four time scales, basket stop and Monday pause for ECLIPSE, Sniper and Runner exits measured from the order price, news calendar to June 2027.
  • 3.0, 16 November 2026. Fifth module, Gavel.
  • 2.6, 13 November 2026, and 2.5, 10 November 2026. First releases on the Market.


Risk notice. Trading leveraged products carries a high risk of loss. Strategy Tester results do not guarantee future results. Fafnir depends on the volatility of gold, and in calm years its results were small. Test it on a demo account before using real money.