MT5 and speed in action - page 14

 

I don't know if it was here or not.

Really need box trees and hashmaps. For multivolume, software hashmap is very slow for further testing.

And C++17 :)

 

Try beta build 2577, please.

We have improved with story sampling and will continue to revise it drastically.

 
Renat Fatkhullin:

Try beta build 2577, please.

Improved with story sampling and will continue to redesign dramatically.

It seems to have gotten worse:

2020.08.19 03:41:43.173         Time[MT4Orders.mqh 434: ::HistorySelect(this.LastTime,D'31.12.3000 23:59:59')] = 11 ms.
2020.08.19 03:41:43.174         Time[MT4Orders.mqh 622: this.RefreshHistory()] = 12 ms.

There were no such numbers on 2573 the previous day.

 
Andrey Pogoreltsev:

I don't know if it was here or not.

Really need box trees and hashmaps. For multivolume, software hashmap is very slow for further testing.

And C++17 :)

The supplied hashmap is the fastest of all implementations, I checked. There are two other variants lying around in CB and there's an article on one of them, they're an order of magnitude slower. And what kind of hashmap do you need,not software? Don't you want a hardware hashmap on FPGA? )) How about it, Elon Musk!

What's wrong with pluses? MQL5 no longer support loading 64-bit DLL? Immediately write to Renate about this outrage! I even have C++ 20 supported! I've only got to learn it ))

------------------

Microsoft Visual Studio Enterprise 2019 Preview

Version 16.7.0 Preview 4.0

Installed version: Enterprise

Microsoft Visual C++ 2019

 
Andrey Khatimlianskii:

It seems to have gotten worse:

There were no such numbers on 2573 the previous day.

It seems to have been the first cold requests. Not a single print since then.

 
Renat Fatkhullin:

Try beta build 2577, please.

We have improved with story sampling and will continue to revise it drastically.

2020.08.19 09:30:06.512 Test6 (GBPNZD,H1)       Alert: Time[Test6.mq5 17: CopyTicks(Symb,Ticks,COPY_TICKS_ALL,0,1)] = 1 ms.
2020.08.19 09:30:08.035 Test6 (EURGBP,M1)       Alert: Time[Test6.mq5 40: SymbolInfoDouble(Symb,SYMBOL_TRADE_TICK_VALUE)] = 4 ms.
2020.08.19 09:30:08.038 Test6 (GBPNZD,H1)       Alert: Time[Test6.mq5 13: SymbolInfoTick(Symb,Tick)] = 7 ms.
2020.08.19 09:30:08.042 Test6 (EURNZD,H1)       Alert: Time[Test6.mq5 13: SymbolInfoTick(Symb,Tick)] = 10 ms.
2020.08.19 09:30:08.044 Test6 (EURUSD,H1)       Alert: Time[Test6.mq5 74: SymbolsTotal(true)] = 13 ms.
2020.08.19 09:30:08.046 Test6 (GBPNZD,H1)       Alert: Time[Test6.mq5 39: SymbolInfoDouble(Symb,SYMBOL_ASK)] = 4 ms.
2020.08.19 09:30:08.046 Test6 (EURGBP,M1)       Alert: Time[Test6.mq5 40: SymbolInfoDouble(Symb,SYMBOL_TRADE_TICK_VALUE)] = 7 ms.
2020.08.19 09:30:08.047 Test6 (EURUSD,H1)       Alert: Time[Test6.mq5 75: SymbolName(0,true)] = 3 ms.
2020.08.19 09:30:08.048 Test6 (GBPNZD,H1)       Alert: Time[Test6.mq5 40: SymbolInfoDouble(Symb,SYMBOL_TRADE_TICK_VALUE)] = 2 ms.
2020.08.19 09:30:08.052 Test6 (EURUSD,H1)       Alert: Time[Test6.mq5 13: SymbolInfoTick(Symb,Tick)] = 2 ms.
2020.08.19 09:30:08.053 Test6 (EURGBP,M1)       Alert: Time[Test6.mq5 41: SymbolInfoDouble(Symb,SYMBOL_POINT)] = 5 ms.
2020.08.19 09:30:08.055 Test6 (GBPNZD,H1)       Alert: Time[Test6.mq5 40: SymbolInfoDouble(Symb,SYMBOL_TRADE_TICK_VALUE)] = 3 ms.
2020.08.19 09:30:08.060 Test6 (EURGBP,M1)       Alert: Time[Test6.mq5 42: SymbolInfoInteger(Symb,SYMBOL_DIGITS)] = 5 ms.
2020.08.19 09:30:08.071 Test6 (EURNZD,H1)       Alert: Time[Test6.mq5 40: SymbolInfoDouble(Symb,SYMBOL_TRADE_TICK_VALUE)] = 25 ms.
2020.08.19 09:30:24.489 Test6 (GBPNZD,H1)       Alert: Time[Test6.mq5 74: SymbolsTotal(true)] = 1 ms.
2020.08.19 09:30:25.857 Test6 (EURGBP,M1)       Alert: Time[Test6.mq5 22: HistorySelect(Tick.time,INT_MAX)] = 1 ms.
2020.08.19 09:30:26.092 Test6 (EURUSD,H1)       Alert: Time[Test6.mq5 22: HistorySelect(Tick.time,INT_MAX)] = 1 ms.
2020.08.19 09:30:26.119 Test6 (EURUSD,H1)       Alert: Time[Test6.mq5 22: HistorySelect(Tick.time,INT_MAX)] = 1 ms.
2020.08.19 09:30:29.279 Test6 (EURNZD,H1)       Alert: Time[Test6.mq5 17: CopyTicks(Symb,Ticks,COPY_TICKS_ALL,0,1)] = 1 ms.
2020.08.19 09:30:31.931 Test6 (EURUSD,H1)       Alert: Time[Test6.mq5 42: SymbolInfoInteger(Symb,SYMBOL_DIGITS)] = 2 ms.
2020.08.19 09:30:31.931 Test6 (EURNZD,H1)       Alert: Time[Test6.mq5 40: SymbolInfoDouble(Symb,SYMBOL_TRADE_TICK_VALUE)] = 1 ms.
2020.08.19 09:30:33.402 Test6 (EURNZD,H1)       Alert: Time[Test6.mq5 34: HistoryOrderSelect(0)] = 7 ms.
2020.08.19 09:30:35.686 Test6 (GBPNZD,H1)       Alert: Time[Test6.mq5 74: SymbolsTotal(true)] = 2 ms.
2020.08.19 09:30:37.810 Test6 (EURUSD,H1)       Alert: Time[Test6.mq5 39: SymbolInfoDouble(Symb,SYMBOL_ASK)] = 1 ms.
2020.08.19 09:30:52.415 Test6 (GBPNZD,H1)       Alert: Time[Test6.mq5 22: HistorySelect(Tick.time,INT_MAX)] = 3 ms.
2020.08.19 09:31:10.903 Test6 (EURNZD,H1)       Alert: Time[Test6.mq5 22: HistorySelect(Tick.time,INT_MAX)] = 1 ms.
2020.08.19 09:31:11.414 Test6 (GBPNZD,H1)       Alert: Time[Test6.mq5 40: SymbolInfoDouble(Symb,SYMBOL_TRADE_TICK_VALUE)] = 5 ms.
2020.08.19 09:31:11.414 Test6 (EURNZD,H1)       Alert: Time[Test6.mq5 39: SymbolInfoDouble(Symb,SYMBOL_ASK)] = 9 ms.
2020.08.19 09:31:32.694 Test6 (EURGBP,M1)       Alert: Time[Test6.mq5 42: SymbolInfoInteger(Symb,SYMBOL_DIGITS)] = 2 ms.
2020.08.19 09:31:51.245 Test6 (GBPNZD,H1)       Alert: Time[Test6.mq5 22: HistorySelect(Tick.time,INT_MAX)] = 1 ms.
2020.08.19 09:31:53.989 Test6 (EURGBP,M1)       Alert: Time[Test6.mq5 17: CopyTicks(Symb,Ticks,COPY_TICKS_ALL,0,1)] = 2 ms.
2020.08.19 09:32:11.871 Test6 (GBPNZD,H1)       Alert: Time[Test6.mq5 22: HistorySelect(Tick.time,INT_MAX)] = 1 ms.
2020.08.19 09:32:20.310 Test6 (EURNZD,H1)       Alert: Time[Test6.mq5 42: SymbolInfoInteger(Symb,SYMBOL_DIGITS)] = 3 ms.
2020.08.19 09:32:47.513 Test6 (EURUSD,H1)       Alert: Time[Test6.mq5 22: HistorySelect(Tick.time,INT_MAX)] = 3 ms.
2020.08.19 09:32:49.367 Test6 (EURUSD,H1)       Alert: Time[Test6.mq5 22: HistorySelect(Tick.time,INT_MAX)] = 1 ms.
2020.08.19 09:32:56.358 Test6 (EURGBP,M1)       Alert: Time[Test6.mq5 22: HistorySelect(Tick.time,INT_MAX)] = 1 ms.
2020.08.19 09:33:05.424 Test6 (EURNZD,H1)       Alert: Time[Test6.mq5 75: SymbolName(0,true)] = 2 ms.
2020.08.19 09:33:16.537 Test6 (EURUSD,H1)       Alert: Time[Test6.mq5 40: SymbolInfoDouble(Symb,SYMBOL_TRADE_TICK_VALUE)] = 5 ms.
2020.08.19 09:33:16.551 Test6 (EURNZD,H1)       Alert: Time[Test6.mq5 40: SymbolInfoDouble(Symb,SYMBOL_TRADE_TICK_VALUE)] = 13 ms.
2020.08.19 09:33:47.303 Test6 (EURUSD,H1)       Alert: Time[Test6.mq5 40: SymbolInfoDouble(Symb,SYMBOL_TRADE_TICK_VALUE)] = 7 ms.
2020.08.19 09:33:50.587 Test6 (EURNZD,H1)       Alert: Time[Test6.mq5 22: HistorySelect(Tick.time,INT_MAX)] = 2 ms.
2020.08.19 09:33:56.181 Test6 (EURNZD,H1)       Alert: Time[Test6.mq5 41: SymbolInfoDouble(Symb,SYMBOL_POINT)] = 1 ms.
2020.08.19 09:33:59.244 Test6 (EURNZD,H1)       Alert: Time[Test6.mq5 74: SymbolsTotal(true)] = 1 ms.
2020.08.19 09:34:03.255 Test6 (GBPNZD,H1)       Alert: Time[Test6.mq5 41: SymbolInfoDouble(Symb,SYMBOL_POINT)] = 2 ms.
2020.08.19 09:34:47.388 Test6 (EURNZD,H1)       Alert: Time[Test6.mq5 28: HistoryDealSelect(0)] = 1 ms.
2020.08.19 09:34:47.498 Test6 (EURGBP,M1)       Alert: Time[Test6.mq5 22: HistorySelect(Tick.time,INT_MAX)] = 1 ms.
2020.08.19 09:35:06.001 Test6 (EURGBP,M1)       Alert: Time[Test6.mq5 74: SymbolsTotal(true)] = 3 ms.
2020.08.19 09:35:06.005 Test6 (EURGBP,M1)       Alert: Time[Test6.mq5 75: SymbolName(0,true)] = 1 ms.
2020.08.19 09:35:06.017 Test6 (EURGBP,M1)       Alert: Time[Test6.mq5 22: HistorySelect(Tick.time,INT_MAX)] = 1 ms.
2020.08.19 09:35:06.022 Test6 (EURNZD,H1)       Alert: Time[Test6.mq5 42: SymbolInfoInteger(Symb,SYMBOL_DIGITS)] = 3 ms.
2020.08.19 09:35:06.046 Test6 (EURNZD,H1)       Alert: Time[Test6.mq5 28: HistoryDealSelect(0)] = 12 ms.
2020.08.19 09:35:29.014 Test6 (GBPNZD,H1)       Alert: Time[Test6.mq5 22: HistorySelect(Tick.time,INT_MAX)] = 1 ms.
2020.08.19 09:36:30.289 Test6 (EURUSD,H1)       Alert: Time[Test6.mq5 40: SymbolInfoDouble(Symb,SYMBOL_TRADE_TICK_VALUE)] = 1 ms.
2020.08.19 09:36:55.946 Test6 (EURUSD,H1)       Alert: Time[Test6.mq5 74: SymbolsTotal(true)] = 2 ms.
2020.08.19 09:36:55.950 Test6 (EURNZD,H1)       Alert: Time[Test6.mq5 39: SymbolInfoDouble(Symb,SYMBOL_ASK)] = 3 ms.

