fxDreema

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

    How can I collect the latest open positions in the event of a trend change?

    Questions & Answers
    2
    29
    3322
    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

      How can I collect the latest open positions in the event of a trend change?
      In this example every time a trend changes, there are several intersections.
        Some crosses have three purchase orders, while others cross one.
      The problem here at the end of the trend is the trend buying and there are six buy and eight sell.
      The trend will be at a loss.
      I want every time an intersection occurs and there is a buy or sell, the number of open positions is collected and only one is increased in the current direction
      0_1577912072361_EXAMPLE.jpg
      n this example, in each intersection, only one is increased, regardless of the number of short positions when buying, and vice versa

      https://fxdreema.com/shared/jJthvY2Rd

      T 1 Reply Last reply Reply Quote 0
      • T
        trader.philipps @khalids222 last edited by

        @khalids222 Very hard to get your problem. Do you want a seperate sequence per buys and sells?
        Like Buy 0.10, 0.20, ...
        Sell 0.10, 0.20, ... ??

        I like to share my knowledge, but expect the others to contribute as well.

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

          No, I did not mean that, what I specifically want, when placing One per bar under the condition every time it occurs in the condition it will buy or sell, and here there may be three sale and one purchase or vice versa .
          Suppose an example
          1- sell 0.10 then 0.20 then 0.30
          Three sell- occurred in this direction, after which the trend changed and became buy and one long position was opened
          2- buy 0.40
          So the total becomes sell =0.60 and buy = 0.40
          In this case, even if the direction is correct, there will be a loss.
          I want before opening the buy in this example.
            It collects open total sales and only adds one buy to become 0.70 and sell 0.60
          This is what I mean.

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

            @trader-philipps I MEAN THIS
            0_1577964033284_EXAMPLE444.jpg

            T 1 Reply Last reply Reply Quote 0
            • T
              trader.philipps @khalids222 last edited by

              @khalids222 I haven't tested it, but I'd do the following on the onTrade tab (regular use not after EA restart):

              0_1577981569035_a92aae36-041c-4e10-b052-a65f52cd6681-image.png

              Have 2 variables and loop through all Buy and Sell trades and increase thevariable value by the lot size of the trade in the loop.
              Once you have stored them, you may use the sell variable value + your increment (eg. 0.01) for buy trades and vice versa.

              If you restart your terminal you may need to let the calculation run as well somewhere if there are already open positions.

              I like to share my knowledge, but expect the others to contribute as well.

              khalids222 4 Replies Last reply Reply Quote 0
              • khalids222
                khalids222 @trader.philipps last edited by

                @trader-philipps
                Please put it on the project directly, I couldn't .

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

                  @trader-philipps WHAT IS THE VALUE CALCULATE TOTAL LOT SIZE ? PLEASE

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

                    @trader-philipps there any update please

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

                      @trader-philipps Unfortunately, it did not work.

                      T 1 Reply Last reply Reply Quote 0
                      • T
                        trader.philipps @khalids222 last edited by trader.philipps

                        @khalids222 Can you share your project, please? I don't have an example around as martingale/averaging style is not what I usually build.

                        I like to share my knowledge, but expect the others to contribute as well.

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

                          @trader-philipps https://fxdreema.com/shared/nCNq7zDJd

                          T 1 Reply Last reply Reply Quote 0
                          • T
                            trader.philipps @khalids222 last edited by

                            @khalids222 Be more careful when creating your projects! Sample would have worked if you'd do what I did and write variables without spaces. Keep in mind that peopke help here voluntarily!

                            https://fxdreema.com/shared/zQEk0b8yd

                            I like to share my knowledge, but expect the others to contribute as well.

                            khalids222 2 Replies Last reply Reply Quote 0
                            • khalids222
                              khalids222 @trader.philipps last edited by

                              @trader-philipps Sure, I thank you for your efforts and appreciate your help.
                              I will try it

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

                                @trader-philipps
                                With great regret, the same as the previous nothing has changed
                                0_1578173283094_EXAMPLE3.jpg

                                T 1 Reply Last reply Reply Quote 0
                                • T
                                  trader.philipps @khalids222 last edited by

                                  @khalids222 Check this. It's closer but probably still not what you want.

                                  0_1578175676774_CONSULTNANT FX.mq4

                                  What happens if there are several sells and several buys?

                                  0_1578175836800_0069222a-3b39-43b3-969d-2ba93ce2c5df-image.png

                                  This sequence is

                                  Sell
                                  Buy
                                  Buy
                                  Sell
                                  Sell
                                  Buy
                                  Sell

                                  Which lot size each step should have?

                                  I like to share my knowledge, but expect the others to contribute as well.

                                  khalids222 2 Replies Last reply Reply Quote 0
                                  • khalids222
                                    khalids222 @trader.philipps last edited by

                                    @trader-philipps STANDARD LOT 0.01 I BUT 0.1 FOR TEST ONLY.

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

                                      @trader-philipps said in How can I collect the latest open positions in the event of a trend change?:

                                      Check this. It's closer but probably still not what you want.
                                      What happens if there are several sells and several buys?
                                      I PUTED ONE PER BAR BELOW CONDITION NOT ABOVE

                                      T 1 Reply Last reply Reply Quote 0
                                      • T
                                        trader.philipps @khalids222 last edited by trader.philipps

                                        @khalids222 Could you please answer my question with concrete values? Otherwise I'm out of this thread!

                                        I like to share my knowledge, but expect the others to contribute as well.

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

                                          @trader-philipps the value 0.01 .

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

                                            @trader-philipps
                                            First: I apologize for any behavior that has bothered you.
                                            You and several people @roar @l-andorrà @ambrogio @ in this forum we follow with interest and learn from them.
                                            In addition, your fingerprints are very impressive.
                                            So we benefit from your experiences and opinions.
                                              Second: I add a lot of modifications to the project every time.
                                            In this project I want lot 0.01.
                                            I appreciate your help and time

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

                                            Online Users

                                            E
                                            H

                                            9
                                            Online

                                            146.7k
                                            Users

                                            22.4k
                                            Topics

                                            122.6k
                                            Posts

                                            Powered by NodeBB Forums | Contributors