fxDreema

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

    MT5 tries to open 250 lots position when it shoudn't

    Questions & Answers
    5
    10
    964
    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.
    • A
      akulus last edited by akulus

      Hello,

      I have below scheme.

      The box on the left tries to open 250 lots the box on the right opens normaly (around 0.2 lots).

      Please, what am i doing wrong? It's driving me crazy. Thank you.

      0_1638871384208_fc262bed-f285-4ad3-99bb-0802c3882512-image.png

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

        @akulus Can you please share the link to the project instead? That would be easier to check.

        (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
          akulus @l'andorrà last edited by akulus

          @l-andorrà

          shared project. thank you.

          https://fxdreema.com/shared/4icrQOqqe

          I have a version in MT4 with the same variables and formulas and it opens correctly. It might be something specific to MT5 but I have no idea what.

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

            why would you put math in there? its already a percentage so a calculation is happening to give you a lot size. If you are doing math on top of math, it will probably produce errors. Id advise just using a small number like..1....or a decimal like .1. You may also want to play with % of Balance <> Lots, as well as % of Balance. Very different results

            A 1 Reply Last reply Reply Quote 0
            • A
              akulus @TipsyWisdom last edited by

              @tipsywisdom thank you. I have eliminated the calculation and it stil tries to open 250 lots.

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

                I tried this on EURUSD with 10,000 initial balance and it gives me lots of 0.01 every time. Actually I tried your current version where the calculation is lot_size*0.0001/2. The default value of lot_size is 6 and with that the % is some really small number. Even if you put 100 in the input field, the lot size should be normal.

                The idea of this option is that if you have $1000, the lot size would be 0.01 lots, if you have $10.000 the lot size would be 0.1 lots and of course if you have $100.000 the lot size would be 1.

                So I don't see something wrong in the project... well, you are maybe using the wrong option, because the input value for the option is too small. But what is wrong is that if anything, you should see only lots of 0.01 or whatever the minimum is. I programmed it so if the input value for the lot size is lower than the minimum, the minimum is taken (and the same goes for the maximum value).

                Put some Comment block before of after the Buy block to print what is really the value of lot_size*0.0001/2. It should be 0.0003. Also try to write a value directly - 5, 10, 100, 200.

                If nothing works, what is the symbol you are tesing on? Give us the information about it from the Symbols list.

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

                  @fxdreema thank you for the response.

                  (With % of equity it worked but it’s not exactly what i want.) LE: it may have worked in a version for mt4, i don’t remember very well.

                  The simbol is SPX500 on mt5, icmarkets.

                  I am testing it on a small real account of 200 EUR.

                  The other order at 14.00 hours is opened correctly.

                  This is the message in the journal:

                  0_1638966526936_CC561C77-ABCD-40CE-B48E-50022E95A535.jpeg

                  That 0.1 trade is opened manualy

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

                    Is this 250 attempt really made by this EA? Maybe there is another one working in the background?

                    The Equity is even lower number than the Balance, but not very different after all. I really don't know what is the problem. But just in case, place some block to print the value, maybe Alert message.

                    1 Reply Last reply Reply Quote 0
                    • bk7
                      bk7 @akulus last edited by

                      @akulus said in MT5 tries to open 250 lots position when it shoudn't:

                      SPX500

                      are you trading indices on icmarkets?
                      If yes i would suggest you to make the lot/trade size calculation by your own ( in seperate step by a formula) on fx pairs you shouldnt see such issues.

                      A 1 Reply Last reply Reply Quote 0
                      • A
                        akulus @bk7 last edited by

                        @bk7 @fxDreema

                        Thank you bk7 for the suggestion.

                        It seems this workaround works. It just opened 0.2 lots order.

                        For anyone who has the same issue, this worked for me:

                        https://fxdreema.com/shared/UGP9lyamb

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

                        Online Users

                        A
                        Z
                        T
                        B
                        A
                        P

                        14
                        Online

                        146.7k
                        Users

                        22.4k
                        Topics

                        122.6k
                        Posts

                        Powered by NodeBB Forums | Contributors