datetime alertTime = myAlertTime; static datetime alertTriggered = 0; if(Time[0]>= alertTime && alertTriggered < alertTime) { Alert("hello World"); alertTriggered = alertTime; }
NB It could only be triggered by a tick coming in.
NB This code is untested
It does allow for more Alert times to be used, should you have some method of generating them (e.g. 15 mins after Order created)
Obviously if alertTime is set to another time during the waiting period, the prior one gets lost.
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 all,
I would like to get an alert at a specific time (user defined).
Could anyone kindly write this simple code .. :)
Cheers