hello everybody,
I want to programm an EA, that opens at a certain time (which the user can define) pending orders and I have problems with this date and time functions like TimeCurrent().
You need to understand what a datetime (<---- link, please click me ) type variable is . . . ". . . as the number of seconds elapsed since January 01, 1970"
If you want the datetime 3 minutes from now . . . TimeCurrent() + 3 * PERIOD_M1 * 60
cornesti: The Question is: what argument should I put in the bracket? The next question I have is: Is there the possibility to 'do math' with this datetime. |
|
thanks a lot guys, now I know how to do it. With the bracket I meant the one after TimeCurrent(). But it's the same think as in Symbol(), doesn't need any input arguments.
whish you a nice weekend
cornesti: With the bracket I meant the one after TimeCurrent(). |
Choose your words better
|
cornesti: With the bracket I meant the one after TimeCurrent(). |
Choose your words better
|
( ) these are also known as Brackets in my experience of UK English . . . almost 49 years ;-)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
hello everybody,
I want to programm an EA, that opens at a certain time (which the user can define) pending orders and I have problems with this date and time functions like TimeCurrent().
Until now I have this:
extern datetime time = D'2014.08.15 11:10:00';
and now I want to compare this time with the TimeCurrent() to open a pending order. The Question is: what argument should I put in the bracket? I don't really understand the definition in the documentary
https://docs.mql4.com/dateandtime/timecurrent
The next question I have is: Is there the possibility to 'do math' with this datetime. For example if I have again the time defined like above, how can I define NewTime=time +3minutes ??
It would be very helpfull if somebody can answer. Thanks a lot