Subscription to OnBookEvent sometimes falls off - is there such a thing? - page 6

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
I'd like a comment from the developers because there's nothing in the documentation about it.
Do you not see from the log above that there is a counter?
Doesn't it look from the log above that there is a counter?
You can see from the log above that one EA does not unsubscribe the other. But how it is implemented - through counter or something else - is not clear. In addition, the programmer has had an indicator and an Expert Advisor. But the indicator has an unpleasant feature of mixing up the order of start of OnInit() and OnDeinit(). Although, it should not confuse the counter, if it really has one.
You can see from the log above that one EA does not unsubscribe the other. But how it is implemented - through counter or something else - is not clear. In addition, the programmer has an indicator and an Expert Advisor. But the indicator has an annoying feature of mixing up the order of starting OnInit() and OnDeinit().
Therefore, we have implemented the is_book variable to avoid confusion.
The developers have made MarketBookAdd() a FUNCTION for a reason.
Can't you see from the log above that there is a counter?
The log is nothing when using a different situation than the one in which the problem occurs.
Take 2 of your programs (Expert Advisor and an indicator, or 2 indulators) - put them on the same chart and then delete one of them. The subscription of the remaining instance will fall off.
Even when OnInit/OnDeinit call sequence is correct (it was always correct in these tests), there is a problem.
This approach doesn't work?
I haven't run it in the terminal yet, but I have a question - how does moving the code to an object wrapper help against "cutting off the ends" by the terminal itself (as is happening now)? Well, an object will be created and subscription will start, and then if someone closes another program with subscription, the object will never know that there's no subscription anymore.
I did it the simple way: I compare timeouts on OnBookEvent and OnTick. If timeout on the first exceeds timeout on the second by more than N seconds - I re-subscribe.
I have not run it in the terminal yet, but the question arose - how will transferring the code to an object wrapper help from "chopping off the ends" by the terminal itself inside itself (as it is happening now)? Well, an object will be created and the subscription will begin, and then if someone closes another program with a subscription, the object will never know that the subscription is no more.
I did it in a simple way: I compare timeouts for OnBookEvent and OnTick. If the first timeout exceeds the second timeout by more than N seconds, I resubscribe.
Well, as expected, you are wrong.
1st indicator
Second indicator
Result
I haven't run it in the terminal yet, but I have a question - how does moving the code to an object wrapper help against "cutting off the ends" by the terminal itself (as is happening now)?
Init and Deinit don't participate in the subscription. Perhaps this circumstance would help.
I have run these indicators in different windows of the same symbol and it works fine,
but when I ran both indicators in the same symbol window, it really
subscription "fell off" when removing one indicator.
Write to the SD (maybe they will have time to make a fix in the new build)
Forum on trading, automated trading systems and trading strategy testing
OnBookEvent subscription sometimes falls off - is there such a thing?
prostotrader, 2018.07.24 21:25