fxDreema

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

    "As money plus swap and commission" block not working fine.

    Bug Reports
    2
    13
    1885
    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.
    • F
      fabiobioware last edited by

      Project for tests : https://fxdreema.com/shared/OyxArLenb

      I found something that I believe is a Bug (problem).
      There is a condition called:
      (in loop) Trader / Order in Loop that when selected the "profit" field enables a choice of options and the one chosen in my case was "As money plus swap and commission"

      When I use this condition logically, I place a block above it called "For Each Position".

      My target value as a test I used 2 $, and I connected a closed block then ordering to close all open trades when my profit is 2 $.

      What I thought is that if I configured it this way in the project, then when the value of "gain + swap + commission" when reaching the value of 2 $ would close the negotiations exactly at this value or higher giving me the profit on the operation . But what is happening is that he is not doing this, he is closing some with a profit of 2 $ or more and others even negative so I assume this is a calculation problem in the block.
      Please check this ?

      F 2 Replies Last reply Reply Quote 0
      • F
        fabiobioware @fabiobioware last edited by

        @fabiobioware @FXDREEMA-0

        1 Reply Last reply Reply Quote 0
        • F
          fabiobioware @fabiobioware last edited by

          @fabiobioware please help @FXDREEMA

          M 1 Reply Last reply Reply Quote 0
          • M
            miki @fabiobioware last edited by

            @fabiobioware it work right

            0_1614594720193_Immagine.png

            F 1 Reply Last reply Reply Quote 0
            • F
              fabiobioware @miki last edited by

              @miki I didn't understand what you meant ...
              You are showing a metatrader screen and not a calculation being done by the block.
              What I am trying to say is that the calculation that this block should do is not correct.

              F 1 Reply Last reply Reply Quote 0
              • F
                fabiobioware @fabiobioware last edited by

                @miki Put it to monitor on a variable and you'll know what I'm talking about.

                M 1 Reply Last reply Reply Quote 0
                • M
                  miki @fabiobioware last edited by

                  @fabiobioware the calculation is correct the swap and the commissions are negative numbers that it adds to get the 2 of profit. For what you want you have to calculate them individually and add them as positive numbers.

                  F 1 Reply Last reply Reply Quote 0
                  • F
                    fabiobioware @miki last edited by

                    @miki said in "As money plus swap and commission" block not working fine.:

                    the calculation is correct the swap and the commissions are negative numbers that it adds to get the 2 of profit. For what you want you have to calculate them individually and add them as positive numbers

                    2_1614596812165_swapprofitok.PNG 1_1614596812163_swapprofitnotok.PNG 0_1614596812162_swapprofitnotok2.PNG

                    I put a comparison on this project using the "Bucket of positions"
                    In the first image when there is only 1 single trade, the values are the same for both "For each Position" and "Bucket of Position"
                    When I have more than one open trade the calculation is totally different.
                    See the last image I sent:

                    The Bucket of Positions block is showing the sum value of only Profit including the sum of the Swap of all transactions in his account by recording the total win amount of ($ 107.38). This calculation is correct.

                    The "As money plus swap and commission" is showing a wrong amount. ($ 59.38), but it should show the value that Bucket Of Positions is showing. Or am I wrong?

                    F 1 Reply Last reply Reply Quote 0
                    • F
                      fabiobioware @fabiobioware last edited by

                      @fabiobioware 0_1614597654264_swapprofitnotok3.PNG

                      @miki Take another look at this example: now a negative swap value and a negative order are appearing.

                      Follow the project. https://fxdreema.com/shared/LOdfqtsCc

                      M 1 Reply Last reply Reply Quote 0
                      • M
                        miki @fabiobioware last edited by miki

                        @fabiobioware as money shows you only the last position loaded because you don't add the old variable with the new one :
                        As_Money + As_Money and in the end of the loop(yellow exit) As_Money must be reset to 0

                        https://fxdreema.com/shared/uulRnwj5

                        Without swap

                        0_1614602352156_Immagine.png

                        with swap
                        0_1614602553220_Immagine.png

                        The calculation is correct

                        F 1 Reply Last reply Reply Quote 1
                        • F
                          fabiobioware @miki last edited by

                          @miki Thanks for the help my friend.
                          But we can then conclude that the correct function of the block should be to perform the complete calculation of all open orders and this is precisely what he is not doing and for this reason, did you insert a formula for this calculation to be included?
                          In your opinion, is the existing problem confirmed?

                          F 1 Reply Last reply Reply Quote 0
                          • F
                            fabiobioware @fabiobioware last edited by

                            @miki Or can we conclude that to avoid using this block, we can then use "Bucket of positions" that it is working correctly and even performing calculations including swaps and commissions?

                            M 1 Reply Last reply Reply Quote 0
                            • M
                              miki @fabiobioware last edited by

                              @fabiobioware I would say that for convenience in this case it is better to use "Bucket of position". It does the same steps as "For each Position" but they are implicitly contained within

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

                              Online Users

                              V

                              14
                              Online

                              146.7k
                              Users

                              22.4k
                              Topics

                              122.6k
                              Posts

                              Powered by NodeBB Forums | Contributors