How do I get my ea to only trade during the New York Session? GMT 0800 to 1600
How do I display GMT on my chart?
At the beginning of the start() function check the time, if it is not within the NY session return(0);
You chart shows the timezone the Broker chooses, want a different timezone ? use a different Broker.
At the beginning of the start() function check the time, if it is not within the NY session return(0);
You chart shows the timezone the Broker chooses, want a different timezone ? use a different Broker.
"At the beginning of the start() function check the time, if it is not within the NY session return(0);"
exactly what i want to do, but dont know how> here is code I have tried. (my broker is 3 hours ahead o gmt... broker time is 22 then gmt is 17)
this code showed always < 12 and did not trade.
int time.h = Hour(); if((time.h-3) < 12) reprt = "Before trading time"; return; if((time.h-3) > 19) reprt = "After trading time"; return; reprt = "Managing trades";
"At the beginning of the start() function check the time, if it is not within the NY session return(0);"
exactly what i want to do, but dont know how> here is code I have tried. (my broker is 3 hours ahead o gmt... broker time is 22 then gmt is 17)
this code showed always < 12 and did not trade.
Are you running this live or in the Strategy Tester ? I seem to recall other users having issues with functions like Hour() in the Strategy Tester, instead use TimeHour ( TimeCurrent() )
live on a demo account

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
How do I get my ea to only trade during the New York Session? GMT 0800 to 1600
How do I display GMT on my chart?