aquarchitecture:
If I attached the EA at 12:40PM and set EventSetTimer(900) (which is 15 minutes), would it mean the OnTimer() will run at 12:55PM, 1:10PM, 1:25PM ...?
aquarchitecture:
How do you code to set the OnTimer() to run every 4-hour at a round hour like 4:00, 8:00,...(does not matter what time EA is attached)?
if (your condition) EventSetTimer(in seconds);
Correct
Thank qjol for getting back to me.
Where should I put that code? I am pretty sure NOT in OnInit(). Can you write an example code for me?
Hello everyone,
I am trying to understand how the EventSetTimer() works. Hopefully, some one could address it for me.
If I attached the EA at 12:40PM and set EventSetTimer(900) (which is 15 minutes), would it mean the OnTimer() will run at 12:55PM, 1:10PM, 1:25PM ...?
How do you code to set the OnTimer() to run every 4-hour at a round hour like 4:00, 8:00,...(does not matter what time EA is attached)?
Thank you for helping out.
Regards,
PS: please don't judge my question, I'm new to the language.
hello,
I m new in progaming too.
the result of function EventSetTimer() is true or false then you can use it in a IF conditions like down code:
if (EventSetTimer(900)==true);
print("It s time for your code");
this code print message every 900 seconds.have a good time.
Hello everyone,
I am trying to understand how the EventSetTimer() works. Hopefully, some one could address it for me.
If I attached the EA at 12:40PM and set EventSetTimer(900) (which is 15 minutes), would it mean the OnTimer() will run at 12:55PM, 1:10PM, 1:25PM ...?
How do you code to set the OnTimer() to run every 4-hour at a round hour like 4:00, 8:00,...(does not matter what time EA is attached)?
Thank you for helping out.
Regards,
PS: please don't judge my question, I'm new to the language.
use down code, every 10 second alert a message.
void OnInit() { EventSetTimer(10); } void OnTimer() { string report="hello world"; Alert(report); }
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello everyone,
I am trying to understand how the EventSetTimer() works. Hopefully, some one could address it for me.
If I attached the EA at 12:40PM and set EventSetTimer(900) (which is 15 minutes), would it mean the OnTimer() will run at 12:55PM, 1:10PM, 1:25PM ...?
How do you code to set the OnTimer() to run every 4-hour at a round hour like 4:00, 8:00,...(does not matter what time EA is attached)?
Thank you for helping out.
Regards,
PS: please don't judge my question, I'm new to the language.