Need Help with Forex Trading Times and Spread Variations

 

Hi everyone,

I've been struggling a bit with understanding the Forex trading times and spread variations, and I'm hoping some of you experts can help me out.

My broker's website states that "server time and charts are GMT + 2 or GMT + 3 (when daylight savings is in effect)." The broker also mentioned that GMT+2 and GMT+3 are equivalent to UTC+2 and UTC+3. They provided a table with the four major markets (Sydney, Tokyo, London, and New York) showing the local opening times and corresponding UTC times (TABLE 1). I extended this table to include UTC+2 and UTC+3 times to be equivalent to GMT+2 and GMT+3.

Table 1 - Sessions Local and UTC Time

My broker also states that spreads start at 0.0 pips on the MetaTrader 4 and 5 platforms, with the average on EURUSD being 0.1 pips 24/5. Of course, I understand that spreads are not always 0.1 pips. I've noticed that spreads tend to widen significantly to around 4 pips ± around 11 PM UTC (which is 23:00 in 24-hour format). The high spreads last until around 4-5 AM the next day. This seems to coincide with the Sydney and Tokyo sessions (TABLE 2). However, the spreads start to normalize by the middle of the Tokyo session.

Currently, I'm backtesting during winter time, which is UTC+2. Therefore, the second table with the marked sessions is also based on UTC+2.

Table 2 - Marked Sessions

I'm looking for confirmation from Forex experts on whether my tables are correct. I've done a lot of googling, but the times and time shifts are quite confusing. I've found many different representations and times and am unsure if my table is accurate. Additionally, I'd like to know if it's generally the case that spreads widen at the start of the Sydney session and only normalize by the middle of the Tokyo session, or if this is broker-specific. My broker is quite well-known, and I use a RAW Spread account. I've tested many brokers and think mine has some of the lowest spreads.

Furthermore, I'd like to ask how you deal with these spreads. I scalp on M1 to M15, and in the M1 timeframe, I find it challenging to open trades with spreads of 4 pips ±. The bars are based on bid prices, and the spread is often much larger than individual M1 bars. How do experienced scalpers or traders on small timeframes handle these high spreads? Is there a way to trade effectively during these times, or do you just avoid these periods?

Thank you all for your input. I'm looking forward to hearing your experiences and advice.

 
ammer.jens: I've been struggling a bit with understanding the Forex trading times and spread variations,

Chart times are broker times.

  1. How can MetaQuotes know all brokers' (they come and go daily) Time zone and Daylight savings time (if they use it and including historical changes for back testing)? Do you have that information for just you and your broker? Only then, with code, can you convert session times to broker's time to UTC to local time. You can use offset inputs, but then you must maintain them correctly, through both DST changes when they occur.
              When is the time zone problem going to be fixed? - General - MQL5 programming forum (2020)

    There are libraries to determine DST automatically from chart's data.
              Determine Broker's Daylight (DST) schedule (2024)

  2. Foreign Exchange (FX) market opens 5 PM New York (NY)/Eastern Time (ET) Sunday and ends 5 PM NY Friday. Some brokers start after (6 PM is common) and end before (up to 15 minutes) due to low volatility.
              Checking for Market Closed - Expert Advisors and Automated Trading - MQL5 programming forum (2016)

    Swap is computed 5 PM ET. No swap if no open orders at that time.

  3. Brokers use a variety of time zones, their local time, with or without Daylight Savings Time (DST), London (GMT/BST), UTC, London+2, UTC+2, NY+7.

    Only with NY+7 does the broker's 00:00 equals 5 PM ET and the start of a daily bar (and H4) is the start of a new FX day.

    GMT/BST brokers, means there is a 1 or 2 hour D1/H4 bar on Sunday (depending on NY DST), and a short Friday bar. (Problems with indicators based off of bars.)

    GMT+2 is close but doesn't adjust for NY DST.

    EET is closer, except when their DST doesn't match NY's. Last Sunday of March and 1:00 on the last Sunday of October vs second Sunday in March and return at 2:00 AM EDT to 1:00 AM EST on the first Sunday in November.

  4. Non-NY+7, means the chart daily bar overlaps the start, and converting broker time to NY time requires broker to UTC to NY timezone conversions.


  5. If you search the web, you will find differing answers. Those are all wrong (half the year) because they do not take DST into account (or that it changed for the US in 2007 [important when testing history.])


  6. Then there are (non-24 hour markets) with H4 candles that start on odd hours.
              Why My XAUUSD 4H candles start with 1 hour shift? - Currency Pairs - General - MQL5 programming forum (2019)
              H4 first opened candle - MT5 - General - MQL5 programming forum (2020)

    And H1 on the half hour.

  7. See also Dealing with Time (Part 1): The Basics - MQL5 Articles (21.10.01)
    and Dealing with Time (Part 2): The Functions - MQL5 Articles (21.10.08)

 
ammer.jens:


Furthermore, I'd like to ask how you deal with these spreads. I scalp on M1 to M15, and in the M1 timeframe, I find it challenging to open trades with spreads of 4 pips ±. The bars are based on bid prices, and the spread is often much larger than individual M1 bars. How do experienced scalpers or traders on small timeframes handle these high spreads? Is there a way to trade effectively during these times, or do you just avoid these periods?

Thank you all for your input. I'm looking forward to hearing your experiences and advice.

You know it might help you out if you make an information panel that prints the current spread in points directly on the top left of your chart (and updates every tick).

 
Conor Mcnamara #: You know it might help you out if you make an information panel that prints the current spread in points directly on the top left of your chart (and updates every tick).

