Obtaining Open Interest values not for the current bar - page 2

 
fxsaber:
Why?! All historical information on open interest is contained in the tick history.

No, it does not.

struct MqlTick 
  { 
   datetime     time;          // Время последнего обновления цен 
   double       bid;           // Текущая цена Bid 
   double       ask;           // Текущая цена Ask 
   double       last;          // Текущая цена последней сделки (Last) 
   ulong        volume;        // Объем для текущей цены Last 
   long         time_msc;      // Время последнего обновления цен в миллисекундах 
   uint         flag           // Флаги тиков 
  };

Where are the volumes of all the orders here?

 
prostotrader:
No, it is not.
OI is an aggregate open BUY and/or SELL position. And since it is, the OI is fully contained in the tick history.
 
fxsaber:
OI is an aggregate open BUY and/or SELL position. And since this is the case, OI is entirely contained within the tick history.

This is a misconception of OI.

Открытый интерес общее количество открытых фьючерсных контрактов,
которые существуют на данный день.

Открытый интерес обычно ассоциируется с рынках фьючерсов и опционов,
где количество существующих контрактов меняется день ото дня - в отличие от фондового рынка,
где в обращении акций акций компании остаются постоянными как только выпуск акций завершен.
Тем не менее, термин "открытый интерес" также иногда используется для обозначения числа рыночных ордеров,
которые существуют перед открытием фондового рынка.
 

Also...

Why "pull" a tick when there is SYMBOL_SESSION_INTEREST

 

Fixed by

IndicatorSetString(INDICATOR_SHORTNAME, "OILent");

Files:
OILent.mq5  10 kb
 

Eh,didn't have time to track when the open Sell interest started to prevail over the open Buy interest:

Screenshots of the MetaTrader trading platform

RTS-9.16, M1, 2016.09.02

JSC ''Brokerage House ''OTKRYTIE'', MetaTrader 5, Real

Didn't have time to track when open Sell interest started to prevail over open Buy interest

RTS-9.16, M1, 2016.09.02, OTKRYTIE Brokerage House, MetaTrader 5, Real

Open interest indicator on top as tick chart (shift every tick), open interest (Buy minus Sell open interest - as histogram) - display for bar below.
 
Karputov Vladimir:

For the current bar, getting open interest is not a problem:

But how do you get open interest for other bars (not for the current bar - the rightmost one)?

Impossible, MT5 is not designed for that.
 
Sergey Chalyshev:
Impossible, MT5 is not designed for that.

How is that impossible?! Several comrades here have already commented on the impossibility.

Do we have to finish the proof again with a code?

 
fxsaber:

How is that impossible?! Several comrades here have already commented on the impossibility.

Do we have to finish the proof by the code again?

You haven't carefully read the answer: at present MQL5 does not allow to get the value of the Open Interest for the bars other than the current one. Well, there is no information about Open Interest in the structure

struct MqlTick 
  { 
   datetime     time;          // Время последнего обновления цен 
   double       bid;           // Текущая цена Bid 
   double       ask;           // Текущая цена Ask 
   double       last;          // Текущая цена последней сделки (Last) 
   ulong        volume;        // Объем для текущей цены Last 
   long         time_msc;      // Время последнего обновления цен в миллисекундах 
   uint         flag           // Флаги тиков 
  };
and that's it.
 
fxsaber:

How is that impossible?! Several comrades here have already commented on the impossibility.

Ending the proof with code again?

Fluttering again?

I can write the codes myself, I do not need to prove, I said what I see and is in fact at the moment.