fxDreema

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

    I have fixed volume for all trades and want to close equal trades from buy and sell

    Questions & Answers
    2
    16
    1423
    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.
    • khalids222
      khalids222 last edited by

      I have fixed volume for all trades and want to close equal trades from buy and sell
      Example :
      BUY = -70
      SELL =+20
      BUY= -20
      SELL =+10
      BUY= +15
      SELL=-5
      Here is the final total =
      BUY= -75
      SELL= +25
      Here I want to close the same amount of buying and selling, which is +25 .
      So that the buy = -50
      Sell = 0
      How can I do that, please?

      khalids222 1 Reply Last reply Reply Quote 0
      • khalids222
        khalids222 @khalids222 last edited by

        @roar I apologize, but we do not dispense with your advice and opinion. You are such a creative person, and this makes us follow you intently in all of your responses.
        So please guide me
        I've tried to create a method when there are multiple buy and sell
        I collect buy and sell positions after half an hour, for example:
        buy= -75 and sell = +25
        Here I want to close the same amount of buying and selling, which is +25 .
        So that the buy = -50
        Sell = 0
        How can I do that, please?
        can see my project please
        https://fxdreema.com/shared/lbEHYheYc

        roar 1 Reply Last reply Reply Quote 0
        • roar
          roar @khalids222 last edited by

          @khalids222 oh, I'm flattered lol

          Here's what I came up with, let me know if it works for you:
          https://fxdreema.com/shared/qX2t8ZYYd

          Need small help? Tag me in your post
          Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

          khalids222 1 Reply Last reply Reply Quote 0
          • khalids222
            khalids222 @roar last edited by

            @roar said in I have fixed volume for all trades and want to close equal trades from buy and sell:

            Here's what I came up with, let me know if it works for you:

            @roar Thank you very much you deserve more, it works right after every sell or buy and that won't let the price move.
            I want to start half an hour after buying and selling or after one hour .

            roar khalids222 2 Replies Last reply Reply Quote 0
            • roar
              roar @khalids222 last edited by

              @khalids222 we can add an age filter before the netting system:
              https://fxdreema.com/shared/gKzcKNdwb
              0_1598424058128_379fcb3c-98f6-4c4a-b43e-56aa20eeadef-image.png

              Need small help? Tag me in your post
              Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

              khalids222 1 Reply Last reply Reply Quote 0
              • khalids222
                khalids222 @khalids222 last edited by

                @roar Here, as you can see, the expert advisor works to close equal open trades from the beginning, and this will make him bankrupt the account within only a time.
                Because it does not wait until there are many deals .
                I want it when closing deals does not affect the balance as it is equal, for example, profit 100 loss 100 close it.
                or profit 100 loss 300 close 100.
                Usually when these operations exist, the level of loss will be greater than profit, and if you open a position on each bar, there will be a large number of deals.
                So, for example, I want to set a time, such as after an hour or four hours, that the calculation process begins to close equal deals only, so that the balance does not affect anything by closing them.

                roar 1 Reply Last reply Reply Quote 0
                • roar
                  roar @khalids222 last edited by

                  @khalids222 ok, so I made the netting for lot amount but you need netting for profit amount. Let me think of something.. .

                  Need small help? Tag me in your post
                  Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

                  1 Reply Last reply Reply Quote 0
                  • khalids222
                    khalids222 @roar last edited by

                    @roar 0_1598425585799_666.jpg

                    You also see at closing, buying and selling is not equal in amount, only by volume.
                    And as you can see above, the balance decreases with every closing

                    roar 1 Reply Last reply Reply Quote 0
                    • roar
                      roar @khalids222 last edited by roar

                      @khalids222 ok, this is actually pretty hard a problem. To pair wins and losses together, you must only partially close the bigger trade. Mql4 doesnt really support partial closing, it just closes the whole trade and then creates another trade with smaller volume. Because of this, you will always see your balance change.
                      https://fxdreema.com/shared/nSulvMHEd

                      Need small help? Tag me in your post
                      Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

                      khalids222 1 Reply Last reply Reply Quote 0
                      • khalids222
                        khalids222 @roar last edited by

                        @roar Thank you, I appreciate your efforts and creativity. I will try it now
                        But I have a question, how can I know the value of the lot in some way? As an amount or points, not a number?

                        roar 2 Replies Last reply Reply Quote 0
                        • roar
                          roar @khalids222 last edited by

                          @khalids222 alternatively we could just wait for the trades to line up, so that win = loss +/- 2%:
                          https://fxdreema.com/shared/DWK422a2d

                          Need small help? Tag me in your post
                          Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

                          1 Reply Last reply Reply Quote 0
                          • roar
                            roar @khalids222 last edited by

                            @khalids222 said in I have fixed volume for all trades and want to close equal trades from buy and sell:

                            @roar Thank you, I appreciate your efforts and creativity. I will try it now
                            But I have a question, how can I know the value of the lot in some way? As an amount or points, not a number?

                            One lot is $100 000, you can just calculate it

                            Need small help? Tag me in your post
                            Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

                            khalids222 1 Reply Last reply Reply Quote 0
                            • khalids222
                              khalids222 @roar last edited by

                              @roar I mean if I have one lot, it contains a loss of 50 dollars or 50 pips.
                              How can I find out the value of it loss or gain ?

                              roar 1 Reply Last reply Reply Quote 0
                              • roar
                                roar @khalids222 last edited by

                                @khalids222 use a loop block to select the trade and then you can use condition or modify variables to get the profit of that individual trade:
                                0_1598518881350_25fa90fc-28d7-41ff-b023-7b6f87fa5647-image.png

                                Need small help? Tag me in your post
                                Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

                                khalids222 1 Reply Last reply Reply Quote 0
                                • khalids222
                                  khalids222 @roar last edited by

                                  @roar Thank you very much and thank you for your wonderful efforts.

                                  khalids222 1 Reply Last reply Reply Quote 0
                                  • khalids222
                                    khalids222 @khalids222 last edited by

                                    @roar
                                    I tried to take advantage of your method, would you please look at the project?
                                    I do not know why the balance is reduced at every close.
                                    I tried to get away from the last two deals by value R4,R4 TO BUY AND R8,R9 TO SELL .
                                    but at each close the balance is deducted
                                    Possible total profit or LOTS. Not correct. I don’t know. Possible your opinion PLEASE?
                                    https://fxdreema.com/shared/VBYFnuore

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

                                    Online Users

                                    R
                                    A
                                    E

                                    8
                                    Online

                                    146.7k
                                    Users

                                    22.4k
                                    Topics

                                    122.6k
                                    Posts

                                    Powered by NodeBB Forums | Contributors