I have one turkey where it takes all the time, practically. :) statistical chronometric pattern analyzer :)
On each bar it accesses different Close[] about 2000 times, and then it takes a lot to arrays. I have to check it before each access to the array with a bunch of if()'s. I'm not even trying to convert it to HLC :)
but I'd like to develop the idea, because it brings some profits.
With such a long time, there's clearly something wrong with the code. I am working in an endless loop, approx. 2000 lines of code, including processing arrays and redrawing graph objects. One loop takes about 10-12 ms. Between ticks it manages to wrap around 30-500 times. MT is very fast. Look for the problem in your code.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
OK. Thank you.
Now I have to meditate for a while...
It's impossible to write anything well...
The forum is indispensable in that sense.
Thanks again.
try using ArrayCopy();
tried it. it makes absolutely no sense. the speed is identical.
and with local variables, it's 5 times faster.
It's 5 times faster with local variables.
How long does it take in your code?
statistical chronometric pattern analyzer :)
On each bar it accesses different Close[] about 2000 times,
and then it takes a lot to arrays. I have to check it before each access to the array with a bunch of if()'s.
I'm not even trying to convert it to HLC :)
but I'd like to develop the idea, because it brings some profits.
2. Is there no loop or infinite loop in the indicator?
If I just insert this construct in one place, speed increases by 2 times.
and in general the speed of accessing arrays and local variables differs by 10 times.
can anyone recommend a small, fast compiler?
Preferably C or Pascal.
I am working in an endless loop, approx. 2000 lines of code, including processing arrays and redrawing graph objects. One loop takes about 10-12 ms. Between ticks it manages to wrap around 30-500 times.
MT is very fast. Look for the problem in your code.
t2=LocalTime(); for(d=5000 ;d>0;d--) for(k=1;k<5000;k++){ z=Close[k];y=Close[k+1];x=Close[k+2]; z=Open[k];y=Open[k+1];x=Open[k+2]; }