fxDreema

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

    Endless buy and sells in a row

    Questions & Answers
    3
    17
    620
    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.
    • D
      Dratoran last edited by

      Hello,
      for training purpose I wanted to make a small EA, which uses the Stochastic Oscillator. The plan is to buy, when there is a crossup below 20 (with TP/SL) and to sell immediately should the main line reach 80.

      My problem is, that there are phases in which the EA buys and sells several times in a row and I don't understand why. Here is a link to the project https://fxdreema.com/shared/e408T8Mie

      Unbenannt.png

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

        Block 3 should specify sell positions only and not buys too.

        (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.

        1 Reply Last reply Reply Quote 0
        • D
          Dratoran last edited by

          Thanks for your answer. Can you explain to me why this has to be the case? Until now I thought Buy positions were the important ones for that block, because it checks if I have bought a position or have an order to buy one and sells it, if the following conditions are true. Why does it need to be sell instead?

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

            Because you are telling the bot that all condition on the right branch can be applied to open buys and sells on equal terms. What is the point of that? Then remove the buys branch on the left. Why two different sets of conditions are necessary to open a buy while only one set of conditions is applied to open a sell?

            (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.

            1 Reply Last reply Reply Quote 0
            • D
              Dratoran last edited by Dratoran

              The left branch is supposed to open a buy and the right is supposed to open a sell. You are right, that block 3 doesn't need to include buy AND sell as a filter, but I still don't understand why it should check for sells. The right branch is supposed to open a sell at the end, so why should it check for a sell at the beginning? Wouldn't it make more sense to check for a buy (e.g. if I'm currently holding a stock or something like this) which can be sold?

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

                What seems to be wrong to me is, once a trade is places on the left, right is free to constantly place trades, so as soon as the condition is true a trade is placed on every bar.

                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
                • D
                  Dratoran last edited by Dratoran

                  Shouldn't block 3 stop this (if the filter is set to buy)? My understanding was something like this:

                  Block 3 checks, if I hold something (e.g. a stock) -> If that is true, the next block checks a second condition -> If that is also true, my held position is sold (e.g. the stock) -> Block 3 isn't true anymore (I'm not holding a position), therefore the right branch stays inactive.

                  I mean yes, it obviously doesn't work that way, when I test it, but I don't see the mistake. Why is the right branch free to endlessly place trades?

                  BTW: In testing Block 3 with buy filter causes the same problem. Block 3 with sell filter doesn't do anything, which defeats the purpose.

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

                    No because that is switching the right side on if the left has placed a trade, do this set the left side to buys, on the right if buy - no sell - rest of your blocks. setting this up with the extra block should make it 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! 😊

                    1 Reply Last reply Reply Quote 0
                    • D
                      Dratoran last edited by Dratoran

                      You mean like this? https://fxdreema.com/shared/FSjLy415c
                      Testing it has the same loop of buy and sell like before.

                      @jstap said:

                      No because that is switching the right side on if the left has placed a trade

                      I'm not sure, what you mean. I want the right branch to switch on, when the left has placed a trade, so the position will be sold at the right time. Since both sides check the same indicator and both sides are mutually exclusive (left <20 and right >80), I don't understand why the rebuy from the starting image happens.

                      D 1 Reply Last reply Reply Quote 0
                      • D
                        Dratoran @Dratoran last edited by

                        If I remove the SL/TP of the sell block, there are no rebuys. Instead several sells in a row will be opened and yet the single position I currently hold won't be sold.

                        After seeing this, I think I somehow misunderstood the function of sell blocks. Do they not pay attention to the currently held positions? Unbenannt2.png

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

                          You need to add the latest shared link to see what's been done and say what the problem is.

                          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
                          • D
                            Dratoran last edited by Dratoran

                            1. This project implements your idea from your second to last post: A check that there is a buy position and no sell position. - https://fxdreema.com/shared/sNhTNLzGb
                              This still results in an endless buy and sell like in the first picture.

                            2. When I remove the SL/TP from the sell block and use the setup like before (without checking, if there is already a sell) ( https://fxdreema.com/shared/uAvpxz06 ) I get an endless sell like in my last picture.

                            3. When I remove the SL/TP from the sell block and use a check that there is a buy position and no sell position, I get a single sell (which is good), but it doesn't actually sell my currently held buy position. I creates a parallel sell position. ( https://fxdreema.com/shared/2698Veegd )

                            My problems / questions are:

                            • Why creates a SL/TP in the Sell block an endless buy and sell as seen in the first setup / example?
                            • Why won't my position be sold in the third setup / example? I don't even understand, what the sell position actually does, when it doesn't seem to care, if I actually have something (e.g. a stock) which can be sold.
                            1 Reply Last reply Reply Quote 0
                            • jstap
                              jstap last edited by

                              Probably because you are using % of TP and % of SL without either being a fixed number.

                              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
                              • D
                                Dratoran last edited by

                                Could you explain this a litte more in detail? Is this an answer to both questions and why does a percentage have that effect?

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

                                  Test by setting both take and stop to a fixed value. When building EAs use a process of elimination, then you will find what is causing the trouble.

                                  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
                                  • D
                                    Dratoran last edited by

                                    I was hoping to understand the inner logic of whats happening instead of just testing around until i get a working version.

                                    In another thread you told me sell sells and buy buys, but there are obviously a few more nuances. If i want to use the sell block most effectively I would like to know as much as possible about its inner workings.

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

                                      There is lots of information on this on the internet, to learn by testing will teach you the why, or at least limit the question to 1 area of understanding. All the logic in FX blocks comes from meta trader's design, what each block does is enact one of these commands.

                                      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 / 1
                                      • First post
                                        Last post

                                      Online Users

                                      S
                                      D
                                      V
                                      O

                                      15
                                      Online

                                      146.7k
                                      Users

                                      22.4k
                                      Topics

                                      122.6k
                                      Posts

                                      Powered by NodeBB Forums | Contributors