Stock market. Stocks. Speed of trade order execution. - page 17

 
Andrey Miguzov #:

Suppose we are dealing with a 'kitchen'. They might send us in their logs that the execution time is 1ms. How to check it? Go to the exchange and look at the time there - it is the only way to roughly understand whether we are lying or not.

I've been doing this for several years, proving to MQ that they have a problem with delays, when the delays were up to 1 sec,

there was a dialogue, but when the delays "rolled in" to 14-20 seconds, MQ stopped the dialogue.

So, to know how an order was executed you need a full log of orders on the exchange,

Without it you can not prove anything.

Read here (back then the exchange was still giving data, this is 2015)

https://www.mql5.com/ru/forum/38456/page23#comment_1445099

ФОРТС. Вопросы по исполнению
ФОРТС. Вопросы по исполнению
  • 2015.03.18
  • www.mql5.com
С большими проблемами удалось это сделать (начальник отдела по работе с профессиональными клиентами ДЦ Открытие Евгений Сергеевич,.
 
prostotrader #:

I've been doing this for several years, proving to MQ that they had a problem with delays, when the delays were up to 1 sec,

there was a dialogue, but when the delays "rolled up" to 14-20 seconds, MQ stopped the dialogue.

So, to know how an order was really executed you need a full log of orders on the exchange,

Without it you can not prove anything.

Read here (back then the exchange was still giving data, this is 2015)

https://www.mql5.com/ru/forum/38456/page23#comment_1445099

Followed this thread very closely and even reread it several times.

No one will give us the full log (yet).

But by algorithm, which I described above (where T2-T1) we can understand really very important characteristic of our TS - how much time passes from the signal on the exchange - to a transaction on the exchange on this signal. And all according to the time of the exchange (the tape is the same for all).

 
Andrey Miguzov #:

Added to the post above.

The algorithm is as follows:

We receive a tick from the exchange (tick time according to exchange time - T1)

We analyze it and decide to send a buy/sell order using the symbol

We send an order

The exchange executes it and fixes the time of execution in the tick-box (time of the exchange - T2)

I am interested in time = T2-T1

Time T2 is exactly the time of the exchange, otherwise there will be discrepancies with other sources, I checked - everywhere the same.

But the time of tick T1, on which you place the order, is not known where is it coming from (it is not exchange time), so it is impossible to obtain the answer (T2-T1).

This is where I studied the problem of missing quotes

https://www.mql5.com/ru/forum/381623#comment_25821280

Котировки Срочного рынка в МТ5
Котировки Срочного рынка в МТ5
  • 2021.11.10
  • www.mql5.com
Уважаемые модераторы! Перенесите, пожалуйста сообщения из темы "Клиринг по существу????* не относящиеся к клирингу, сюда...
 
prostotrader #:

T2 time is exactly the exchange time, otherwise there will be discrepancies with other sources, I have checked - it is the same everywhere.

But the time of tick T1, on which you place the order, is not known where it comes from (it is not exchange time), so it is impossible to get an answer (T2-T1)

This is where I studied the problem of missing quotes

https://www.mql5.com/ru/forum/381623#comment_25821280

That's the thing - T1 is also exchange time. I checked it. Even on my screenshots above you can see it.

Tape of deals is broadcasted from exchange via broker to the terminal. When a tick (group of ticks) comes, the event OnTick appears. The tick time coincides with the time of tick tape (and exchange respectively). Time of the tick will be the same for all.


There is a small problem here - I take the price according to the ticker, and the change of the ticker does not always give OnTick. But the error, if any, will be higher.

 
Andrey Miguzov #:

That's the thing - T1 is also exchange time. I checked it. Even from my screenshots above you can see it.

Tape of deals is broadcasted from the exchange via broker to the terminal. When a tick (group of ticks) comes, the event OnTick appears. The tick time coincides with the time of tick tape (and exchange respectively). Time of the tick will be the same for all.


There is a small problem here - I take the price according to the ticker, and the change of the ticker does not always give OnTick. But the margin of error, if any, will be higher.

I am not sure, that the tick time is stock time.

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

It is not written where the update in the terminal or on the exchange.

 
prostotrader #:

I'm not sure if the ticking time is stock time.

It doesn't say where the update is in the terminal or on the exchange.

On the server.

 
prostotrader #:

I'm not sure if the ticking time is stock time.

It doesn't say where the update is in the terminal or on the exchange.

I'll answer you with your own quote (thanks for the link - the topic passed me by):

Forum on trading, automated trading systems and testing trading strategies

MT5 futures market quotes

prostotrader, 2021.11.20 17:05

It's not about event handlers at all.

There are two ways by which the best prices are transmitted

1. Tap slice

2. the table broadcasts the information about the instrument together with the best prices.

It does not matter at all whether the event is generated by the tumbler or by the instrument information.

The important thing is that the information is the same in all terminals, and in the history of different brokers

it is different, the deals are the same everywhere. I don't know about the difference, but ask and bid are often different.

The algorithm for getting the asks and bids in both MT5 terminals at different brokers is the same, that's why I conclude

that this algorithm does not work properly. There are missing quotes.


Let's do it another way.

I take time T1 and T2 from the trades feed. We don't know exactly what time it is, but the reference source is the same there (otherwise it would be chaos) and so we can estimate the difference between T1 and T2

Added:

There is even more belief that T1 is the time of the exchange. All the information from the tick is from the exchange. Why bother with generating some left time if ALL information (including time) comes from the exchange?

Plus, I wrote - confirmed by logs and images from the tape transactions

And another - if this is not the time of the exchange - you cannot compare the tape of deals for different brokers. And it is compared with high accuracy (there are some flaws, but it's a trifle). If we had different time sources - we would not be able to compare.

 
Andrey Miguzov #:

I'll answer you with your own quote (thanks for the link - the topic passed me by):


Let's put it another way.

I take time T1 and T2 from the trades tape. We don't know exactly what time it is, but the reference source is the same there (otherwise it would be chaos) and therefore we can estimate the difference of T1 and T2

Added:

There is even more belief that T1 is the time of the exchange. All the information from the tick is from the exchange. Why bother with generating some left time if ALL information (including time) comes from the exchange?

Plus, I wrote - confirmed by logs and images from the tape transactions

Whatever, but 2 MT5 will work faster than one of yours.

The thing is, to combine all data from different sections, you need your own special server which will broadcast

information from/to ASTS (Stock section) and Spectra (Forts) as well as import sections and transfer them to one terminal.

Since there is an intermediate link, there are inevitable delays.

 

Actually the whole question is to insert a line before sending the order:

Print(" Время тика: ", 
       TimeToString(last_tick.time,TIME_SECONDS), 
       ".", 
       (last_tick.time_msc)%1000, //добавляет мс в строку
       " по символу ", 
       name); //имя инструмента

and then post on the forum the experts tab and the log tab for that trade.

Next - I will try to find the deal in the deal feed. This, unfortunately, is not always possible.

Ideally not by a single volume. And with fill in at different prices.

 
prostotrader #:

Be that as it may, 2 MT5s will be faster than one of yours.

The thing is, to combine all the data from different sections, you need your own special server which will broadcast

information from/to ASTS (Stock section) and Spectra (Forts) as well as import sections and transfer them to one terminal.

Since there is an intermediate link, there are inevitable delays.

Agreed. This is so and that's sad :(

It turns out that EBS is only for strategies for which the execution time of 100-200 ms is not critical.

Although, if you look into it thoroughly - there are no such strategies. Profit will always be inversely proportional to execution time.

Reason: