fxDreema

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

    Close position in $ pfoit including trading fees

    Questions & Answers
    2
    10
    1394
    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.
    • P
      PipTheRipper last edited by

      Hi guys,
      I am trying to make an EA close all positions when a certain money amount is reached. I want to include trading fees (swap and commissions) in the calculation. I cant get my head around why the EA does not close positions when the variable called "As_Money_Sum" (profit+fees) is above the money amount. Can anyone see what I am doing wrong?

      https://fxdreema.com/shared/rXEuVLJhe

      OntradingX 1 Reply Last reply Reply Quote 1
      • OntradingX
        OntradingX @PipTheRipper last edited by

        @piptheripper
        https://fxdreema.com/forum/topic/13977/closing-an-order-always-with-a-positive-value/10
        Hello friend, this is something old, I've been trying to get clear answers about it but I can't, I saw that there are other similar posts, I'm starting to believe that there isn't a solution and that the block isn't doing the correct calculation.

        Sou do Brasil e utilizo o sistema Fxdreema a alguns anos, sempre que tenho tempo disponível eu tento ajudar alguém por aqui, mas se quiser uma ajuda mais próxima me contacte:
        Site: https://www.ontradingx.com.br
        Youtube: https://www.youtube.com/@ontradingx
        Boa sorte a todos nós!

        English - I'm from Brazil and I've been using the Fxdreema system for a few years, whenever I have time available I try to help someone here, but if you want more help, contact me:
        Website: https://www.ontradingx.com.br
        Youtube: https://www.youtube.com/@ontradingx
        Good luck to all of us!

        OntradingX P 2 Replies Last reply Reply Quote 0
        • OntradingX
          OntradingX @OntradingX last edited by

          @ontradingx 0_1640606363276_Closeprofitableposition.png
          Try to use this.
          " Block Close Profitable Position"
          It's been working for me.

          Sou do Brasil e utilizo o sistema Fxdreema a alguns anos, sempre que tenho tempo disponível eu tento ajudar alguém por aqui, mas se quiser uma ajuda mais próxima me contacte:
          Site: https://www.ontradingx.com.br
          Youtube: https://www.youtube.com/@ontradingx
          Boa sorte a todos nós!

          English - I'm from Brazil and I've been using the Fxdreema system for a few years, whenever I have time available I try to help someone here, but if you want more help, contact me:
          Website: https://www.ontradingx.com.br
          Youtube: https://www.youtube.com/@ontradingx
          Good luck to all of us!

          P 1 Reply Last reply Reply Quote 0
          • P
            PipTheRipper @OntradingX last edited by

            @ontradingx Thanks for your inputs. That block will not work for my project, as I will close a basket of trades with a total sum profit, but not all of the positions will be in profit. It is a martingale type system..

            1 Reply Last reply Reply Quote 0
            • P
              PipTheRipper @OntradingX last edited by

              @ontradingx I will post the solution here once I find it:)

              OntradingX 1 Reply Last reply Reply Quote 0
              • OntradingX
                OntradingX @PipTheRipper last edited by

                @piptheripper great my friend, thanks i will wait this solution by @fxdreema

                Sou do Brasil e utilizo o sistema Fxdreema a alguns anos, sempre que tenho tempo disponível eu tento ajudar alguém por aqui, mas se quiser uma ajuda mais próxima me contacte:
                Site: https://www.ontradingx.com.br
                Youtube: https://www.youtube.com/@ontradingx
                Boa sorte a todos nós!

                English - I'm from Brazil and I've been using the Fxdreema system for a few years, whenever I have time available I try to help someone here, but if you want more help, contact me:
                Website: https://www.ontradingx.com.br
                Youtube: https://www.youtube.com/@ontradingx
                Good luck to all of us!

                P 1 Reply Last reply Reply Quote 0
                • P
                  PipTheRipper @OntradingX last edited by

                  @ontradingx Here is a solution that works: https://fxdreema.com/shared/3Ltd8y7jc

                  Pay attention that some brokers charges half the commission when you enter a deal and the second half when you exit a deal. Most brokers charges half in and half out.

                  There are inputs where the user has to manually insert the commission his/her broker charges and how they are charged

                  Let me know if you have any questions.

                  P OntradingX 2 Replies Last reply Reply Quote 0
                  • P
                    PipTheRipper @PipTheRipper last edited by

                    @piptheripper Noticed an error. I forgot to set the divider to 2 if half commission is payed when opening and second half is payed when closing.. Just change it from 1 to 2

                    1 Reply Last reply Reply Quote 0
                    • OntradingX
                      OntradingX @PipTheRipper last edited by

                      @piptheripper
                      Nice work friend, I'm going to test on my EA that it needs rate calculation to close positive or negative orders and return an answer.
                      Thank you for sharing.

                      Sou do Brasil e utilizo o sistema Fxdreema a alguns anos, sempre que tenho tempo disponível eu tento ajudar alguém por aqui, mas se quiser uma ajuda mais próxima me contacte:
                      Site: https://www.ontradingx.com.br
                      Youtube: https://www.youtube.com/@ontradingx
                      Boa sorte a todos nós!

                      English - I'm from Brazil and I've been using the Fxdreema system for a few years, whenever I have time available I try to help someone here, but if you want more help, contact me:
                      Website: https://www.ontradingx.com.br
                      Youtube: https://www.youtube.com/@ontradingx
                      Good luck to all of us!

                      1 Reply Last reply Reply Quote 0
                      • P
                        PipTheRipper last edited by

                        You are welcome. Pay attention that this only calculates commissions and not swap fees..

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

                        Online Users

                        M
                        T
                        E
                        A
                        P
                        V
                        R
                        M
                        G

                        21
                        Online

                        146.6k
                        Users

                        22.4k
                        Topics

                        122.6k
                        Posts

                        Powered by NodeBB Forums | Contributors