HI,
Can anybody tell me what time shift I need to specify for HolyGrail 1.6.
I am running it on Alpari UK from India.
Should it be my local time shift compare to GMT which is +5 (5.30 actual)
or it should be -5, or it should only be +1 (Alpari shift) how exactly to put this.
Looking at the below code in the EA, I am bit confused.
int gmtHH = TimeHour(TimeLocal()); We are taking local time in hours
if(GMTShift < 0) gmtHH = gmtHH - MathAbs(GMTShift);
if(GMTShift > 0) gmtHH = gmtHH + MathAbs(GMTShift);
Should the above lines be reverse? Lets say I put +5 in my case, its adding 5 more hours which i feel is wrong.
if((TimeDayOfWeek(TimeLocal()) == 5 && TimeHour(TimeLocal()) > 12) ||
(TimeDayOfWeek(TimeLocal()) == 0 && TimeHour(TimeLocal()) < 23) ||
TimeDayOfWeek(TimeLocal()) == 6 || NewsExist() == true)
{
Status = "Trading disabled...";
}
Why are we disabling the EA based on Localtime.... Shouldnt it take GMT for doing that?
I am not able to post in the other thread hence positng here. I hope somebody clears my doubt.
Thanks,
Prakash
Can anybody tell me what time shift I need to specify for HolyGrail 1.6.
I am running it on Alpari UK from India.
Should it be my local time shift compare to GMT which is +5 (5.30 actual)
or it should be -5, or it should only be +1 (Alpari shift) how exactly to put this.
Looking at the below code in the EA, I am bit confused.
int gmtHH = TimeHour(TimeLocal()); We are taking local time in hours
if(GMTShift < 0) gmtHH = gmtHH - MathAbs(GMTShift);
if(GMTShift > 0) gmtHH = gmtHH + MathAbs(GMTShift);
Should the above lines be reverse? Lets say I put +5 in my case, its adding 5 more hours which i feel is wrong.
if((TimeDayOfWeek(TimeLocal()) == 5 && TimeHour(TimeLocal()) > 12) ||
(TimeDayOfWeek(TimeLocal()) == 0 && TimeHour(TimeLocal()) < 23) ||
TimeDayOfWeek(TimeLocal()) == 6 || NewsExist() == true)
{
Status = "Trading disabled...";
}
Why are we disabling the EA based on Localtime.... Shouldnt it take GMT for doing that?
I am not able to post in the other thread hence positng here. I hope somebody clears my doubt.
Thanks,
Prakash