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
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.
OnTimer, OnTick, OnTrade... These are the interruptions.
Fucking hell. This is a bad dream.
Bummer. Yes it's a scary dream.
No, it's not scary. There are tried and tested ancient schemes on how to avoid the bangs.
But it's still a dream. I don't believe the developers will do it. Although the benefits are undeniable.
I for example could run background calculations in OnTimer, with small frequency (about once in 5 sec) of half timer period duration. And there would be no need to worry about handling ticks, which could just interrupt the background calculation, and then correctly return it to its rightful place. And now it's easier to put it on a separate chart than to process it correctly in the same thread in which the ticks are ticking. Although there would be enough time for all of them in the same thread.
For example, if someone sets Sleep(100000); in the OnTick handler, doOnTimer and OnTrade have no life at all?
events from the timer, and new ticks will be ignored. the trade event will remain in the queue and will be handled
Do not confuse Tick, Trade, Timer events and their handlers OnTick, OnTrade, OnTimer
For example, if someone sets Sleep(100000); in OnTick handler, what willOnTimer, OnTrade have no life at all?
Actually Yurich described interrupt in classic sense, not OnTick, OnTimer interrupt handling.
I understand what he described.
To synchronize data and disrupt access in a single-threaded application is the height of idiocy.
That's the way it is right now. But suicide isn't difficult. It's worse when there's a message box on the screen and I'm in the kitchen drinking tea. Yurich makes a good point.
That's probably how it works.