MT5 Local Time Display

 

I LOVE MT5 but can't believe Metaquotes can't add a little dropdown box in the corner to select your UTC offset and have the date and time formatted according to your local time...

I don't care much for broker or server time and have seen and read all sort of reasons why this capability doesn't exist from the ridiculous to the absurd!!!

It is the most requested feature for over a decade and still nada.... and every other charting platform worth its salt has this feature....!?!?

I am not asking for an overhaul of MQL5 or anything to technical, just please add the ability to add/subtract time from the currently displayed time presented and presto.

QJ

 
QJTrader:

I LOVE MT5 but can't believe Metaquotes can't add a little dropdown box in the corner to select your UTC offset and have the date and time formatted according to your local time...

I don't care much for broker or server time and have seen and read all sort of reasons why this capability doesn't exist from the ridiculous to the absurd!!!

It is the most requested feature for over a decade and still nada.... and every other charting platform worth its salt has this feature....!?!?

I am not asking for an overhaul of MQL5 or anything to technical, just please add the ability to add/subtract time from the currently displayed time presented and presto.

QJ

It is most requested tool which was requested by newbies.
Because the traders are trading using broker's time, living using their local time and watching economic news with GMT+0 time.

----------------

Forum on trading, automated trading systems and testing trading strategies

Setting time

Sergey Golubev, 2019.02.13 18:29

You can use custom indicators from CodeBase (it is free) to show any time (incl your local time, or any timezone, etc), but the price on the chart will be moved according to the broker's time anyway.

-------------

Examples - 

TimeZone Indicator - indicator for MetaTrader 4

TimeZones - indicator for MetaTrader 5

TimeZones - indicator for MetaTrader 4

4 Sessions - indicator for MetaTrader 4

TimeZones Six v2 - indicator for MetaTrader 4 



and more on CodeBase.
MQL5 Code Base
MQL5 Code Base
  • www.mql5.com
This script downloads bars and ticks from EURUSD as required for the correct execution of Kiss on Billions on EURUSD from Saeid Irani. I want to share with you this story. When I started trading, I learnt the scalping strategy in a volatile market. I really loved scalping especially when I see the price is moving fast. However, scalping for a...
 
QJTrader: but can't believe Metaquotes can't add a little dropdown box in the corner to select your UTC offset and have the date and time formatted according to your local time...

I don't care much for broker or server time and have seen and read all sort of reasons why this capability doesn't exist from the ridiculous to the absurd!!!

Chart times are broker times.
  1. How can MetaQuotes know all brokers' (they come and go daily) Time zone and Daylight savings time (including historical changes for back testing)? Do you have that information for just you and 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 all three DST changes when they occur.
              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

 

I have to agree with you.  It seems like this feature should be built under Tools > Options on the Server tab where you have the option to change the chart display time plus or minus the server time you are connected to to see your local time.  You could adjust it yourself for DST time changes as well to simplify the coding needed on the MT5 side.  People are making this waaaay too complicated.

 
There is a free utility/indicator named "Candle Local Time" that works quite well.  When you hover over a candle, it shows the local time for the candle.
 
futuresdaytrader:

I have to agree with you.  It seems like this feature should be built under Tools > Options on the Server tab where you have the option to change the chart display time plus or minus the server time you are connected to to see your local time.  You could adjust it yourself for DST time changes as well to simplify the coding needed on the MT5 side.  People are making this waaaay too complicated.

Yeah, there are lots of complicated explanations and obstacles thrown up and/or it's just a 'newbie' thing....

I have been using TradingView as well and you simply enter your GMT offset and bar time is displayed in local time - end of story - there is no requirement to change or modify server or broker time in any way, nor re-align any candles or update code in the background and all of that remains untouched, just the bar time displayed on the chart, which I find useful! 

No matter what time zone MT5 uses behind the scenes, the candle is still observable in my local time, so why not allow the time displayed on the chart to be offset accordingly (if I want to seeit that way.  If you're happy operating in server time then leave it at zero).

For example, I know London open is 3pm my time and New York opens 9pm my time and I live and work in my local time, so I see no reason why I have to deduce the current bar time manually or why I am forced to work in another timezone.

Files:
TradingView.png  91 kb
 
futuresdaytrader #:
There is a free utility/indicator named "Candle Local Time" that works quite well.  When you hover over a candle, it shows the local time for the candle.
Hello. How do you implement this indicator?
 
QJTrader:

I LOVE MT5 but can't believe Metaquotes can't add a little dropdown box in the corner to select your UTC offset and have the date and time formatted according to your local time...

I don't care much for broker or server time and have seen and read all sort of reasons why this capability doesn't exist from the ridiculous to the absurd!!!

It is the most requested feature for over a decade and still nada.... and every other charting platform worth its salt has this feature....!?!?

I am not asking for an overhaul of MQL5 or anything to technical, just please add the ability to add/subtract time from the currently displayed time presented and presto.

QJ

If you add this line of code to your OnTick() function you will see local time on the chart - basic but effective

   Comment(StringFormat("MQLTime:%s Local Time:%s", TimeToString(TimeCurrent(),TIME_SECONDS), TimeToString(TimeLocal(),TIME_SECONDS)) );   



 

Can you tell me where to add this? I don't usually have an EA running . . . Many thanks!

R4tna C #:

If you add this line of code to your OnTick() function you will see local time on the chart - basic but effective



 
R4tna C #: If you add this line of code to your 

There is no such thing as “MQL Time”. Charts are broker's time.

 
William Roeder #:

There is no such thing as “MQL Time”. Charts are broker's time.

It is just a label I choose to use - call it what you want

Reason: