MT5 and speed in action - page 55

 
fxsaber:

The task is to force the terminal to free memory.

Checked my assumptions

Does not free memory, or rather does not free memory completely at once - free memory for local variable - class/structure , but in terminal memory will be a copy of ticks


every Sleep(1000) - ALWAYS memory is freed after the 9th slip, i.e. this is an artificial restriction of ticks saving in the terminal, not in EA

Apparently, there is no way - only if developers change storage logic for this data

 
fxsaber:
An example of an EA that will kill most VPS.

Ran it on MetaQuotes-Demo on a Atomic tablet with 4Gb of memory - the result:

2020.10.13 22:43:51.219 0018 (USDJPY,H1)        CopyTicksRange(_Symbol,Ticks,COPY_TICKS_ALL,(long)inFrom*1000) = 1747129
2020.10.13 22:43:51.294 0018 (USDJPY,H1)        TerminalInfoInteger(TERMINAL_MEMORY_USED) = 913
2020.10.13 22:43:51.995 0018 (EURUSD,H1)        CopyTicksRange(_Symbol,Ticks,COPY_TICKS_ALL,(long)inFrom*1000) = 1976814
2020.10.13 22:43:52.071 0018 (EURUSD,H1)        TerminalInfoInteger(TERMINAL_MEMORY_USED) = 1335
2020.10.13 22:43:53.415 0018 (AUDUSD,H1)        CopyTicksRange(_Symbol,Ticks,COPY_TICKS_ALL,(long)inFrom*1000) = 1964168
2020.10.13 22:43:53.452 0018 (AUDUSD,H1)        TerminalInfoInteger(TERMINAL_MEMORY_USED) = 1465
2020.10.13 22:43:54.554 0018 (CHFJPY,H1)        CopyTicksRange(_Symbol,Ticks,COPY_TICKS_ALL,(long)inFrom*1000) = 1784317
2020.10.13 22:43:54.607 0018 (CHFJPY,H1)        TerminalInfoInteger(TERMINAL_MEMORY_USED) = 1483
2020.10.13 22:43:56.546 0018 (EURNZD,H1)        CopyTicksRange(_Symbol,Ticks,COPY_TICKS_ALL,(long)inFrom*1000) = 2729847
2020.10.13 22:43:56.611 0018 (EURNZD,H1)        TerminalInfoInteger(TERMINAL_MEMORY_USED) = 1483
2020.10.13 22:43:58.199 0018 (EURJPY,H1)        CopyTicksRange(_Symbol,Ticks,COPY_TICKS_ALL,(long)inFrom*1000) = 2288326
2020.10.13 22:43:58.278 0018 (EURJPY,H1)        TerminalInfoInteger(TERMINAL_MEMORY_USED) = 1484

No disaster - Opera with multiple tabs even takes longer to load.

What am I doing wrong?

 
A100:

Ran it on MetaQuotes-Demo on a Atomic tablet with 4Gb of memory - the result:

No disaster - Opera with multiple tabs takes longer to load.

What am I doing wrong?

Not enough ticks. Look at the number in my logs.

 
fxsaber:

Not many ticks. Look at quantity in my logs.

Some strange function CopyTicksRange - increased query period many times, but no ticks are added and no errors are returned, GetLastError is zero after query

 

The query period was set to 01.06.20 - as a result, after restarting the tablet and the terminal, the result was as follows (only the relevant information was left to be output):

2020.10.14 04:03:31.203 0018 (EURGBP,H1)        Тиков=6855538, Памяти=2202
2020.10.14 04:03:35.271 0018 (EURCHF,H1)        Тиков=6385392, Памяти=2225
2020.10.14 04:03:41.031 0018 (EURAUD,H1)        Тиков=9317261, Памяти=2916
2020.10.14 04:03:44.068 0018 (CHFJPY,H1)        Тиков=6586851, Памяти=2528
2020.10.14 04:03:47.109 0018 (AUDUSD,H1)        Тиков=6214303, Памяти=2157
2020.10.14 04:03:50.634 0018 (EURUSD,H1)        Тиков=6946988, Памяти=2157
The number of ticks is comparable
 
I set the period from 01.01.20, Sleep(15000). Result:
2020.10.14 04:21:30.297 0018 (EURGBP,H1)        Тиков=17354722, Памяти=6523
2020.10.14 04:21:40.916 0018 (AUDUSD,H1)        Тиков=13644101, Памяти=6525
2020.10.14 04:21:57.025 0018 (EURAUD,H1)        Тиков=21763832, Памяти=5520
2020.10.14 04:22:08.628 0018 (CHFJPY,H1)        Тиков=16150733, Памяти=4729
2020.10.14 04:22:19.463 0018 (EURUSD,H1)        Тиков=18471813, Памяти=3462
2020.10.14 04:22:29.411 0018 (EURCHF,H1)        Тиков=16227930, Памяти=2514

Just a reminder - I only have 4Gb of memory, including video memory, i.e. only 3.9-1.7 is really free and it only takes 6.5 per task - and everything is slow, but it works!

 

For mass ticking work, put in more memory.

4gb (price €20) is nowhere near good in 2020 when it comes to analytics and research.

 

Released beta 2652, of importance:

  • fixes in Watch List expressions of the debugger
  • improved compile interrupts (by 22%)
  • Dramatically accelerated access to SymbolInfoTick
  • Improvements in profiler report
  • prohibition of trading when launching frame based Expert Advisors in the tester
  • fixed resetting of parameters when pressing "Reset" button in "Ichimoku Kinko Hyo" indicator parameters

 
Renat Fatkhullin:

Released beta 2652, of importance:

  • fixes in Watch List expressions of the debugger
  • compile interrupts improved (by 22%).
  • Dramatically accelerated access to SymbolInfoTick
  • Improvements in profiler report
  • prohibition of trading when launching frame based Expert Advisors in the tester
  • fixed resetting of parameters when pressing "Reset" button in "Ichimoku Kinko Hyo" indicator parameters

Predefined variables, for the current tick, would probably be better.


 
Gentlemen prog...
Read first about memory allocation in the computer, then how and by what means it is done, then how to clean and read from and to is not difficult. At least more reasonable suggestions to the developers are possible
Reason: