Skip to content

MetaTrader 5

Weekend Gap in Forex: The Sunday Open, Gap Risk and Stop Losses

A weekend gap in forex is the jump between the last price before the market closes on Friday and the first price when it reopens on Sunday evening, New York time. Nothing trades at the broker in between, so news from the weekend is priced in at once. A stop loss that the reopening price has already passed triggers on that first price and can fill beyond its level, so the loss can exceed the planned amount.

This guide in the trading mechanics library shows what a gap adds to a stop loss and why a PineConnector vol_dollar= size is a planned loss, not a cap. It also covers alerts sent while the market is closed.

Illustrative cover for weekend gaps in forex: price candles before and after an empty weekend band, with a dashed stop line crossed by the gap, and the official PineConnector logo.
Why the forex market gaps at the Sunday open, and what a gap does to a stop loss and a planned loss.

Weekend gaps at a glance

  • When forex closes and reopens: each broker sets its own hours. One US broker lists Sunday 17:05 to Friday 16:59, New York time.[1]
  • What a gap does to a stop loss: a qualifying quote beyond the stop triggers a close request, whose completion must be checked. MetaQuotes says a triggered stop order fills at its price or worse.[2]
  • Whether a vol_dollar= loss is a maximum: no. It is a planned loss at the stop, and gaps can make the actual loss differ.[3]
  • Whether alerts fire while the market is closed: not from the closed symbol's chart. Pine scripts run after price updates, and a closed market has none.[4]
  • Where the hours are listed: the MT5 Specification window shows each symbol's quoting and trading sessions for every day of the week.[5]

Why does the forex market gap at the Sunday open?

Spot forex has no single exchange and no official opening bell. The Federal Reserve Bank of New York describes FX transactions as occurring "across dozens of scattered trading venues, rather than over one central exchange".[6] Retail brokers therefore publish their own hours. One US broker lists forex hours of "Sun-Fri: 17:05 - 16:59" New York time, with a six-minute break each day and changes around daylight saving time and some public holidays.[1]

While a symbol's session is closed, orders on it cannot execute, but news keeps arriving. The first price after the open reflects all of it. If that price is far from Friday's last quote, the chart shows empty space between the two bars: the weekend gap.

Any pause in trading works the same way: a daily break, a holiday or, for share and index CFDs, the exchange's close or a halt. The SEC describes the most common regulatory halt as a "news pending" halt, which gives market participants time to assess the news.[7] Gaps also form in open markets. On 15 January 2015 the Swiss National Bank discontinued its minimum exchange rate of CHF 1.20 per euro.[8] ESMA later cited that sudden fall of the euro against the franc as leaving some retail investors owing providers very large sums.[9]

US daylight saving time runs until 1 November 2026, so 17:05 New York time is 21:05 UTC until then and 22:05 UTC afterwards.[10][11] MT5 shows trade times in the broker's server time zone, which can differ again.[2] See broker server time vs UTC vs TradingView and the forex market sessions guide.

How much can a gap add to a stop loss?

In these forex examples, Bid reaching a long’s Stop Loss, or Ask reaching a short’s, triggers a close request. It does not prove the close completed. MetaQuotes documents that an unsuccessful activation can be retried on a later qualifying tick. Check closing deals and any remaining position.[12]

MetaQuotes does not state a Stop Loss's fill price after a gap. For pending stop orders, it says a triggered order is executed "at the price equal to the specified one or worse".[2] The SEC describes stock stop orders the same way: the execution price "can deviate significantly from the stop price".[13] A gap fill is a form of slippage, so read the actual close price in the deal history.

Loss at a gapped stop = lots × pip value per 1.00 lot × (stop distance + gap beyond the stop), with distances in pips, before costs

Loss multiple = (stop distance + gap beyond the stop) ÷ stop distance

  • Stop distance: pips from entry to the stop, the distance used to size the position.
  • Gap beyond the stop: pips from the stop level to the actual close price. Only this part of a gap adds to the loss.
  • Pip value per 1.00 lot: pip size × contract size, in account currency. For EURUSD with a 100,000 contract, 0.0001 × 100,000 = 10 USD. Contract size is broker-specific and shown in the MT5 specification.[5]
  • Pip convention: the PineConnector pip of 10 quoting points, 0.0001 on a five-digit EURUSD quote.[14] Spread, commission and swap are left out; see transaction costs in algorithmic trading.

The loss multiple holds when the size came from a planned loss: lots = planned loss ÷ (stop distance × pip value per 1.00 lot), PineConnector's form before broker volume rounding.[3]

Worked example: a 20-pip stop and a gap 30 pips beyond it

