-
FX opens 5pm ET Sunday and ends 5pm ET Friday. Some brokers start after (6pm is common/end before (up
to 15 minutes) due to low volatility.
Checking for Market Closed - Expert Advisors and MQL5 programming forum Trading - MQL5 programming forum
Swap is computed 5pm ET. No swap if no open orders at that time. Brokers use a variety of timezones. Their local time (with or without DST,) GMT/UTC, GMT+2, NY+7.
Only with NY+7 does the broker's 00:00 equals 5pm ET and the start of a daily bar (and H4) is the start of a new FX day.
GMT brokers, means there is a 1 or 2 hour D1/H4 bar on Sunday (depending on NY DST,) and a short Friday bar.
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 a.m. EDT to 1:00 a.m. EST on the first Sunday in November.
Non-NY+7, means the chart daily bar overlaps the start, and converting broker time to NY time requires broker to GMT to NY timezone conversions.
-
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 in 2007 [important when
testing history.])
-
Then there are H4 candles that start on odd hours.
Why My XAUUSD 4H candles start with 1 hour shift? - Currency Pairs - General - MQL5 programming forum
Worse than you think.
-
FX opens 5pm ET Sunday and ends 5pm ET Friday. Some brokers start after (6pm is common/end before (up
to 15 minutes) due to low volatility.
Checking for Market Closed - Expert Advisors and MQL5 programming forum Trading - MQL5 programming forum
Swap is computed 5pm ET. No swap if no open orders at that time. Brokers use a variety of timezones. Their local time (with or without DST,) GMT/UTC, GMT+2, NY+7.
Only with NY+7 does the broker's 00:00 equals 5pm ET and the start of a daily bar (and H4) is the start of a new FX day.
GMT brokers, means there is a 1 or 2 hour D1/H4 bar on Sunday (depending on NY DST,) and a short Friday bar.
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 a.m. EDT to 1:00 a.m. EST on the first Sunday in November.
Non-NY+7, means the chart daily bar overlaps the start, and converting broker time to NY time requires broker to GMT to NY timezone conversions.
-
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 in 2007 [important when
testing history.])
-
Then there are H4 candles that start on odd hours.
Why My XAUUSD 4H candles start with 1 hour shift? - Currency Pairs - General - MQL5 programming forum
Thanks for your reply.
The ea does take into account the session times (SymbolInfoSessionQuote/Trade).
For the situation described above according to the session times the market was open however it wasn't open.
SymbolInfoSessionTrade returned the market was open but only when a order was placed (OrderOpen) "Market Closed" was returned.
This has only occurred during the holidays end of last year and it not related to the h4 candle issue, timezone or dst.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
The ea runs on accounts of two different brokers. A must.
During the holidays end of last year the ea was running as usual.
Checking the charts I noticed something worrisome many indications (and actions) were completely different between the two ea's.
The reason one broker closed trade (and quotes) earlier than the other.
During these times the prices made some relative large moves which completely skewed moving averages and alike.
I am told that these sort of situations are indistinguishable for ea's even with mql5's calendar holiday type.
How can these situations be handled best without manually monitoring and intervening?