
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
Oh, light at the end of the tunnel! You should call the EventSetTimer() inside of OnTimer() itself? I will definitely try it when I get to the terminal. Thanks for the smart solution!
I've seen this solution all along.
I just haven't tried the best way to
EventKillTimer() or EventSetTimer(0); to kill the timer.
Milliseconds is very much desired. I join in the wishes.
It's dangerous in Expert Advisor now. For example, the synchronous MessageBox() function may quickly queue up when the user leaves the terminal (of course, you may say that the timer can be disabled before such functions).
But if they made interrupt handling...
It's no longer possible to go to milliseconds.
How many Expert Advisors that have already been written will start generating 1000 times more timer events than intended by the author?
No, no... You don't need to change it like that. You just need to add a new function EventSetTimerMS(long ms);
It is necessary to leave the old one, just for compatibility. (It can be easily emulated by calling EventSetTimerMS(1000); )
This is now dangerous in the Expert Advisor. For example, synchronous MessageBox() function can quickly queue up when the user leaves the terminal (of course, you can say that the timer can be disabled before such functions).
If only they made interrupt handling...
Don't use interruptions. I don't know what you mean though, maybe it's a good one... :)
About queues - seconds can also be used, if you go to sleep. :) Don't use it if you don't know how to process consequences - it's a simple recipe and universal.
......... The synchronous MessageBox() function, for example, can quickly queue up when the user steps away from the terminal.(Of course, you can say that you can disable the timer before such functions) ........
How many already written EAs will start generating 1000 times more timer events than the author intended?
Just an opinion: and if there is the very possibility to add milliseconds for those who want it, and the snag is only in old EAs, then why not introduce a new function
Make everything multi-second, and if the switch==false, multiply the value of seconds once by 1000 (for old EAs, for example).
This is now dangerous in the Expert Advisor. For example, synchronous MessageBox() function can quickly queue up when the user leaves the terminal (of course, you can say that the timer can be disabled before such functions).
But if they made interrupt handling...
OnTimer, OnTick, OnTrade... These are the interrupts.
OnTimer, OnTick, OnTrade... These are interruptions.
An interruption is when OnTick is being executed and a more important event, such as OnTimer, has arrived. OnTick is paused, OnTimer code is executed, then OnTick continues to run again.