Why is my EA not giving me the right time? here is my code (I omitted a lot of stuff that i dont think contribute to the problem):
void OnTick() {
static int OpenHour=99;
if(OpenHour!=TimeHour(TimeGMT())){
OpenHour=TimeHour(TimeGMT());
if(OpenHour==8){
//some codes here
//execute order
}
}
}
The problem is, my server executes my trades on 7am GMT instead of 8am!
Look at my hosted server journal notes:
Notice how at 10AM SERVER TIME, my EA executed the sell stop trade. 10AM server time is 7AM GMT! I know this because right now, it says on the chart it's 12:00, and it's currently 9AM GMT. Therefore, 8AM GMT should be 11AM not 10AM!