Dserg: Ololo, I finally figured out how to significantly speed up this inductor. If it takes off, I'll post an update.
In principle, it is not difficult, because The same cycle is repeated 7 times in a row in the indicator; you can either put this block in a separate function or wrap it in one more cycle, the main thing is to use variables imin,jmin,imin1,The main thing is that the variables imin1,imin2,jmin2,imin3,jmin3,imin4,jmin4,imin5,jmin5,imin6,jmin6,imin7,jmin7 should be replaced with the array imin[7],jmin[7] and the repeated comparison imin,jmin can be replaced with a check for the array initialization value
The idea is different there - finding the minimum value of a function with a dimension of 4 or more, as in my case, is more advantageous using the Monte Carlo method, rather than a dumb search, as it is now. Particularly strong gains are expected on a large number of bars.
Ololo, I've finally figured out how to significantly speed up this turkey. If it takes off, I'll post an update.
How about this? - https://www.mql5.com/ru/code/9946
Ololo, I've finally figured out how to significantly speed up this turkey. If it takes off, I'll post an update.
Do not forget
if (A=B && C=D)
{...}
replace by
if (A=B)
{if (C=D)
{...}}
This also speeds up the process.
Do not forget
if (A=B && B=C)
{...}
replace by
if (A=B)
{if (B=C)
{...}}
This also speeds up the process.
You're strong, brother, there's no words... maybe the B should be removed altogether?!
You're strong, brother, there's no words... maybe the B should be removed altogether?!
You're strong, brother, there's no words... maybe the B should be removed altogether?!
Breaking down logical expressions into simpler ones with checking them individually really speeds things up. And very significantly.
Ololo, I finally figured out how to significantly speed up this inductor. If it takes off, I'll post an update.
In principle, it is not difficult, because The same cycle is repeated 7 times in a row in the indicator; you can either put this block in a separate function or wrap it in one more cycle, the main thing is to use variables imin,jmin,imin1,The main thing is that the variables imin1,imin2,jmin2,imin3,jmin3,imin4,jmin4,imin5,jmin5,imin6,jmin6,imin7,jmin7 should be replaced with the array imin[7],jmin[7] and the repeated comparison imin,jmin can be replaced with a check for the array initialization value
Dserg :There's another idea...