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
Was at the computer, did not do any calculations. Didn't load the CPU with anything.
19 ms and 48 ms for the execution of SymbolInfoTick. There were several dozens of cases where the duration was hundreds of microseconds. But I didn't cite them.
Apparently, in order to reproduce it, we need to run combat advisors for 24 hours, and then only watch. In my opinion, it is unrealistic to figure out what initiates such lags.
Sometimes the comp may be pumping updates or doing some service tasks. Also, a mains voltage variation can have an effect. This way you can get to programmable network cards, where all bot logic is hardwired :) but even there will be delays due to quantum field fluctuations
The developers have done the best they can. And without that, the branch has provided code that shows how the tick is lagging behind the Market Watch and vice versa. How the tick arrival sequence is broken and probably something else. All in all, nasty valid code is posted to reproduce other situations.
SymbolInfoTick sends the data received from the broker's server. What the server sends is what you get.
IsSymbolInfoTick() executed in blocking mode or in non-blocking mode?
For example, it is in the body of while loop and there is no connection or market is closed for weekend,
then it will be blocked by stopping the loop or it will be executed asynchronously?
how the market watch lags behind the Market Watch and vice versa.
I.e. SymbolInfoTick catches a new tick and we get a different Ask and Bid through the Market Watch event (without waiting for Market Watch to change) ? It wasn't possible to do it a year or so ago. SymbolInfoTick and CopyTick and vintage always lead to the same tick. If you get ticks through various OnXXX functions, of course, you will get something through one function, and something through another...
i.e. SymbolInfoTick catches a new tick and we get a different Ask and Bid through polling the cup (without waiting for cup change event) ?
Here.
Here.
As I thought you are testing OnBookEvent and OnTick, not MarketBookGet and SymbolInfoTick. If you tested according to this scheme you would have everything matched:
p.s Read your posts below. You understand it too. Why do you need OnBookEvent and OnTick at all ? In my example Sleep(1) takes 1-2 milliseconds, request and tick with SymbloInfoTick takes less than MICROsecond. The processor is already resting 99.9% of the time if there are no ticks. What is the benefit of using OnBookEvent and OnTick ?
As I thought you are testing OnBookEvent and OnTick, not MarketBookGet and SymbolInfoTick. If you were testing according to this scheme you would have everything matched:
p.s Read your posts below. You understand it too. Why do you need OnBookEvent and OnTick at all ? In my example Sleep(1) takes 1-2 milliseconds, request and tick with SymbloInfoTick takes less than MICROsecond. The processor is already resting 99.9% of the time if there are no ticks. What's the benefit of using OnBookEvent and OnTick ?
Without a hint of diplomacy, you are talking nonsense. Sleep(1) is a tenth of a millisecond. I see only one theorizing.
Users in OnTick want to see a fresh tick and not the one that arrived to the Terminal some time ago. You can put SymbolInfoTick right after MarketBookGet in the source code.
The developers have fully acknowledged two problems with their silence.
Without a hint of diplomacy, you're talking nonsense. Sleep(1) is a dozen milliseconds. I see only one theorizing.
Users want to see a fresh tick in OnTick and not a tick that arrived to the Terminal some time ago. You can put SymbolInfoTick right after MarketBookGet in the source code.
The developers, by their silence, have fully acknowledged two problems.
Not always and not every tenth of a millisecond. Checked with a simple script
Here is my log
OnTick users always see the freshest tick.
OnBookEvent users always see the freshest tick.
But if you want to compare the ticks received by OnTick and received by OnBookEvent, then you will be disappointed, because the events are processed sequentially, not in parallel. That's what user pivomoe tried to tell you
Not always and not everywhere a tenth of a millisecond. Checked with a simple script
Here's my log.
And here is my log.
Result.
OnTick users always see the freshest tick.
OnBookEvent users always see the freshest tick.
The result of running the EA on a single chart from a machine which is not busy in any way.
Marks identical ticks, which are received in different On-functions by corresponding methods. The lag can be up to tens of milliseconds if run on six charts instead of one.
But if you want to compare ticks received in OnTick and received in OnBookEvent, then you will be disappointed because the events are processed sequentially, not in parallel. What user pivomoe tried to tell you
If a nearly empty OnBookEvent/OnTick is triggered 20 milliseconds later than the corresponding nearly empty OnTick/OnBookEvent, is that OK?
ZS While you're paying attention to the thread, there's another reproduction code here. There in Market Watch the ticks come in with a time earlier than the Market Watch time before that.
If a nearly empty OnBookEvent/OnTick is triggered 20 milliseconds later than the corresponding nearly empty OnTick/OnBookEvent, is that OK?
The EA queue is a lockable resource. When an event is written to the queue, the Expert Advisor waits (unless the Expert Advisor is currently processing an event)
Events for the Expert Advisor come from the event queue of the corresponding chart, which in turn comes from the processing cycle of the corresponding symbol. And this loop of processing not only distributes events to its own charts, but also does a lot of other things.
I have already told you that Windows is not a real-time operating system.