Formatting is for printing. Just isolate and compare the date.
-
TimeDayOfWeek(OrderOpenTime() ) != TimeDayOfWeek(TimeCurrent() ) // or TimeDayOfYear
-
date(OrderOpenTime() ) != date()
Find bar of the same time one day ago - MQL4 programming forum 2017.10.06

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
Hey,
I have problem to get OrderOpenTime()
but only the date like this : 2021.07.20 without showing the time.
Thank you.
because I want to close the order whenever the day is change. In this example, when the date is 2021.07.21 I will close the order.