genetic pass (0, 3) tested with error "critical runtime error 503 in OnTick function
-
Hello fxDreema .
I do not know if I commented on this error, but I appeared again at the time of optimization.
From what I understand this is a bug in the code .
2016.08.24 20:11:49 Core 4 genetic pass (0, 3) tested with error "critical runtime error 503 in OnTick function (zero divide, module Experts\Metodo MAs v1.0.ex5, file Metodo MAs v1.0.mq5, line 2267, col 69)" in 0:00:36.165
......
20160824.log -
It was discussed before...
So, before using "Risk % of...", make sure that SL is a positive value, because SL is used to calculate the lot size. The exact row where the error happens is:else if (mode=="equityRisk") {size=((value/100)*AccountEquity())/(sl*TickValue*PipValue(symbol));}... you can see this small "sl" just after /. If this is 0, the "zero divide" error appears.
-
Ok. Thanks fxDreema.