Errors, bugs, questions - page 1938

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Tried your option - within the margin of error change
It was:
2017.07.21 17:23:20.046 Core 1 Si-9.17,M1: 107509 ticks, 35385 bars generated. Environment synchronized at 0:00:00.032. Test passed in 0:02:52.037 (including ticks preprocessing 0:00:00.031).
2017.07.21 17:23:20.046 Core 1 Si-9.17,M1: total time from login to stop testing 0:02:52.069 (including 0:00:00.032 for history data synchronization)
2017.07.21 17:23:20.046 Core 1 351 Mb memory used including 32 Mb of history data, 64 Mb of tick data
Became with your code
2017.07.21 17:27:37.393 Core 1 Si-9.17,M1: 107509 ticks, 35385 bars generated. Environment synchronized at 0:00:00.031. Test passed in 0:02:58.013 (including ticks preprocessing 0:00:00.031).
2017.07.21 17:27:37.393 Core 1 Si-9.17,M1: total time from login to stop testing 0:02:58.044 (including 0:00:00.031 for history data synchronization)
2017.07.21 17:27:37.393 Core 1 352 Mb memory used including 32 Mb of history data, 64 Mb of tick data
MT4
2017.07.21 17:27:57.070 RUBRUR,M1: 225314 tick events (35701 bars, 231783 bar states) processed in 0:00:04.306 (total time 0:00:11.357)
You have already been advised on a ready-made solution -https://www.mql5.com/ru/code/18305
Judging by your requirements:
It's the right one for you.
I tried it out and this is the result:
2017.07.21 18:15:16.395 Core 1 Si-9.17,M1: 107509 ticks, 35385 bars generated. Environment synchronized at 0:00:00.047. Test passed in 0:02:37.748 (including ticks preprocessing 0:00:00.031).
2017.07.21 18:15:16.395 Core 1 Si-9.17,M1: total time from login to stop testing 0:02:37.795 (including 0:00:00.047 for history data synchronization)
2017.07.21 18:15:16.395 Core 1540 Mb memory used including 32 Mb of history data, 64 Mb of tick data
Not much use, and for unclear reasons the financial result is different :(
You can also try to remove array declaration in functions and make it global. I.e. make array arr[ 1 ] global and remove string double arr[ 1 ]; from all functions.
Here is the result
2017.07.21 18:28:58.653 Core 1 Si-9.17,M1: 107509 ticks, 35385 bars generated. Environment synchronized at 0:00:00.078. Test passed in 0:02:51.477 (including ticks preprocessing 0:00:00.031).
2017.07.21 18:28:58.653 Core 1 Si-9.17,M1: total time from login to stop testing 0:02:51.555 (including 0:00:00.078 for history data synchronization)
2017.07.21 18:28:58.653 Core 1 359 Mb memory used including 32 Mb of history data, 64 Mb of tick data
Yes, it's a bit faster than before, but it doesn't compare to MQL4...
What if I assume it's not the code? At the moment, my Expert Advisor has been slowing down and it hasn't been able to finish its work for about 10 minutes - I haven't made any changes to it....
So, gentlemen, now I'm seriously confused - cut out the whole void OnTick(), and got a stunning result
2017.07.21 21 21:22:08.048 Core 1 Si-9.17,M1: 107509 ticks, 35385 bars generated. Test passed in 0:02:32.928 (including ticks preprocessing 0:00:00.031).
2017.07.21 21:22:08.048 Core 1 346 Mb memory used including 32 Mb of history data, 64 Mb of tick data
And then an idea arises, maybe the external indicators whose handal is declared and received are slowing down, if they are not even queried, if so, then why did profiling remain silent about it and took me a day of my life...
...if that's the case, then why did profiling remain silent about it and take a day off my life...
Because you're not posting your code, and you're taking a day of life from everyone here. Reverse from the universe )
Because you're not putting out your code, and taking a day's worth of life from everyone here. Reverse from the universe )
Is that what you're talking about?
Is this what you're talking about?
Looks like
Is this what you're talking about?
No, no, I posted the results of the profiling!