ForexCopilotEA

Risk management

Weekend Gaps, Rollover and Swap for Expert Advisors: What Happens to Open Trades and How to Protect Them

By Benjamin Lee · Updated · 6 min read

Two moments in the trading week quietly cost Expert Advisor traders more than they expect: the daily rollover, when spreads widen and swap is charged, and the weekend, when the market closes with your positions still open. Neither is rare, and a backtest on clean data can hide both. This guide explains what happens at each, why a stop loss does not fully protect you over a weekend, how swap is calculated and when it is tripled, and the settings that let an EA close, pause or size down before these moments.

Key takeaways

  • At the daily rollover, spreads often widen sharply and swap is applied to positions held overnight.
  • Over a weekend, price can reopen far from Friday's close. A stop loss then fills at the new price, not yours.
  • Swap can be positive or negative and is often tripled on one day of the week; check your broker's table.
  • A weekend close option on the EA, or a Friday cutoff, removes gap risk at the cost of some trades.
  • Check broker server time, because rollover and the Friday cutoff are set in it.

The daily rollover

Rollover is the moment the trading day changes at your broker. For many MT5 brokers it falls at the New York close, which is around late evening in Central European Time. Two things happen. Swap, the interest cost or credit of holding a position overnight, is applied to every open trade. And liquidity thins, because banks and dealers are between sessions, so spreads often widen, sometimes by several times, for a short window.

For an EA that opens trades at any hour, rollover is a trap. A scalper with a one pip target that enters during the widest spread pays a large share of the target in cost, and a stop placed close to the market can be hit by the spread alone. Most well-built EAs include a rollover filter that blocks new trades for a window around the change of day. In the default setfile of one grid EA we reviewed, that window runs from 23:45 to 00:15 server time, which is typical of the idea.

Swap: the cost of holding overnight

Swap depends on the interest rate difference between the two currencies of a pair, adjusted by the broker, and it differs for long and short positions. Depending on the pair and direction it can be a charge or a credit. For gold and indices it is a financing cost built into the price. Brokers publish the values in the symbol specification, and many charge triple swap on one weekday to cover the weekend. For most forex pairs that day is Wednesday, but it varies by instrument, so look at your broker's table.

Swap example on a held position (illustrative values)
ItemValue
Position1.00 lot long EURUSD
Swap for the night (illustrative)minus 6 dollars
Triple swap dayminus 18 dollars
Swap over a 10-night holdabout minus 78 dollars, roughly 68 euros at 1.15
Typical profit target for a swing EAa few hundred dollars

For a short-term EA swap is small. For one that holds trades for days or weeks, it can erase a meaningful part of the edge, and it should be in the backtest. The tester charges swap using the symbol's values. Check the specification and make sure the test period used values similar to today's, because swap changes with interest rates. See spread, slippage and swap.

Weekend gaps

Forex and gold markets close on Friday evening and reopen on Sunday evening, European time. News and events do not stop over the weekend: elections, geopolitical events, central bank surprises and company news can all happen while the market is shut. When it reopens, the first price can be far from Friday's close. That is a gap. Price jumps over everything in between, so a stop loss does not execute at its level. It fills at the first available price after the reopening, which can be much worse.

A worked example in euros. An EA holds a 0.10 lot long on gold, 10 ounces, with a stop 8 dollars below the market. That is an 80 dollar planned loss, about 70 euros. A weekend event pushes gold 30 dollars lower at the open. The stop fills 30 dollars away, a loss of 300 dollars, about 260 euros, nearly four times the plan. On a 1,000 euro account that is 26 percent in one gap. The gold lot size calculator shows the sum for your numbers.

Settings that protect against both

Common EA protections
SettingWhat it doesTrade-off
Rollover filterBlocks new trades around the change of daySkips a short window, which is usually cheap to lose
Maximum spreadBlocks entries when the spread is too wideReduces trade count in thin markets
Friday cutoffStops new trades some hours before the weekendMisses late-week moves
Close before weekendCloses all positions at a set time on FridayAvoids gap risk but ends multi-day trades
Reduced size on FridayCuts lot size late in the weekSmaller gains, smaller gap loss
Swap awarenessAvoids or closes trades that carry heavy negative swapAlters the strategy's holding time
Triple swap day ruleCloses or avoids holding over the triple swap nightFewer held trades

All times in these settings are in broker server time, which is often two or three hours ahead of UTC with the daylight saving rules of the broker. Convert from your own time zone and re-check after clock changes, as covered in the gold EA settings guide. If the EA has no weekend setting, close positions by hand before the market shuts, or switch the EA to a mode that stops new entries on Friday.

  1. Step 1: Read the symbol specification

    Note the swap long and short values and the triple swap day. Compare with the EA's typical holding time.

  2. Step 2: Find your broker's rollover time

    Watch the spread in Market Watch around the change of day for a few evenings.

  3. Step 3: Set the rollover and Friday inputs

    Use the EA's filters, in server time, to cover the window.

  4. Step 4: Decide your weekend policy

    Close everything, reduce, or hold with a size that survives a gap.

  5. Step 5: Test with swap and gaps in mind

    Look at the backtest for trades held over weekends and see the biggest loss from a gap.

Weekend and rollover checklist
0/7

For news-driven moves see gold and news, and for the whole routine the MT5 Expert Advisors guide.

Sources and further reading

  1. MetaTrader 5 Help: Basic Principles of Trading OperationsOrders, deals and positions, and how netting and hedging accounts differ.
  2. MetaTrader 5 Help: Strategy TestingThe Strategy Tester: testing modes, settings and forward testing.
  3. MetaTrader 5 Help: Testing ReportWhat each figure in the tester's report means, including drawdown.

Frequently asked questions

What happens to my EA's trades over the weekend?

Open positions stay open while the market is closed. If price reopens far from Friday's close, a stop loss fills at the first available price, which can be well beyond the stop.

Should I close EA trades before the weekend?

It removes gap risk but ends multi-day trades. Many traders close or reduce on Friday for gold and volatile pairs. Decide by rule, and size positions to survive a gap if you hold.

What is triple swap?

A swap charge or credit applied three times on one weekday to cover the weekend. For most forex pairs it is Wednesday, but it varies by instrument, so check your broker's specification.

Why do spreads widen at rollover?

Liquidity is thin between trading sessions, so dealers quote wider spreads for a short time. An EA without a rollover or spread filter can open trades at the worst moment.

Does the backtest include swap and gaps?

The tester applies swap from the symbol's values and replays past gaps in the data. It cannot predict future gaps, and swap values change over time, so check both.

Expert Advisors in these styles

Apply the checks above to any of these before you buy: read the manual, run your own backtest, and start on demo.

Browse Expert Advisors