Lagging OI (open interest) - page 8

 
Alena Lysenkova:
then why are you writing here?

at will

gone

 

Alena Lysenkova

You're wasting your time, customers are waiting...

Alena Lysenkova
Alena Lysenkova
  • 2021.01.04
  • www.mql5.com
Профиль трейдера
 
prostotrader:

That's what I say "scribblers" and their defenders.

Why copy all the ticks when you're interested in the trades?

In the code.

It's got to be.

Renat Akhtyamov:

What's wrong with it?

Doesn't even know what the output should be or what to do for it.

even the experienced ones have not told me the answer to this tricky question because it is forbidden to talk about it on every corner

But I know how to achieve the right result, because I've been studying this topic for about 5 years.

I didn't notice that, honestly. The girl asked a question, the essence of which and you do not really know and few people on this forum to figure it out, admit it frankly.

I.e. with the rest of the minutiae she can obviously sort out, unlike many "scribblers" who ask 1st class questions.

And poking around in the minutiae, flaunting their alleged universal knowledge, and even making mistakes on the fly in small matters, it's not that not professional, and how it is not even like a man, and like a grumpy angry grannies on the bench.

 
Aleksey Mavrin:

I didn't notice that, honestly. The girl asked a question, the essence of which you do not really know and few people on the forum figured it out, admit it frankly.

I.e. with the rest of the minutiae she will obviously figure it out, unlike many "scribblers" who ask 1st class questions.

And poking around in the minutiae, showing off their alleged universal knowledge, and even making mistakes on the fly in minor issues, it's not that not professional, and somehow not even like a man, and like a grumpy grannies on a bench.

That's just it.

The OI is not as simple a thing as it might seem at first sight, which they are happy to write for pennies to anyone who wants it.

and what has been discussed here since page 2 is not even close.
 
Renat Akhtyamov:

That's just it.

The OI is not as simple a thing as it might seem at first sight, which they are happy to write for pennies to anyone who wants it.

And what has been discussed here since page 2 is not even close.

Welcome back)

That's just it, that the question is difficult and specific and asked with the necessary degree of understanding (well, maybe without deep knowledge), while all "mega-guru" show their ego by picking up on commas in the test-verification code in a pejorative tone, when they themselves are still confused about the concepts.

Unprofessional and ugly. Normal men have answered in essence, I think the issue is resolved)

 
Dmi3:

I can be blunt: I need an asynchronous engine, but the mechanism with the crooked mages that prostotrader uses does not suit me at all.

How to write this engine correctly, I don't understand yet. Do you? ;)

Why do you need asynchronous engine? If you drive two legs, you quote first leg with limit and hit second leg with marker when first leg is triggered. It's possible and useful to do without asynch here. Multi-character composite synthetics - yes, asynch will be useful. But you will still face liquidity check of each symbol. It will not be enough to create a position with consistent entries. By the way, asynh works as slowly as non-synchronous placing orders. So if you need speed for placing a single order, it surely should not be asynch.

 
Alena Lysenkova:

Why in terminal change of open interest:
SymbolInfoDouble(Symbol(),SYMBOL_SESSION_INTEREST)
lives its life relative to the tape?
void OnBookEvent(const string& symbol)

As far as I understand the futures market, transactions in the ribbon may not cause OI to change. But why does the OI change by itself without any transactions?
This has already been seen before:
https://www.mql5.com/ru/forum/165157/page2#comment_3989978

OI in the terminal is updated with what periodicity, what does it depend on?
How do I synchronize OI changes with trades in the feed? I want to get a full-fledged feed with OI.

The OI changes if and only if there is a trade (Last). Strictly speaking, one participant can enter the market after concluding a deal and the other participant exits the market with the same deal. In this case even when a deal is made, the OM won't change. Thus, the event OnTick() must be synchronized with OI changes. If it's not so in case of MT, it means that trade channels for OI and ticks are different. These are different sources that will be slightly out of sync in time. However, this is the maximum that can be achieved. Analysis of trade feeds, timers - all this is meaningless algo. The programmer in this case has only one possibility: to obtain the closest known value of OM, at the moment of a new tick arrival. The two values will be synchronized with each other as much as possible. But there will be no perfect synchronization.

