- When you post code please use the SRC button! Please edit your post.
General rules and best pratices of the Forum. - General - MQL5 programming forum extern datetime date1 = D'2017.11.23 15:30:00'; //Time if(TimeCurrent() < date1 && TimeCurrent() >date1 -5*60 && !PendingExcist())
Of course it doesn't work because the current time isn't between 10:30 and 15:30 on 11/23 and never will be.
so what to do?
Marco vd Heijden: Obviously remove the date ?
That won't work, all you'd get is the date of compile.
Thushara Dissanayake: so what to do?
How should we know? You haven''t stated what you want it to do. If you want it to work only between 10:30 and 15:30, put those in a string and convert them to datetimes.

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
My EA set pending orders for datetime. All other functions are working well with my Strategy Tester and Real MT4 Platform. I am again saying my EA 100% working well with my Broker. But when i upload to Automatic Validation process it fail to validate the EA. Please look that codes.
Testing Result is: