TimeCurrent() - (15 * 60)
TimeCurrent() returns you the number of seconds since the first second of 1970. So if you subtract 15 minutes worth of seconds you will move 15 minutes into the past.
_15mAgo=TimeCurrent() - (15*60);
bonechair:
Hi
How do you make datetime past = TimeCurrent(); minus 15 minutes?
Do it in a readable way . . .
datetime past = TimeCurrent() - (PERIOD_M15 * 60);
thanks
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Hi
How do you make datetime past = TimeCurrent(); minus 15 minutes?