ppapp:
Can anyone help with a simple sode that can dsiplay an alert on the main window when a particular variable date and time is reached.
Have tried doing this but sometimes the pauses between ticks are longer than the second of the particular time needs to have the Alert displayed.
Is there a code that the Alert can be displayed when the terminal time reaches say 2014.06.12 09:00:00?
TIA
datetime varDate = D'2014.06.12 09:00:00'; //--- if(TimeCurrent()>=varDate) { Alert("Hey, current date is higher or equal than June 12th, 2014 09:00:00!"); }
Thank you.
is there a way of the Alert to occurring just once and stop once the current time has surpassed the varDate time as there is a continuous loop to check times which include time already passed?
datetime varDate = D'2014.06.12 09:00:00'; static bool FirstAlert = false; if(TimeCurrent()>=varDate && FirstAlert == false) { Alert("Hey, current date is higher or equal than June 12th, 2014 09:00:00!"); FirstAlert = true; }
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
Can anyone help with a simple sode that can dsiplay an alert on the main window when a particular variable date and time is reached.
Have tried doing this but sometimes the pauses between ticks are longer than the second of the particular time needs to have the Alert displayed.
Is there a code that the Alert can be displayed when the terminal time reaches say 2014.06.12 09:00:00?
TIA