sheriffonline :
So you are comparing a int (TimeHour) with a double ( HoursFrom and HoursTo ) and you are comparing your Local Timezone with ServerTime . . . and you wonder why you are having issues ?
Hello,
I have coded EA to run on specified hours.
EA setting as 10.00 - 13.00, so it works for 10.00-13.00. but when i edit the settings as 10.30 - 13.30. which EA starts from 11 and ended with 13.30. what could be the problom?
RaptorUK :
So you are comparing a int (TimeHour) with a double ( HoursFrom and HoursTo ) and you are comparing your Local Timezone with ServerTime . . . and you wonder why you are having issues ?
yes. you said correct.
So you are comparing a int (TimeHour) with a double ( HoursFrom and HoursTo ) and you are comparing your Local Timezone with ServerTime . . . and you wonder why you are having issues ?
Can anyone support me?
I want to run EA on filtered hours and minutes.
eg: EA should run at 10.30AM to 18.30PM. what is the easiest way to code?
sheriffonline:
You know what is wrong, fix your code . . .
Can anyone support me?
I want to run EA on filtered hours and minutes.
eg: EA should run at 10.30AM to 18.30PM. what is the easiest way to code?
sheriffonline:
Can anyone support me?
I want to run EA on filtered hours and minutes.
eg: EA should run at 10.30AM to 18.30PM. what is the easiest way to code?
extern int t1 = 1030; // 10:30 time server extern int t2 = 1830; // 18:30 time server int start(); { int d = 100 * Hour() + Minute(); if ( d < t1 || d > t2 ) { return; } // your ea code return; }
Boeing747:
almost possible also t1>t2extern int t1 = 1030; // 10:30 time server extern int t2 = 1830; // 18:30 time server int start(); { int d = 100 * Hour() + Minute(); if ((( d < t1 || d > t2 )&& t1 < t2)||(( d < t2 && d > t1 )&& t1 > t2)) { return; } // your ea code return; }
RaptorUK:
You know what is wrong, fix your code . . .
You know what is wrong, fix your code . . .
Found my mistake. now fixed. Thanks for the support.
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
Hello,
I have coded EA to run on specified hours.
EA setting as 10.00 - 13.00, so it works for 10.00-13.00. but when i edit the settings as 10.30 - 13.30. which EA starts from 11 and ended with 13.30. what could be the problom?