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
Why is the script so slow?
The answer is in the profiler.
The answer is in the profiler.
OK, the profiler refers to this piece of code
What doesn't it like? The function is not mine, but the author above claimed it should work quickly...
OK, the profiler refers to this piece of code
What doesn't it like? The function is not mine, but the author above claimed it should work fast...
I don't really understand the humor, why did you overload the MQL4iBarShift function? The compiler probably gets confused because of it.
The iBarShift2 function is designed for MQL5, and in MQL4, it only tested the correctness of its execution, comparing it with the standard function.
I don't understand the humour, why did you overload the MQL4 iBarShift function? The compiler probably gets confused because of it.
No one has cancelled
And there should not be any confusion.
I don't understand the humor, why did you overload the MQL4 iBarShift function? The compiler may get confused because of it.
The iBarShift2 function is designed for MQL5, and in MQL4, it only tested the correctness of its execution, comparing it with the standard function.
I guess I'm not paying attention, but I looked at your posts again - i.e. your functions for MT4? It's just that the topic was about MT5, I guess that's what misled me.
I've added: Damn, I've found another code, it's all blurred, I apologise.
I must not have been paying attention, but I looked at your posts again - i.e. your functions for MT4? It's just that the topic was about MT5, I guess that's what misled me.
Added: Shit, that's it - found another code - it all got blurry, sorry.
Wow. No. I tried your code in MQL5 and got confused. Now I understand what you mean.
Here is an interesting picture.
If your script runs on native TF=1 Day, everything is OK.
But if I run it on another TF I get unbelievable disproportionate lags, which I can't explain yet, except for some bug in the compiler.
At the same time in debug mode or profiling mode there are no these brakes!!!
I will now experiment and look for the source of the brakes.
Whoa. No. I have tried your code in MQL5 and got confused. I now understand what you mean.
Here is an interesting picture.
If your script runs on native TF=1 Day, everything is OK.
But if I run it on another TF I get unbelievable disproportionate lags, which I can't explain yet, except for some bug in the compiler.
At the same time in debug mode or profiling mode there are no these brakes!!!
I will now experiment and look for the source of the brakes.
Start your search by substituting a normal datetime value
Why is the script so slow?
Yes, it is surprising.
I have localised the location of the brakes.
If you run this script on, say, H4
you can see that the first time it accesses
the system freezes.
And this stupor is not present when profiling or debugging.
A clear issue for the service desk
Why is the script so slow?
2018.03.30 09:21:05.208 BS (Si Splice,H4) 1 Start=15 Stop=3 Day_Shift=0 index=0
2018.03.30 09:21:05.208 BS (Si Splice,H4) 1 Start=2018.03.26 00:00 Stop=2018.03.29 00:00 Day_Shift=2018.03.29 20:00 index=0
2018.03.30 09:21:20.209 BS (Si Splice,H4) 2 Start=15 Stop=3 Day_Shift=0 index=0
2018.03.30 09:21:20.209 BS (Si Splice,H4) 2 Start=2018.03.26 00:00 Stop=2018.03.29 00:00 Day_Shift=2018.03.29 20:00 index=0
2018.03.30 09:20:49.300 Scripts script BS (Si Splice,H4) loaded successfully
2018.03.30 09:21:20.209 Scripts script BS (Si Splice,H4) removedThanks Alexey for the observation.
This is an obvious bug in the Bars() function.
Opened the question in the bugs, bugs, queries thread
Thanks Alexey for the observation.
This is a clear bug in Bars() function.
Opened a question in the bugs, bugs, queries thread
Thanks for the analysis, so I'm not completely insane yet...