fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    genetic pass (0, 3) tested with error "critical runtime error 503 in OnTick function

    Bug Reports
    2
    3
    947
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • tcanuto
      tcanuto last edited by

      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

      1 Reply Last reply Reply Quote 0
      • fxDreema
        fxDreema last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • tcanuto
          tcanuto last edited by

          Ok. Thanks fxDreema.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post

          Online Users

          M
          G
          D
          A
          A
          R
          G
          S

          18
          Online

          146.7k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors