H4 first opened candle

 

Hi,

I am facing the following situation: Bovespa market (Brazil) opens at 10:00 AM (GMT-3) and closes at 17:00. When I look to a H4 graph it shows opening at 08:00 (AM), next candles are 12:00 and 16:00:


Comparing to another platform, it begins the first candle at 10:00 AM and next candle is 14:00 (expected behavior):


The EA log shows MT5 scenario (candle index 1 is the last one):

CG      0          10:00:00.360   ea (VALE3,H4)         Candle index 1           : 16:00:00
FI      0          10:00:00.360   ea (VALE3,H4)         Current time             : 10:00:00

Any clues on how to solve this (having first candle opened at 10:00 and a second one at 14:00, only 2 per day)?

Thank you.

 
Felipe Augusto Torres Maggico: Any clues on how to solve this

There is no solve. Bar times are determined by the broker.

Chart times are broker times.
          When is the time zone problem going to be fixed? - General - MQL5 programming forum 2020.05.07

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

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

  2. Brokers use a variety of time zones. Their local time, with or without Day Light Savings Time (DST), London, 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 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.

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


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


  5. 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.04.10

Reason: