Subscription to OnBookEvent sometimes falls off - is there such a thing? - page 4
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
By the way, all other types of events are broadcast events, only they don't need to be connected or disconnected - everything is communicated automatically during script initialization.
OnChartEvent has broadcasting events - as well as normal events.
And if you could do the normal ones there - you can do them here too
Not at all - OnChartEvent receives broadcast events - as well as normal events
And if you can do broadcasts there, you can do broadcasts here too.
And what about other events OnTick or OnCalculate? Any objections to their broadcasting? OnChartEvent is also broadcast, despite the add-ons. If the objection is to the word "all", I'll replace it with "many". The point is that all options so far have ruled out the possibility of someone else's disabling it.
We'll see if there is a correction.
Good news.
Which error is that about? I see the exact same post about the disabled transaction.
Your subscription is failing because of aninvalid book transaction error
I don't callMarketBookRelease but wheninvalid book transactionappears in the log
OnBookEvent stops dialling (you could say the subscription "falls off")
This is a completely different cause of the error than the one discussed in this thread. If you eliminate one cause, the other will not disappear by itself
Just like here https://www.mql5.com/ru/forum/1111/page2237#comment_8159123 the errors were the same in form but the way of fixing one did not fit the other - so the reasons are different
I'm sure this is the reason for the bug.
The developers have fixed it and when the new build comes out, we will check "your" error then.
Checking example is simple: call in 1st EA MarketBookAdd( x ), then call in 2nd MarketBookRelease( x )... And wait for 1 event
If you do what you write on the same symbol, Naturally the subscription will be destroyed by that symbol in the same terminal!
And this is correct.
Added by
You just need to use the subscription correctly.
If you do what you write on the same symbol, Naturally the subscription will be destroyed by that symbol in the same terminal!
And this is correct.
Then do the following: call MarketBookAdd( x ) in the 1st Expert, then call MarketBookAdd( x ) and MarketBookRelease( x ) in the 2nd Expert... and then wait for OnBookEvent( x ) event in the 1st Expert
Use my code and you won't have problems with subscription.
Use my code and you won't have a problem subscribing.