Illustrative example, not a recommendation. A USD account buys EURUSD at 1.10000 on Friday with a planned loss of 100 USD and a stop 20 pips below entry, at 1.09800. With a pip value of 10 USD per 1.00 lot, the size is 100 ÷ (20 × 10) = 0.50 lots. The market closes with the Bid at 1.09900, 10 pips above the stop.

The first Bid on Sunday is 1.09500: 40 pips below Friday's close and 30 pips beyond the stop, which triggers on it. If the actual closing deal fills at 1.09500, the loss is 0.50 × 10 × (20 + 30) = 250 USD before costs, or (20 + 30) ÷ 20 = 2.5 times the plan. The extra 150 USD is the 30 pips beyond the stop: 0.50 × 10 × 30 = 150.

Illustrative diagram of a weekend gap in forex: a EURUSD long bought at 1.10000 with a stop at 1.09800 and 0.50 lots sized for a 100 USD planned loss; Friday closes at a Bid of 1.09900, the first Sunday Bid is 1.09500, with an assumed closing fill there giving a 250 USD loss before costs.
Illustrative prices, not a recommendation or a measured result. The assumed fill is at the first Sunday Bid. Only the 30 pips beyond the stop add to the planned loss. Costs are excluded; actual execution can differ.

The same 30 pips weigh less on a wider stop, because the planned loss stays at 100 USD and the position shrinks:

  • 20-pip stop: 100 ÷ (20 × 10) = 0.50 lots. Closed 30 pips beyond the stop: 0.50 × 10 × 50 = 250 USD, 2.5 times the plan.
  • 50-pip stop: 100 ÷ (50 × 10) = 0.20 lots. Closed 30 pips beyond the stop: 0.20 × 10 × 80 = 160 USD, 1.6 times the plan.
  • 100-pip stop: 100 ÷ (100 × 10) = 0.10 lots. Closed 30 pips beyond the stop: 0.10 × 10 × 130 = 130 USD, 1.3 times the plan.

The rows compare arithmetic, not stop placements. A wider stop also changes where and how often a strategy exits, and nothing here says which distance suits one. See stop loss placement methods and position sizing methods.

Why is a vol_dollar= size a planned loss, not a maximum?

PineConnector's syntax reference describes vol_dollar=100 as sizing a trade "for a planned loss of about 100 at the stop", in account currency. It needs an explicit stop in the same message.[15] The lot formula is the one above, and the same page states its limit: "Costs, fills, gaps and broker limits can make actual loss differ from the sizing input".[3] The EA settings reference calls setting-based loss sizing an estimate used for sizing, not a maximum realised loss.[16]

Demo test only. Confirm every account sharing the selected License ID is a demo account before creating the alert. These messages request broker trades or closures. Check the exact symbol and permitted volume, and add your configured secret= if required.[28]

Illustrative message, not a recommendation. Pasted into the TradingView alert's Message field, with your License ID in place of LicenseID and your broker's exact symbol, this requests the worked example's entry:

LicenseID,buy,EURUSD,vol_dollar=100,sl_pips=20

The message requests a market buy sized for a planned loss of 100 in account currency, with a stop 20 PineConnector pips from entry. On the docs' illustrative 10 USD pip value, the size is 100 ÷ (20 × 10) = 0.50 lots before rounding.[15] With the self-hosted EA's Shadow Targets at its documented default of Off, the EA uses normal broker stop-loss levels,[16] so a weekend gap affects the stop as in the worked example.

vol_pct_bal_loss= and vol_pct_eq_loss= are planned losses too, and vol_pct_bal_margin= allocates margin and is no loss limit at all.[17] The PineConnector docs pages reviewed for this article on 25 September 2026 describe no setting that caps a gapped stop's fill price.

Do TradingView alerts fire while the market is closed?

Not from the closed symbol's own chart. TradingView's Pine Script FAQ says scripts "execute on realtime bars only after new price updates", an alert fires only when a script executes, and "There are no price updates in a closed market".[4] A EURUSD chart condition therefore waits for the first post-gap update.

  • A chart that trades at the weekend can still fire. PineConnector's test guide notes that a round-the-clock chart such as BTCUSD can receive quotes while the broker's EURUSD session is closed. A complete test needs both a working chart and an open broker session.[18]
  • Chart hours may not match broker hours. TradingView's Help Center says forex trading hours "might also vary depending on the provider".[19] PineConnector's FAQ adds that TradingView and MetaTrader can use different data feeds, bid/ask quotes, spreads and timestamps.[20] See why TradingView prices differ from your broker's.
  • Fill-on-close strategies alert after the session. For strategies using process_orders_on_close, TradingView warns that alerts to a third-party service "still occur after the session closes". Real orders based on them "might not fill until after the market opens again".[21]
  • Backtests fill gaps at the next open. When price crosses an order's level between bars, the broker emulator fills at the opening price of the bar after the gap, using the chart's data by default.[21]

