MT5 and speed in action - page 33

 
Renat Fatkhullin:

Your market/trading state will not change until you receive a step-by-step detail on your asynchronous request after some time, which you can catch in OnTradeTransaction.

Or not, if there is even a momentary loss of communication with the trade server

 
fxsaber:

The acceleration happened, but unfortunately for some reason the cache update is not within one millisecond, so it alerts at every step where the history is updated.


Please try it on a large history.


I assume this millisecond is due to memory allocation for cache update. Nothing else seems to be slowing it down.

Switch to microsecond counting. Milliseconds are no longer appropriate.

 
Renat Fatkhullin:

Switch to microsecond counting. Milliseconds are no longer appropriate.

I did. But this does not make HistorySelect work any faster, of course.

Files:
Benchmark.mqh  3 kb
 
Andrey Khatimlianskii:

Of course, there has to be one snapshot object.

Got it.

Forum on trading, automated trading systems and strategy testing

Libraries: Virtual

fxsaber, 2020.09.24 12:25

The snapshot has tripled the speed of pure MQL5. For example, in this case the snapshot is three times faster than Trade\Trade.mqh.

 
fxsaber:

Got it.

For information, your library will not help in the tester.

The tester has no caches of transaction history and it has its own direct access engine without a single copy. Since there is single-threaded execution, we don't need either caches or synchronizers.

The speed of access to deal history has always been as fast as possible since the development of the tester.

 
Renat Fatkhullin:

For information, your library will not help in the tester.

The above measurements were made for a large number of open positions and orders in Terminal. The history is also in the snapshot, but I have not measured its performance.

Unfortunately, the performance of the tester falls catastrophically when there are a large number of positions/orders at the same time. That's why I didn't even think to measure it. But it's possible to organise it somehow.

Tester has no caches of deal history and has its own direct access engine without a single copy. Since it's single-threaded execution, we don't need any caches or synchronizers.

The speed of access to deal history has always been the highest since the development of the tester.

I'll have to look it up on the forum. I remember showing how Generic access to the history is superior to the regular mechanism in the Tester.

 

History sampling in the terminal is still accelerated, it will be in the next beta.

As soon as we finish with the terminal, I invite you to a speed battle in the tester.

 
Renat Fatkhullin:

As soon as we have finished with the terminal, I invite you to a speed battle in the tester.

Unfortunately, only MT5-style is possible to beat. Since the MT4-style concept will tear the MT5-tester in terms of performance, but the comparison will not be quite correct then.

 
Try build 2622, where they have further improved the sampling rate.
 
Renat Fatkhullin:
Try build 2622, where they have further improved the sampling rate.

Thank you, it's gotten noticeably better. Unfortunately, it's not possible to change the story at the weekend, so can't check.