fxDreema

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

    zero divide in '8320-30394.mq4' (12065,31) THIS ERROR CODE MAKES MY EA STOP

    Bug Reports
    6
    12
    3730
    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.
    • serioza
      serioza last edited by

      Does anyone have experience with the mt4 FAULT codes.
      I've created a pretty successful ea only now getting this fault code after no more action from the ea.
      can someone help resolve it?

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

        @serioza It is a problem with the SL position. The Ea is looking for a SL that is not there. Can you please share the link to the project?

        (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
        • serioza
          serioza last edited by

          not sure how to share a link to the project

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

            Another fault is ( uninit reason 3 ) dont know what that means, it used to work fine but somehow have a feeling the broker is blocking something on its end as manual orders don't go through either with enough margin

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

              The best is to open the source code and look what's in that line 12065. Normally these zero-divide errors happen when one of those Risk % MM methods are used, but those who depend on SL. Or, sometimes when the symbol doesn't provide data, for example when trying to backtest multiple symbols, which is not possible in MT4.

              Uninit reason 3 seems to be Symbol or chart period has been changed. So I don't know, maybe it's possible that something wrong happens if you are changing timeframes. Do you get this error when you are changing timeframes?

              I don't know if the EA you are working on is the one that is currently active. But I checked what's in line 12065 and there is an expected division right there:

              double PipValue(string symbol)
              {
              	if (symbol == "") symbol = Symbol();
              
              	return CustomPoint(symbol) / SymbolInfoDouble(symbol, SYMBOL_POINT);
              }
              

              Value of 0 is probably SYMBOL_POINT of the symbol. So... which is the symbol and is everything fine with it? This "point" number should always be different than 0, I believe.

              serioza 2 Replies Last reply Reply Quote 0
              • serioza
                serioza @fxDreema last edited by

                @fxdreema hm no the uninit appears only when I change the timeframe hope it doesn't affect anything else, the zero divide fault code appears when a SL should be placed but is rejected somehow, it's also in the journal.

                2021.12.28 19:08:32.778 '': modify order #56840184 buy 0.01 SPX500 at 4805.39 sl: 0.00 tp: 0.00 -> sl: 4631.00 tp: 0.00
                2021.12.28 19:08:32.895 ''
                ': order #56840184 buy 0.01 SPX500 at 4805.39 was modified -> sl: 4631.00 tp: 0.00
                2021.12.28 19:08:34.528 ''': modify order #56840184 buy 0.01 SPX500 at 4805.39 sl: 4631.00 tp: 0.00 -> sl: 0.00 tp: 0.00
                2021.12.28 19:08:34.727 ''
                ': order #56840184 buy 0.01 SPX500 at 4805.39 was modified -> sl: 0.00 tp: 0.00

                2021.12.28 17:10:12.280 '***** SPX500,Daily: zero divide in '8320-37707.mq4' (12065,31)

                After it stops working, in tester it's a critical error

                2021.12.28 17:07:49.290 SPX500,M1: 137276 tick events (13521 bars, 1555327 bar states) processed in 0:00:01.984 (total time 0:00:02.125)
                2021.12.28 17:07:49.290 2021.03.18 20:01:06 Tester: order #1 is closed
                2021.12.28 17:07:49.290 2021.03.18 20:01:06 Testing pass stopped due to a critical error in the EA
                2021.12.28 17:07:49.290 2021.03.18 20:01:06 ***** SPX500,M1: zero divide in '8320-37707.mq4' (12065,31)
                2021.12.28 17:07:49.290 2021.03.18 20:01:06 ***** SPX500,M1: open #2 sell stop 0.01 SPX500 at 3871.57 ok
                2021.12.28 17:07:49.290 2021.03.18 20:01:06 ***** SPX500,M1: open #1 buy 0.01 SPX500 at 3919.98 ok

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

                  @fxdreema how to tell in which block is this error?

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

                    Looks like I've found the problem, I've replaced in the (if trade) block the specified symbol by completely deleting the symbol definition and retyping it

                    A 1 Reply Last reply Reply Quote 0
                    • fxDreema
                      fxDreema @serioza last edited by

                      @serioza said in zero divide in '8320-30394.mq4' (12065,31) THIS ERROR CODE MAKES MY EA STOP:

                      @fxdreema how to tell in which block is this error?

                      Just look few rows above if there is a comment that says the number of the block. But don't look at the name of the class, because it has other number that is used in the code only.

                      But if the error is somewhere in the many functions outside the blocks, you will not be able to tell which is the block.

                      1 Reply Last reply Reply Quote 0
                      • A
                        AlexBlack @serioza last edited by

                        @serioza What do you mean deleting the symbol definition and retyping it? I know this is an old topic but can you explain more or provide a screenshot ? Thank you!!

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

                          For those who still have the issue - there is something I realized: As this app runs in the cloud, sometime there might be hickups... like the connection is not stable enough and so on... this could lead to issues whilst the creation of some blocks. I had the same zero-divide issue and therefore I re-created the buy and sell blocks, afterwards they worked as supposed. of course the SL cannot be 0, but I was looking for the lowest or highes candle of 10 after an EMA cross, hence I knew that the SL was never 0. It could also have been an issue with the highest/lowest function, that provided maybe a 0 as SL - but this function was also part of the buy / sell block. So again, I deleted them and re-created them, and all of a sudded the EA worked as supposed - no zero-divide anymore. No functionallity was changed... sometimes that happens - was not the first time that it took me hours to find an issues and the last solutions was to re-create the block, just to find that it could have worked just fine. I blame it on the connections losses that appear sometimes and I make mayself aware of the blocks that I was creating during that time. ... maybe that solves your issues as well.

                          1 Reply Last reply Reply Quote 1
                          • L
                            lvang1126 last edited by

                            Alternatively, you could also store the SL value into a variable and have an if condition when SL != 0, then execute orders. This way, SL will always be something other than 0 in order to execute orders.

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

                            Online Users

                            C
                            T
                            S
                            A
                            M
                            R
                            G
                            G
                            Y
                            C
                            S
                            S

                            24
                            Online

                            146.7k
                            Users

                            22.4k
                            Topics

                            122.6k
                            Posts

                            Powered by NodeBB Forums | Contributors