fxDreema

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

    Position Closed block MT5 not working

    Bug Reports
    5
    10
    1539
    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.
    • T
      Temmy 25 last edited by Temmy 25

      Position Closed block on MT5 not working on OnTrade tab
      Please help.

      https://fxdreema.com/shared/HnZUHvBac

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

        Sadly it is a know bug the admin has not fixed yet. You can fix it temporarily by using a 'For each closed position' block immediately below it.

        (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
        • T
          Temmy 25 last edited by

          Thank you. Using 'For each closed position' worked for the purpose

          1 Reply Last reply Reply Quote 0
          • Monaco
            Monaco Banned last edited by

            I'm glad it worked for you, but you must be careful not to define the groups of operations, so that they are recognized among themselves. My recommendation would be to define the groups and keep them separate. http://fxdreema.com/forum/post/102771Screenshot_56.png

            1 Reply Last reply Reply Quote 0
            • T
              Temmy 25 last edited by

              Thank you @realjoker, I was aware of that, my groups are defined

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

                At this point I'm convinced that even MetaQuoted don't know what they are doing with their Positions/Orders/Deals functions.

                This bug happens in a code that I rewrote months ago. I was very careful to write everything properly, and I believe I did. I also made some tests to ensure that everything is good, and it was.

                Since then, I didn't touch any MQL5 code, so this bug (and possibly other bugs) is introduced after some of the newest MT5 builds.

                I wanted to explain what the problem is and why I think it makes no sense, but I think it's too complicated and maybe no one even cares.

                But in short, now it seems that when we want to use for example this function:

                long  HistoryDealGetDouble( 
                  ulong ticket_number, // Ticket
                  ENUM_DEAL_PROPERTY_DOUBLE property_id  // Property identifier 
                );
                

                ... first we have to use this one to select the deal:

                bool  HistoryDealSelect( 
                  ulong  ticket      // Deal ticket 
                );
                

                ... which is crazy, because why do we have this ticket_number property in HistoryDealGetDouble(), if not to select the deal and get whatever data we need?

                It's probably the same mess with HistoryOrderGet... functions.

                One way for me to fix this is to scan the code I wrote for any usages of HistoryDealGet... and HistoryOrderGet... functions, and put some HistoryDealSelect() and HistoryOrderSelect() functions on top. Then hope to remember in the future that I have to do every time, because it's not intuitive at all.

                And the other way is to write overloads for all HistoryDealGet... and HistoryOrderGet... functions without the ticket_number property. But then if MetaQuotes decide to to the same, there will be errors.

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

                  I did some fixes in many files, I hope it is ok now. If there were similar bugs in other blocks, maybe I fixed them as well.

                  1 Reply Last reply Reply Quote 1
                  • T
                    Temmy 25 last edited by

                    Thank you for your efforts

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

                      Thank you very much for the explanation.

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

                        @fxDreema thanks for the fix.

                        Just a small item that maybe you could tidy up.
                        The problem can be seen in the code screenshot below declaring orderTicket as an 'int' at line 23,205.
                        This generates a "possible loss of data due to type conversion from 'long' to 'int'" compiler warning.
                        As can be seen in the same screenshot below in line 23,213 it is declared as a 'ulong' and that does not generate a warning.
                        If my understanding of the MQL5 documentation is correct it should be at least declared as a 'long'.

                        Thanks in advance and cheers!!

                        image.png

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

                        Online Users

                        D
                        E
                        N
                        N
                        F
                        M
                        A
                        L
                        O

                        26
                        Online

                        146.7k
                        Users

                        22.4k
                        Topics

                        122.6k
                        Posts

                        Powered by NodeBB Forums | Contributors