What happens to a PineConnector signal while the broker is closed?

An alert triggering, webhook delivery, PineConnector processing, the EA's order request and broker acceptance are separate stages. Market hours decide the last one.

  • The broker can refuse a closed symbol. PineConnector's error guide lists market closed for MT4 as error 132, meaning the symbol is outside its trading session. The fix: check its hours on the broker's server, "including holidays and session breaks", and send a new request once it is open and quoting.[22] In MQL5, trade server return code 10018, TRADE_RETCODE_MARKET_CLOSED, reads "Market is closed".[23]
  • Holding a signal for the open is not documented. As of 25 September 2026, the docs do not say that a closed-market signal is queued for the open. Not documented; test on demo.
  • Resending can duplicate an order. The error guide says not to keep resending against an unavailable quote.[24] The test guide says to check the account for an existing order before retrying.[18]
  • EA time filters sit on top of market hours. The EA's Active hours use broker server time, and signals outside the window are ignored.[16] They do not change the broker's session.
Illustrative diagram of a weekend closure in a TradingView-to-MT5 workflow: a broker-side stop loss is held on the broker's server and a qualifying quote triggers a close request whose completion must be checked; a TradingView strategy-only stop waits for a chart update, alert, webhook, PineConnector, EA request and broker acceptance; an alert from a weekend-trading chart reaches a closed symbol, and holding it for the open is not documented.
Illustrative summary of MetaQuotes, TradingView and PineConnector documentation as of 25 September 2026. Nothing here was tested on an account.

Orders already at the broker differ. MetaQuotes says Stop Loss and Take Profit are "stored and executed on the broker's server", and the broker performs a pending order even with the platform closed.[2] A broker-side stop is in place when trading resumes. A stop that exists only in a TradingView strategy is not: PineConnector's converter docs say simulated stops and targets are not copied to the broker.[25] That exit starts only after the open.

Where written rules require being flat before the weekly close, PineConnector's Close All Trades task can request closure of positions and pending orders at a set day and time each week.[26] The docs warn not to assume it covers only one strategy or comment, and to confirm the result in MetaTrader. Edge users should check Portal's task controls and ask Support if unsure.[26] Holding over a weekend is a strategy decision; the task only executes the rule.

Common mistakes with weekend gaps

  • Reading the planned loss as a cap. A vol_dollar= or percentage-of-balance size sets the planned loss at the stop level. The fill price decides the actual loss.[3]
  • Forgetting the side of the spread. A short position's stop is checked against the Ask.[12] If the spread is wider at the open than on Friday, the Ask can reach a short's stop while the Bid is still below it. See bid, ask and spread explained.
  • Treating stop out as a floor. A gap can take equity below the stop-out level before any position closes. ESMA's 2018 FAQ calls negative balance protection for retail CFD clients, rolling spot forex included, "a backstop for when MCO does not work effectively as a result of a very sudden price movement".[9] MCO is margin close-out. See margin call and stop out in MT5.
  • Recalculating stops from Friday's chart. After a gap, a stop or pending price from Friday's levels can land inside the Stops level channel, which MT5 answers with "Invalid Stops".[5] PineConnector notes that a TradingView price can be invalid at the broker.[27] See stops level and freeze level in MT5.
  • Ignoring weekend financing. The MT5 specification lists a swap multiplier for each day of the week, and MetaQuotes' own illustration charges three times the swap on Wednesday.[5] See swap, rollover and overnight fees.

Frequently asked questions

What time does the forex market open on Sunday?

There is no single official opening time, because spot forex trades across many venues rather than on one exchange, and each broker publishes its own hours. One US broker lists Sunday 17:05 New York time: 21:05 UTC during US daylight saving time, 22:05 UTC otherwise. Check your symbol's sessions in the MetaTrader 5 Specification window.

What is gap risk in trading?

Gap risk is the chance that price jumps from one level to another with no trading in between, so no order can execute at the prices skipped. Gaps appear across closures such as the forex weekend, holidays and exchange halts, and around sudden announcements. A stop loss inside the gap triggers on the first price after it, possibly well beyond the stop.

Can a stop loss fill beyond its price after a gap?

Yes. In the forex examples, Bid reaching a long’s Stop Loss, or Ask reaching a short’s, triggers a close request. A gap can leave the actual fill beyond the level. Activation is not proof of a completed close: MetaQuotes documents retrying on a later qualifying tick if the operation cannot execute. Check closing deals and any remaining position.

