I really don't see what you did wrong. If you're printing the value, that may be the issue - you may be doing it like Print(TimeCurrent(), 60). This will print the date time as you shown.
I tested a simple script written like this:
void OnStart() { Print("TimeCurrent() = ", TimeCurrent()); Print("TimeCurrent() + 60 = ", TimeCurrent() + 60); }
The correct value is returned.
Just check your setting in the debugger - it is made for this!!
Code debugging: https://www.metatrader5.com/en/metaeditor/help/development/debug
- www.metatrader5.com
In this code, all I need to do is calculate the expire time to send the order. I did search for a method to do this, but I could not find it. Can someone please help me to figure out this?.
I need to add 1 minute to the current time.
I checked with a comment (The way I did in bellow code) it's just added additional two numbers to the seconds of current time.
ex - True Time = 2024.04.04 23:15:20
After My modification it shows like = 2024.04.04 23:15:2060
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
In this code, all I need to do is calculate the expire time to send the order. I did search for a method to do this, but I could not find it. Can someone please help me to figure out this?.
I need to add 1 minute to the current time.
I checked with a comment (The way I did in bellow code) it's just added additional two numbers to the seconds of current time.
ex - True Time = 2024.04.04 23:15:20
After My modification it shows like = 2024.04.04 23:15:2060