From the documentation
During testing in the Strategy Tester, TimeGMT() is always equal to TimeCurrent() simulated server time.
Thanks for your support GumRai, Is there any trick to see real GMT time while backtest? bcoz while i backtest with different ea it gives wrong trades due to mis trading time , when it takes server time.
Thanks for your support GumRai, Is there any trick to see real GMT time while backtest? bcoz while i backtest with different ea it gives wrong trades due to mis trading time , when it takes server time.
Anything to do with GMT via the on MetaTrader functions is not quite what they seem because the GMT offsets are taken from your local machine settings not the MetaTrader server machine (where the chart candles are formed).
Therefore you have to be careful when applying any automatic GMT offsets or Daylight savings.
.. Is there any trick to see real GMT time while backtest? ...
Have a list of dates of the USD-DST? Now if you are sure that your quotes always start on Forex-Open time (NY 17:00) you can calculate the GMT-Offset of your broker at the very first tick after the weekend.
Can't remember exactly but something like (first tick!!): TimeCurrent() = (BrokerOpenTimeGMT - BrokerGMTOffset) = NY_17:00 + USD-DST + NY-GMTOffset(+5h).
sheriffonline: Is there any trick to see real GMT time while backtest? | No! You can change server time to GMT time using a constant offset, but you must verify server doesn't change DST during the run. |
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I run my EA om gmt time settings. but when i do backtest, eatakes local/server time?
what could be the issue? Is forward tests will work on GMT time?