Do TradingView alerts trigger when the forex market is closed?

Not from the closed symbol's own chart. TradingView says Pine scripts run on realtime bars only after new price updates, and a closed market has none, so the alert waits for the reopening. An alert on a chart that trades at the weekend, such as BTCUSD, can still fire, but the broker's forex session must be open for an order to fill.

Does vol_dollar= limit my loss to the amount I set?

No. PineConnector's vol_dollar= sizes a trade for a planned loss at the stop, in account currency, from the stop distance and pip value. PineConnector's syntax reference says costs, fills, gaps and broker limits can make the actual loss differ. If a weekend gap closes a position 30 pips beyond a 20-pip stop, the loss is 2.5 times the plan before costs.

Reviewed 25 September 2026. Facts were checked against the linked sources on that date. Nothing in this article was tested on a trading account and no code was compiled.

Related reading

Sources

  1. OANDA – Trading hours of operation (US), accessed 25 September 2026.
  2. MetaQuotes – MetaTrader 5 Help: Executing Trades, accessed 25 September 2026.
  3. PineConnector – Syntax: loss-based sizing, accessed 25 September 2026.
  4. TradingView – Pine Script v6 User Manual: FAQ, alerts, accessed 25 September 2026.
  5. MetaQuotes – MetaTrader 5 Help: Market Watch and symbol specification, accessed 25 September 2026.
  6. Federal Reserve Bank of New York – Michelle Neal, Foreign Exchange Market Structure: The Land of a Thousand Lakes (19 November 2024), accessed 25 September 2026.
  7. U.S. Securities and Exchange Commission (Investor.gov) – Trading Halts and Delays, accessed 25 September 2026.
  8. Swiss National Bank – Swiss National Bank discontinues minimum exchange rate and lowers interest rate to –0.75% (press release, 15 January 2015), accessed 25 September 2026.
  9. ESMA – Frequently asked questions: ESMA's product intervention measures in relation to CFDs and binary options offered to retail investors (ESMA71-98-125, 27 March 2018), accessed 25 September 2026.
  10. NIST – Daylight Saving Time (DST), accessed 25 September 2026.
  11. Wikipedia – List of tz database time zones, accessed 25 September 2026.
  12. MetaQuotes – MetaTrader 5 Help: Basic Principles, accessed 25 September 2026.
  13. U.S. Securities and Exchange Commission (Investor.gov) – Stop, Stop-Limit, and Trailing Stop Orders: Investor Bulletin, accessed 25 September 2026.
  14. PineConnector – Syntax: the PineConnector pip, accessed 25 September 2026.
  15. PineConnector – Syntax: vol_dollar=, accessed 25 September 2026.
  16. PineConnector – EA settings reference, accessed 25 September 2026.
  17. PineConnector – Syntax: vol_pct_bal_margin=, accessed 25 September 2026.
  18. PineConnector – Test your setup: open TradingView's alert editor, accessed 25 September 2026.
  19. TradingView – What is the difference between ICE and other forex providers?, accessed 25 September 2026.
  20. PineConnector – Frequently asked questions: price differences, accessed 25 September 2026.
  21. TradingView – Pine Script v6 User Manual: Strategies, accessed 25 September 2026.
  22. PineConnector – EA errors: MT4 132, market closed, accessed 25 September 2026.
  23. MetaQuotes – MQL5 Reference: Trade Server Return Codes, accessed 25 September 2026.
  24. PineConnector – EA errors: match the message beside 4756, accessed 25 September 2026.
  25. PineConnector – Pine Script converter: what the converter supports, accessed 25 September 2026.
  26. PineConnector – Tasks: Close All Trades, accessed 25 September 2026.
  27. PineConnector – Syntax: sl_price=, accessed 25 September 2026.
  28. PineConnector – Test your setup: demo account and License ID scope, accessed 25 September 2026.

PineConnector executes the instructions you send it. It does not select trades, manage money, or hold funds. Trading carries risk, and past performance of any strategy does not indicate future results.


Leave a comment

Back To PiCo Blog

Ready when your strategy is

You bring the strategy.We bring the infrastructure.

Connect TradingView to MetaTrader, choose where MT5 runs and put the full PineConnector workflow through its paces from your first month.

Strategy and trading decisions remain yours. The MT5 environment can be ours.

PineConnector Edge

Run the full PineConnector workflow.

$59/mo at launch

Core plan · 1 connection · 1 hosted MT5 environment

Try Core for $7

7 days of Core for $7, then $59/month at the launch price unless you cancel.