It became much better. In combat, have not yet tested.


ZZY Combat version logs show that there is still a lot to fix...

 
Alexey Volchanskiy:

The supplied hashmap is the fastest of all the implementations, I've checked. There are two other variants in the CB and there's an article on one of them, they're an order of magnitude slower. What kind of hashmap do you need,not software? Don't you want a hardware hashmap on FPGA? )) How about it, Ilon Musk!

I mean std:: without implementation in executable language mql5, because it's significantly slower than native implementation on pluses.


What's wrong with pluses? MQL5 no longer supports loading of 64-bit DLL? Immediately write to Renate about this outrage! I even have C++ 20 supported! Just need to get the hang of it ))!

Native DLL option is nice, but it has many disadvantages:

  1. Not supported by strategy tester
  2. Can not stick in the same shop
  3. Not all users like to run the EA with their DLL
  4. As far as I understand (correct me if I'm wrong) - the DLL is loaded/unloaded at each call
And MQL5 itself is a C++ analogue, only C99, so this is what we are talking about.


PS. I'll try to translate my robot to DLL - it may be faster to pass tests and work in general

Тестирование стратегий - Алгоритмический трейдинг, торговые роботы - Справка по MetaTrader 5
Тестирование стратегий - Алгоритмический трейдинг, торговые роботы - Справка по MetaTrader 5
  • www.metatrader5.com
Тестер стратегий позволяет тестировать и оптимизировать торговые стратегии (советники) перед началом использования их в реальной торговле. При тестировании советника происходит его однократная прогонка с начальными параметрами на исторических данных. При оптимизации торговая стратегия прогоняется несколько раз с различным набором параметров...
 
b2579.
Files:
2579_lags.txt  653 kb
 
fxsaber:
In OnTick I request tick history from the previous tick.

Not really on the subject of lags, but I'll ask anyway. What's the story for? Can ticks be missed? MT4 practiced this, but MT5 shouldn't do that, should it?

 
traveller00:

Not really on the subject of lags, but I'll ask anyway. What's the story for? Can ticks be missed? MT4 practiced it, and MT5 should not do that, no?

TheNewTick event is generated when new quotes arrive and is handled byOnTick() in attached EAs. If at the arrival of a new quote the OnTick function running on the previous quote is called, the newcoming quote will be ignored by the Expert Advisor, because the corresponding event is not placed in the Event Queue of the Expert Advisor.

https://www.mql5.com/ru/docs/runtime/event_fire#newtick