Why? Just enable the "Spread" column in the Market Watch panel and you can observe the spread in real-time (in points)?


 
You tables are of course wrong.

The first session always opens:

** 9 pm UTC during the US summer (2nd Sunday March, to 1st Sunday November)

** 10 pm UTC during the US winter (the remaining of the year). 

The above two hours are corresponding to 05:00 PM NY time, as explained by William.

The Fx opening switch from 9 pm UTC in summer to 10 pm UTC occurs exactly when New York enters winter months. Then, again when summer begins in NY in March it becomes earlier again from 10 pm UTC to 9 pm UTC for the period of the summer in US.

You said that your broker adopts GMT+2/GMT+3 DST policy, so, it is important to know when the dst switch will take place.

Btw: your broker mostly follows eithet the US or EU daylight savings schedule. Each schedule has established switch times, however, the US summer is always longer (begins earlier and lasts later than summer in EU).

You have to know both the dst schedules:
1. The US DST schedule
2. Your broker's schedule (i.e., when the trade server adjusts its clock)

For sessions of other Fx markets, you have to know 2 offsets and 2 DSTs. (of broker's timezone + Fx market timezone), from there you can calculate the actual trading hours on your broker.

We assume that trading in the other major Fx markets (London, Frankfurt, Tokyo) is 8 am to 5 pm in local time.

To help solve your problems with all of these just load my "iForexSession" indicator on your  broker's terminal and write down the session trading hours. Browse the chart and see how these trading hours change dynamically throughout the months.

Important also, when you run the indicator on another terminal with a different GMT offsets and/or DST schedule, the trading hours will not be the same. The calculations are done dynamically (no hard-coded session hours) taking into consideration the time of the year, the impact of NY daylight schedule on trading hours, your broker's DST schedule and the timezone of the specific session.

Edit:

Bonus Feature: Moving the mouse pointer on a chart bar while the 'Ctrl' key is pressed, the bar number # and its time (and corresponding times in major Forex markets) will be written to the chart window for you to see how the calculations are done.
 

Hello everyone,

Thank you very much for your feedback. I didn't realize that the issue with the times was so complex. But given that it seems to be the case, I'm surprised there isn't a product from MetaQuotes themselves for this. MT5 does come with a lot of indicators, etc.

@amrali. Thank you for your indicator. I have read through everything and also looked at other indicators, and yours seems to be very good. I have downloaded all the files and started the mq5 file in the Strategy Tester, but unfortunately, no time bars appear in the chart. What does appear is the textual information in the lower left corner of the chart. I don't receive any compilation errors or anything like that. Attached is a screenshot.

I'm not sure if I understood correctly, does the mq5 only run on the H1 chart, or should it also work on smaller time frames like M1? I have tried several time frames, including H4, H1, M10, M5, M1, but the Forex times don't appear anywhere. What could be the reason that the Forex sessions are not being drawn?

 
ammer.jens #:

I have downloaded all the files and started the mq5 file in the Strategy Tester, but

unfortunately, no time bars appear in the chart. What does appear is the textual

information in the lower left corner of the chart. I don't receive any

compilation errors or anything like that. Attached is a screenshot.

Note about Compatibility with The Strategy Tester

During testing in the strategy tester, TimeGMT() is always equal to TimeTradeServer() simulated server time.

For proper results during backtesting in the strategy tester, you should also include TimeGMT library to fix the TimeGMT() function in order to provide the true GMT during testing. 

Link: https://www.mql5.com/en/code/48291

1. Download TimeGMT.mq5 into the same folder as other files.

2. Edit iForexSessions.mq5, and just uncomment this line:

//--- for backtesting in strategy tester, https://www.mql5.com/en/code/48291
//#include "TimeGMT.mqh"

You can freely select any timeframe in the tester as you like.

My indicator loads the other timeframes (W1, H1) needed for calculations in the background, automatically without your interaction.

 
Hi Amrali, I still struggle to get it running. I send you private message. Thank you! If you want to continue here, is fine for me too. 
 
amrali #:

Note about Compatibility with The Strategy Tester

During testing in the strategy tester, TimeGMT() is always equal to TimeTradeServer() simulated server time.

For proper results during backtesting in the strategy tester, you should also include TimeGMT library to fix the TimeGMT() function in order to provide the true GMT during testing. 

Link: https://www.mql5.com/en/code/48291

1. Download TimeGMT.mq5 into the same folder as other files.

2. Edit iForexSessions.mq5, and just uncomment this line:

You can freely select any timeframe in the tester as you like.

My indicator loads the other timeframes (W1, H1) needed for calculations in the background, automatically without your interaction.

3. Recompile iForexSessions.mq5 ! ;-)

Also the tester could probably not detect that ex5-changed, so user should select other indicator in the tester, then again select iForexSessions.mq5. At least, I encountered such problems in past.

 

Hi, thanks for the feedback. I’ve compiled the iForexSessions EA multiple times. The behavior is very strange. When I start the EA via MetaEditor, MT5 launches the Indicator Accelerator instead. See screenshot. I've never seen such behavior before.

When I start the EA through the start button in the settings (not via MetaEditor), it launches the iForexSessions EA, showing the info at the bottom left but no Forex Sessions.

I noticed that Amrali updated the code yesterday. I downloaded the new versions again, but it didn’t change anything. I really want to use the EA, but I just don’t understand what's going wrong or what else I can do… I also couldn’t find anything in the logs. Anyone got any ideas?

 

@ammer.jens did you put the " iForexSessions.mq5" or "iForexSessions.ex5" under the "\MQL5\Indicators" folder?

Note also a new update to v1.81 on the codebase.