Lagging OI (open interest) - page 2

 
prostotrader:

NOT needed.

OnBookEvent is not only triggered if a transaction has occurred.

and you MUST filter the symbol in this function

Since everything in the market review is "dumped" into this function

Not for a long time. The "MarketBookAdd" subscription is valid within one chart.
read the help more carefully: https://www.mql5.com/ru/docs/event_handlers/onbookevent

If in doubt, it's easy to check. Open 2 charts and put this on each chart:

//+------------------------------------------------------------------+
int OnInit()
  {
   MarketBookAdd(_Symbol);
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
void OnBookEvent(const string &symbol)
  {
   Print(symbol);
  }
//+------------------------------------------------------------------+
void OnDeinit(const int reason) 
  {
   MarketBookRelease(_Symbol);
  }
//+------------------------------------------------------------------+

get this:
Документация по MQL5: Обработка событий / OnBookEvent
Документация по MQL5: Обработка событий / OnBookEvent
  • www.mql5.com
OnBookEvent - Обработка событий - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
prostotrader:

The timer is NOT needed.

How lazy are you to re-read a topic for two lines, eh?
To clarify. The OI in the terminal changes by itself, without ticks and without events in the ribbon/stack.
That's why we need a timer to track the change of OI

 
Alena Lysenkova:

Not for a long time now. The "MarketBookAdd" subscription is valid within one chart.
read the help carefully: https://www.mql5.com/ru/docs/event_handlers/onbookevent

If in doubt, just check it. Open 2 charts and put this on each one:


get this:

Don't you think it's funny?

Событие BookEvent является широковещательным в пределах графика. Это означает, что достаточно одному приложению на графике подписаться
на получение события BookEvent с помощью функции MarketBookAdd, как все остальные индикаторы и эксперты, запущенные на этом графике
и имеющие обработчик OnBookEvent(), будут получать это событие.
Поэтому необходимо анализировать имя символа, которое передается в обработчик OnBookEvent() в качестве параметра symbol.
 
Alena Lysenkova:

How lazy are you to re-read a topic for two lines, eh?
To clarify. The OI in the terminal changes by itself, without any ticks or events in the ribbon/stack.
That's why we need a timer to track the change of OI.

What a load of crap!

If you are tracking ticks on trades, then at each iteration of a trade tick, you just need to take the OI

double oi_value = SymbolInfoDouble(Symbol(),SYMBOL_SESSION_INTEREST);
 
prostotrader:

Isn't that funny to you?

and you didn't get to the next paragraph? ) Try again, I believe in you!
prostotrader:

That's a load of bollocks!

If you are tracking ticks on trades, then at every iteration of the tick of a trade, you just have to take the OI

Why don't you check yourself for once before talking this nonsense? )

The OI in the terminal changes in a separate thread, not related to ticks, nor to events in the stack or in the ribbon.
 

Here is an example of how the first code works.
timer detected a change in OI, but no tick.

And this situation is regular. And it would be ok if there was a tick at all, even if it was delayed, but there are 2-3 times when OI changes without any ticks.

 
Alena Lysenkova:
You didn't get to the next paragraph, did you? ) Try again, I believe in you!

Why don't you check yourself for once before you talk this nonsense? )

The OI in the terminal changes in a separate thread, not related to ticks, nor to events in the cup, nor in the ribbon.

At least read carefully what the customer writes!

Нужен софт для отслеживания ленты сделок по каждому тику с указанием изменения ОИ (аналог Time&Sales в платформе Volfix)
 
prostotrader:

At least read carefully what the customer writes!

Nobody asked you about my orders, your opinion is of no interest. If you can not read the name of the order to the end, have not read the job and did not communicate with the customer, where are you climbing? Do not disgrace yourself.

 
Alena Lysenkova:

Nobody asked you about my orders, your opinion is not interesting. If you can't read the name of the order to the end, have not read the assignment and did not communicate with the customer, where are you going? Do not disgrace yourself.

Free

 
prostotrader:

@Andrey Khatimlianskii @Dmitriy Skub

Maybe there's no synchronization in the terminal, but with the code that

presented here, is there anything to talk about?

Yes, it's enough to demonstrate the problem. Why bother if there's nothing to say in essence?


Alena Lysenkova:

Try also SYMBOL_TIME_MSC logging.