fxDreema

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

    How can I find the average opening price for the last two positions?

    Questions & Answers
    6
    44
    6374
    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 find the average opening price for the last two positions?
      If there are five positions .
      i used BUCKET FOR TRADES but it is give me average to all opening price buy or sell - i need average opening price for te last /newest two only

      l'andorrà jstap 2 Replies Last reply Reply Quote 0
      • l'andorrà
        l'andorrà @khalids222 last edited by

        @khalids222 Well, you will need two variables for sure. One for each trade. Do you need both of them be closed? No open trade is necessary for the calculation?

        (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

        (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

        (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

        khalids222 1 Reply Last reply Reply Quote 0
        • khalids222
          khalids222 @l'andorrà last edited by

          @l-andorrà yes i need to close . You can explain

          l'andorrà 1 Reply Last reply Reply Quote 0
          • l'andorrà
            l'andorrà @khalids222 last edited by

            @khalids222 This is more difficult than I expected. Satoring the last one is very easy but finding the second one is much harder. I guess a loop is required that stops at the second one, but I can't see how to do it right now.

            (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

            (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

            (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

            khalids222 1 Reply Last reply Reply Quote 0
            • khalids222
              khalids222 @l'andorrà last edited by

              @l-andorrà thank you very much

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

                @khalids222 I think this link will show you how to achieve what you would like:link text
                I haven't tested but I hope this helps.

                Learn fxDreema Without the Wait!

                My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                Don’t miss out

                Click here➡️ https://mybook.to/fxDreema to get your copy today!

                Enjoy! 😊

                bk7 1 Reply Last reply Reply Quote 0
                • bk7
                  bk7 @jstap last edited by

                  @jstap

                  or a loop of last 2 trades, sum the 2 prices and divide by 2

                  would be a quick solution, that works

                  jstap 1 Reply Last reply Reply Quote 0
                  • jstap
                    jstap @bk7 last edited by

                    @bk7 Then show as a solution.

                    Learn fxDreema Without the Wait!

                    My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                    The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                    Don’t miss out

                    Click here➡️ https://mybook.to/fxDreema to get your copy today!

                    Enjoy! 😊

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

                      @jstap @bk7
                      First of all, I would like to thank you for your efforts and response, and I want to share part of the project with you to understand what is required more clearly. this link

                      https://fxdreema.com/shared/HKa3gDAtd

                      Every time the price goes back ten pips down, a buy position will be opened.
                      And when the price goes up ten points, the last two deals will be closed, their sum is positive
                      In this case, every time the price goes down 10 pips, how do I close the last trade and the one before it? In the event that the ten points variable moves? I need to know the average of the last two trades to close them together

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

                        @khalids222 Hello, I have had a look at your project I have taken a picture of a few changed bits, although I haven't tested I think should work.

                        I have put the reset variable under on trade, as long as result is used before a new trade is closed it will work fine, as a general rule keeping pink blocks separate seems to work better.0_1627512097638_Screenshot (488).png

                        I have moved the other blocks as they don't need to be in between pink, I removed the pink check profit because the pips away is already doing this.0_1627512342466_Screenshot (489).png

                        Let me know how this works.

                        Learn fxDreema Without the Wait!

                        My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                        The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                        Don’t miss out

                        Click here➡️ https://mybook.to/fxDreema to get your copy today!

                        Enjoy! 😊

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

                          @jstap said in How can I find the average opening price for the last two positions?:

                          Hello, I have had a look at your project I have taken a picture of a few changed bits, although I haven't tested I think should work.
                          I have put the reset variable under on trade, as long as result is used before a new trade is closed it will work fine, as a general rule keeping pink blocks separate seems to work better.

                          I appreciate your reply, thanks a lot but it didn't work
                          Didn't close the last two deals only the last

                          0_1627515171675_bb15388b-26c1-4fd2-ab67-01badbd35274-image.png

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

                            @khalids222 Change the pink close for blue, everything should then work.

                            Learn fxDreema Without the Wait!

                            My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                            The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                            Don’t miss out

                            Click here➡️ https://mybook.to/fxDreema to get your copy today!

                            Enjoy! 😊

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

                              @jstap
                              In this case, all deals will be closed, not just the last two &This is not required
                              0_1627516540952_a8a330f8-eea6-4c1f-8166-d1b351bd6598-image.png

                              jstap L 3 Replies Last reply Reply Quote 0
                              • jstap
                                jstap @khalids222 last edited by

                                @khalids222 In this case this is where things start to get complicated. In most blocks you can set a group number, if for example you set a trade as 1 you can then set the close block to only close group 1. There may be another way of doing this but I don't know it.

                                Learn fxDreema Without the Wait!

                                My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                                The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                                Don’t miss out

                                Click here➡️ https://mybook.to/fxDreema to get your copy today!

                                Enjoy! 😊

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

                                  @jstap Overall, thank you very much, I will try

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

                                    @khalids222 hello my dear friend, can you please share your project link. I am trying to understand

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

                                      @ladydolares ohhhh sorry i see it now 🙂

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

                                        @khalids222 So while sleeping the correct answer came to me, as you'll see in this picture just change the number of trades to check from1 to 2 and put the pink block back. Hope this helps.0_1627553347166_Screenshot (490).png

                                        Learn fxDreema Without the Wait!

                                        My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                                        The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                                        Don’t miss out

                                        Click here➡️ https://mybook.to/fxDreema to get your copy today!

                                        Enjoy! 😊

                                        L TipsyWisdom khalids222 3 Replies Last reply Reply Quote 1
                                        • L
                                          LadyDolares @jstap last edited by

                                          @jstap consistently opened buy trade in test 😞

                                          jstap 1 Reply Last reply Reply Quote 0
                                          • jstap
                                            jstap @LadyDolares last edited by

                                            @ladydolares If you post your link in a new question, can send directly to me if you want and ill have a look.

                                            Learn fxDreema Without the Wait!

                                            My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                                            The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                                            Don’t miss out

                                            Click here➡️ https://mybook.to/fxDreema to get your copy today!

                                            Enjoy! 😊

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

                                            Online Users

                                            S
                                            N
                                            S
                                            E
                                            H
                                            E
                                            S
                                            A
                                            T

                                            18
                                            Online

                                            146.7k
                                            Users

                                            22.4k
                                            Topics

                                            122.6k
                                            Posts

                                            Powered by NodeBB Forums | Contributors