fxDreema

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

    Weird 'zero divide' error

    Questions & Answers
    4
    7
    1003
    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.
    • l'andorrà
      l'andorrà last edited by

      Until yestarday, my backteting was working fine but for some reason I don't understand, today I cannot continue because I get this zero divide error:

      0_1605696566740_02.png

      And here you can see both lines 31 and 9193 of the code:

      0_1605696598504_03.png

      0_1605696623900_04.png

      I found some possible reasons in other threads, but none of them apply to my EA:

      1. All trades have a fixed pips SL selected with a double constant.
      2. Bactesting is executed with USD as main currency.
      3. I'm not using custom indicators.
      4. I'm backtesting this symbol for weeks with no problem so far. It is the Dow Jones Index.

      The only modifications I added to the EA are a standard trailing stop block (not activated due to the backtesting beong blocked before? and a MA crossing boolean variable.

      These are both buy and sell now blocks:

      0_1605696982926_05.png

      All variables are of a double type and they worked fine until yesterday. 😞

      (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

      (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

      (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

      A 1 Reply Last reply Reply Quote 0
      • A
        ambrogio @l'andorrà last edited by

        @l-andorrà hello! I cannot solve your problem, but i can say that the error is at #9193 row and #31 column, near the / sign

        0_1605712857287_1Cattura.JPG

        l'andorrà 1 Reply Last reply Reply Quote 0
        • l'andorrà
          l'andorrà @ambrogio last edited by

          @ambrogio Ok. Thank you. I didn't know the second number was the column. I hope someone will be able to tell me what's the issue.

          (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

          (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

          (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

          1 Reply Last reply Reply Quote 0
          • S
            seb 0 last edited by seb 0

            Hmm I'm not a programmer either but I found the function documentation https://www.mql5.com/en/docs/marketinformation/symbolinfodouble
            the line seems to be correct..
            If the error is "0 devide" , and you say you are testing it on Down Jones, it could be that the second part of the fraction which takes the value of the symbol is equal to 0 because the market is closed..
            It is just a suggestion.

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

              So dow jones doesnt work, does forex symbols work?

              A hacky way to fix the code could be replacing "symbol" with "Symbol()" in the line you boxed in red. I don't know if its going to mess up something, though. Its about the pip values and formatting, I never touch those.

              Need small help? Tag me in your post
              Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

              l'andorrà 1 Reply Last reply Reply Quote 0
              • A
                ambrogio last edited by ambrogio

                @l-andorrà I counted the columns well, it looks like column 31 is right the " / " , have you setup the pips size rules for DJ ?

                1 Reply Last reply Reply Quote 0
                • l'andorrà
                  l'andorrà @roar last edited by

                  @roar It works correctly for all symbols in my broker. It worked fine until yesterday!!! 😞

                  I did as you suggested and now backtesting is working again, but I will do more in order to check no more issues arised dute to this change.

                  Also thank you to seb0 and ambrogio for your help.

                  (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

                  (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

                  (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

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

                  Online Users

                  P
                  B
                  S
                  S
                  T
                  F
                  I
                  S
                  S
                  G
                  I

                  20
                  Online

                  146.6k
                  Users

                  22.4k
                  Topics

                  122.6k
                  Posts

                  Powered by NodeBB Forums | Contributors