-
if(TimeCurrent()==_StringToTime("09:10") || TimeCurrent()==_StringToTime("10:00") || TimeCurrent()==_StringToTime("11:00") || TimeCurrent()==_StringToTime("12:00") || TimeCurrent()==_StringToTime("13:00") || TimeCurrent()==_StringToTime("14:00") || TimeCurrent()==_StringToTime("15:00") || TimeCurrent()==_StringToTime("16:00") || TimeCurrent()==_StringToTime("17:00")
Those will be true only if you get a tick in the first second of the hour. You will do better if the last notification time is over an hour. - There isn't a better way; if the VPS is down, code doesn't run.
William Roeder:
- Those will be true only if you get a tick in the first second of the hour. You will do better if the last notification time is over an hour.
- There isn't a better way; if the VPS is down, code doesn't run.
1. Yes. No problem. But also I think if I use this function on "Void OnTimer", it should works also.
2. "if the VPS is down, code doesn't run."
That's exactly my idea. If I realize that I did not received the last VPS message, for example, each every 30 minutes, I will know that something's wrong.
But anyway. If you know, could you show me a better way to write this code?

Virtual hosting for MetaTrader 5
- www.mql5.com
The fastest VPS server for forex trading from the MetaTrader 4/5 terminal developers

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 folks,
I would like to check every hour or every 30 minutes if VPS I'm using for my EA is working.
I wrote the following code, but I think there is some better way to input "times" every time that the function was called, instead of one line for each hour.
What do you guys think?