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

 
Stanislav Korotky:
The important thing is the result... namely, that the problem has received a sufficient number of responses and has been taken up by the Developers
 
Stanislav Korotky:

You started the argument, you finish it. I have nothing to apologise for. I was making a point, unlike you.

I've seen all your posts. You quoted only what suited you, and what came before that and then you just ignored it as if you hadn't written it at all. Indeed from the een time you managed to reproduce the problem. And anyway, came to this thread with your problem, which has nothing to do with the topic.

The fact that you keep writing characterizes you not in the best way, you just badly spoil your image, and people

people remember it for a long time. The problem has been understood, though, and I should point out, not at your "instigation"!

I won't answer you again (it's just getting ridiculous at the very least)

 
Slava:

I understand the problem.

To complete the picture, I am attaching the check codes for OnChartEvent

//Test1.mq5
#include "Tes2.mq5"
void OnChartEvent( const int id, const long&, const double&, const string& )
{
        if ( id == CHARTEVENT_MOUSE_WHEEL )
                Print( __FUNCTION__ );
}
//Test2.mq5
void ChartEventMouseWheel( bool b )
{
        ResetLastError();
        if ( !ChartSetInteger( 0, CHART_EVENT_MOUSE_WHEEL, b ) )
                Print( __FUNCTION__, ":", GetLastError());
}
void OnInit()              { ChartEventMouseWheel( true  ); }
void OnDeinit( const int ) { ChartEventMouseWheel( false ); }
int OnCalculate( const int, const int, const int, const double& [] ) { return 0; }

Attach 1st indicator to the chart... then 2nd indicator. After the 2nd indicator is removed from the chart, the 1st one stops receiving CHARTEVENT_MOUSE_WHEEL events , although it received them properly before

 
A100:

Attach the 1st indicator to the chart... then the 2nd one. After the 2nd indicator is removed from the chart, the 1st one stops getting CHARTEVENT_MOUSE_WHEEL events , although it was receiving them before

Why should it continue receiving them?

It is exactly as described in the help:

https://www.mql5.com/ru/docs/constants/chartconstants/enum_chartevents

Документация по MQL5: Константы, перечисления и структуры / Константы графиков / Типы событий графика
Документация по MQL5: Константы, перечисления и структуры / Константы графиков / Типы событий графика
  • www.mql5.com
Существуют 11 видов событий, которые можно обрабатывать с помощью функции предопределенной функции OnChartEvent(). Для пользовательских событий предусмотрено 65535 идентификаторов в диапазоне от CHARTEVENT_CUSTOM до CHARTEVENT_CUSTOM_LAST включительно. Для генерации пользовательского события необходимо использовать функцию EventChartCustom...
 
Andrey Barinov:

Why should he keep getting them?

This is exactly as described in the certificate:

https://www.mql5.com/ru/docs/constants/chartconstants/enum_chartevents

Then OnBookEvent corresponds (why is there a discrepancy with the description?) and the developers can sleep well.

It's just that OnChartEvent has a more detailed description than OnBookEvent

 
A100:
Then the OnBookEvent corresponds and the Developers can sleep peacefully.

I can't comment on OnBookEvent, I'm not in the subject. But about MouseWheel in the help it is clearly written that it is a property of the chart, and it concerns all programs running on this chart.

 
Andrey Barinov:

I can't comment on OnBookEvent, I'm not in the subject. But about MouseWheel in the help, it is clearly written that it is a property of a chart, and it concerns all programs running on this chart.

Furthermore , the developer has formulated the principle: Subscription status of one EA should not affect other EAs.

If the principle is general, it should be the same for OnBookEvent and OnChartEvent

I also noted here that the work of OnChartEvent corresponds to the description

Подписка на OnBookEvent иногда отваливается - есть такое?
Подписка на OnBookEvent иногда отваливается - есть такое?
  • 2018.07.25
  • www.mql5.com
После того как поплотнее занялся стаканом и повесил на чарты несколько экспертов и индикаторов, подписанных на OnBookEvent, обнаружил, что некоторы...
 
A100:

Moreover , the developer has formulated the following principle: the state of one EA's subscription should not affect other EAs.

Subscriptions are subscriptions, but the chart property is a property of the chart.

MOUSE_WHEEL is the same as setting the chart background colour. You can use one indicator, and you can use another one. In this case, when ChartGet(), they will all get the current colour.

 
Andrey Barinov:

Subscriptions are subscriptions, but the graph property is a graph property.

MOUSE_WHEEL is the same as setting the chart background colour. You can use one indicator and you can use another one. At the same time when ChartGet() they will all get the current colour.

Do not confuse. We are talking about subscriptions, not properties
 
A100:
Don't get confused. It's

about subscriptions, not about properties

I'm not confused.

Here is this piece of your code

ChartSetInteger( 0, CHART_EVENT_MOUSE_WHEEL, b )

This is the graph property, not the subscription.

Reason: