fxDreema

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

    The best way to close

    Questions & Answers
    2
    15
    1770
    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

      Leave the conditions for opening deals aside, every time a deal is opened, I want to check a certain condition:
      Closing deals is at the last closed buy trade, it must close a sell trade,
      Sometimes there are ten winning buy trades and one winning sell trade, when the buy side is going to close, I want to close only one and not ten.
      https://fxdreema.com/shared/pjo5mlj5b

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

        @khalids222 Hello,

        I'm not sure I totally understand what you need but if all you need is to close 1 of the trades regardless of which one, try one of the following blocks:

        1. close least profitable trade
        2. close most profitable trade
        khalids222 1 Reply Last reply Reply Quote 0
        • khalids222
          khalids222 @q8carpenter last edited by

          @q8carpenter said in The best way to close:

          I'm not sure I totally understand what you need but if all you need is to close 1 of the trades regardless of which one, try one of the following blocks:

          close least profitable trade
          close most profitable trade
          Thank you for your response.
          I want to close one trade at a time so that it is buy, sell, buy and sell in the same order
          I don't want to close just one

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

            @khalids222

            So in your case, if 10 buys and 1 sell are in profit, the EA once per bar should close trades in this order?
            buy
            sell
            buy
            buy
            buy
            buy
            buy
            buy
            buy
            buy
            buy

            which will take 10 bars to close them all?

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

              @q8carpenter I want close old buy then sell if profit, if sell not profit not close any buy

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

                @khalids222 so you mean that when the sell is in profit, you close the buy and a sell?

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

                  @q8carpenter yes

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

                    @q8carpenter In order for the picture to be clear, each time a buy will be closed, then a sell will be closed, then a buy will be closed and then a sell will be closed in the same order
                    During these closings, one direction will have more than one winning trade and the other will not have any winning trade, in this case, I want to wait until the other party wins one trade and it is closed.
                    Let me make the explanation easier: When I choose to close by profitable trades and i put profit more 5 pips . All trades that have won more than five points will be closed
                    i want close only one trades

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

                      @khalids222

                      Sorry but I still may not have understood what is required correctly. Have a look at the screenshot. Wouldn't something like this work?

                      0_1622834828607_close 5 pips.png

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

                        @q8carpenter Well let me explain:
                        I am here looking for the last close, if it was a sell, for example, close the buy when it gains five points.
                        The problem here, when there are five buy trades all are winning and all are more than five pips, it will close them all, I want to close only one of them
                        example:
                        1- buy profit 5 pips - i want close this or any trade from buy
                        2- buy profit 10 pips not close
                        3- buy profit 15 pips not close
                        4- buy profit 20 pips not close
                        5- sell profit 5 pips i want close this
                        6- buy profit 25 pips ( i want close any trade from buy )
                        7 buy profit 30 pips not close
                        9- sell profit 5 pips i want close this

                        As you can see, there are several profitable buying deals and there is no profitable selling deal, I want every time a buy deal is closed (only one deal) to close the sell deal if it is profitable, if there is no profitable sell, do not close the buy until the sale is closed

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

                          @khalids222
                          If you see the last example i sent, the blocks i used will close only 1 trade.

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

                            @q8carpenter Unfortunately, these blocks are not.
                            I want a block that closes only one deal in each opening process, so that closing the same direction is not repeated.
                            My main problem is closing only one of several similar deals
                            It can be more than a deal less than five pips will close it all.
                            I mean, if we have five buy deals, all of which are greater than five points, it will close them all at once when choosing (trades more than five points). I want to close only one of these five only

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

                              @khalids222
                              Actually the blocks I sent will close 1 trade. but the way you have it set up, it will mean that it will close one trade alternating between buys and sells but close a trade once per bar. because it will close the most profitable trade only which is 1, and since you start your chain with a (once per bar) block then only 1 trade can be closed per pass

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

                                @q8carpenter ok thank you so much .

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

                                  @khalids222 you're welcome. I hope things work out for you 🙂

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

                                  Online Users

                                  A
                                  E

                                  10
                                  Online

                                  146.7k
                                  Users

                                  22.4k
                                  Topics

                                  122.6k
                                  Posts

                                  Powered by NodeBB Forums | Contributors