Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
If i want to make 4 external input fields for the 4 values 0, 23, 1 and 15. Should it look like this?
extern int StartDay=0;
extern int StopDay=1;
extern int StartTime=23;
extern int StopTime=15;
And then
bool sunday_cond = (TimeDayOfWeek(TimeCurrent())==StartDay) && (Hour()>=StartTime);
bool monday_cond = (TimeDayOfWeek(TimeCurrent())==StopDay) && (Hour()<=StopTime);
Will that work?
I've got no errors when i compile it :)
just the same i have written in the meantime, see attachment ;-) LOL
Ha ha funny same thought :-) LOL
Ok i will use your code then.
Thanks!
i havent checked the rest of the code, but a such simple return may be not the best way - if an order is open the start should not return.
moving the check if mytradeallowed to another point that doesnt prevent watching open orders would be better.
i havent checked the rest of the code, but a such simple return may be not the best way - if an order is open the start should not return.
moving the check if mytradeallowed to another point that doesnt prevent watching open orders would be better.
Ok then you need to show me where to put that in.
I've sent u a PM
Hey,
Just want to tell that the EA did trade Sunday evening and only Sunday evening, so it works perfect.
Thanks!