GMT/ how to change times so i can have the market closing at 1200 GMT
0fx0 - if you know the gmt offset of your server (compare TimeLocal() and TimeCurrent() , or just ask your broker)
for any time you inspect, e.g. Time[bar] or TimeCurrent() at a server tick, just add the number of seconds to adjust to your GMT offset.
for example:
extern double xd_GMTDiff = 2.5; //your server is GMT+2.5
start()
{
datetime vdt_GMT = (TimeCurrent() - (3600 * xd_GMTDiff)); //this is GMT time
}
p.s. - don't forget to handle possible DST issues...
enjoy
m
for any time you inspect, e.g. Time[bar] or TimeCurrent() at a server tick, just add the number of seconds to adjust to your GMT offset.
for example:
extern double xd_GMTDiff = 2.5; //your server is GMT+2.5
start()
{
datetime vdt_GMT = (TimeCurrent() - (3600 * xd_GMTDiff)); //this is GMT time
}
p.s. - don't forget to handle possible DST issues...
enjoy
m

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register