But the real-time OI access, provided by the exchange, is the exception rather than the rule. On other exchanges the OI is only a reference value published at the end of the day. Therefore, MOEX is to be commended for this amazing opportunity to observe the OM in [almost] real time.

 
Vasiliy Sokolov:

The programmer has only one option in this case: to get the nearest known OI value, at the moment the new tick arrives. The two values will be in sync with each other as much as possible. But there will be no perfect synchronization.

So I did, and I already found out that the data is not synchronized.

Vasiliy Sokolov:

The analysis of the trades feed, the timers are all pointless algos.

It's more for experimentation in order to understand at least some correlation.

Vasiliy Sok olov :

However, I will note that the real time OI access provided by the exchange is the exception rather than the rule. On other exchanges the OI is only a reference value published at the end of the day. Therefore, MOEX is to be commended for such a terrific opportunity to observe the OM in [almost] real time.

Volfix on the same instruments gives a change in OI immediately in the feed. So MOEX gives such data. But in Mt5 there is no synchronisation for some reason.


It would be nice just to understand how this works in general in the terminal. Does the OI update at some periodicity, or just lags.
As this would at least allow the OI change to be linked to the tape, with the same lag.

 
Vasiliy Sokolov:

Why do you need an asynchronous engine? If you drive two legs, you quote the first leg with limit and hit the second leg with marker when the first leg is triggered. Here you can do without asynchronous and useful. Multi-character composite synthetics - yes, asynch will be useful. But you will still face liquidity check of each symbol. It will not be enough to create a position with consistent entries. By the way, asynh works as slowly as non-synchronous placing orders. So if you need speed for placing a single order, you should not focus on asynch.

In fact it is only necessary for three and four legged arbitrageurs. I don't have so many of them, only a few dozen, and for now I just use synchronous engine.

I know that asynchronous one does not increase the speed, I understand the physics of the process and I also understand why numbers shown by the terminal for asynchronous one are lower than synchronous ones.

That's why I've decided that I do not want to deal with asynchronous one myself. I'd rather do something more useful for trading. And there is no one to order it from, because there are no specialists who understand all the pitfalls that occur in real trading, not in tester trading.

And about speed there's only one ridiculous dreamer here on this forum who plans to one day win the LCI with HFT:) on MT5 and it's certainly not me.
 
Alena Lysenkova:

I did, and I found out that the data was out of sync.

This is more of an experiment to see if there is any correlation.

Volfix on the same instruments gives a change in OI immediately in the tape. Hence MOEX gives such data. But in Mt5 there is no synchronisation for some reason.


It would be nice to just understand how it works in general in the terminal. The OI update happens with some periodicity, or just lags.
Since that would at least somehow allow you to tie the OI change to the ribbon, with the same lag.

Well, how would you link it? Suppose the arrival of OI lags behind the ticks. Then in OnTick, you need to obtain the latest, old OI (there's no new one in MT5 yet) and be satisfied with it. If the ticks on the contrary lags behind, then speaking generally, it is ales, because then the ticks in MT5 lag behind the entire data stream, which is seen by other market participants. But let's suppose. Then we set the timer in order to receive a new tick value as soon as possible, and the old tick is saved and combined with this OM. All the same, it's bad - there will be a current OM and an old, irrelevant last tick associated with it. Besides, normal timer is less than 16 msec. You won't - preemptive multithreading. You'll get a crooked timer with a rather large gap of several msec, which is hard to understand when it will be called. You won't be able to cram the Expert Advisor with Sleep() in a normal way either. It requires too high a resolution. In any case, you will either have a lagged OM or a tick.