fxDreema

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

    Erratic behavior, Breakeven and Trail Stop

    General Discussions
    2
    10
    447
    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.
    • T
      traderline last edited by traderline

      I have set my EA to store the ATR value in PIPS at the time of trade entry, this is correct and works, I have incorporated in the chart the values to be updated and it works. ATRX is the TakeProfit of the first order and (ATRX_BP) in the image data ATR BUY PRINCIPAL is the value for my Breakeven and to initiate the Trail Stop.

      The values are correct and update correctly so far so good.

      8fa72f3e-0782-4ef0-affb-3014e338ff53-image.png

      The strange thing is that when I use the variable ATRX_BP in breakeven and Trail Stop (both) it behaves erratically, sometimes it moves when it should and sometimes not, the strange thing is that the variable values are correct in all the EA works correctly except for the behavior of Breakeven and TrailStop that is erratic. Sometimes it works, sometimes it doesn't

      c987e1ac-52f6-474d-a3d5-527512b446d9-image.png
      Things I have done:

      1- Implemented the variables in MT4
      2- Chart tick by tick with quality data
      3- Connect the trail stop and breakeven blocks to eleven per trade
      4- I used price fraction and pips in the configuration
      5- For each operation I store the variable for later use in Break Even and Trail Stop and it updates correctly to the values in the image I have shown initially. So the data stored in the variable is correct and is maintained.
      6- After eleven per trade I tried with eleven per tick, this one is higher level and is not connected to any other block.

      If someone can "shed light" to understand what the problem could be it would be of great help, I have come this far and it is the only point that fails in this implementation. I don't understand why if the values are correct it doesn't behave as expected. Regardless of what approach you propose I will implement it to get the Breakeven and Trail Stop to working. Thank you very much

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

        Add a shared link so what is happening can be looked at. Attached is how I get the ATR pips, this does work in breakeven/trail blocks, hope this helps.: https://fxdreema.com/shared/7e69K3wjd

        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
        • T
          traderline last edited by traderline

          @jstap In fact it is from you where I understood the concept of ATR to PIPS but my problem is not there, as this is achieved, as you see in the image ATR BUY PRINCIPAL which is the variable ATR_BP is correctly stored and the value is correct, the Take profit of each order is set perfectly in ATR PIPS Base, this makes everything perfect. My thought is: If everything is correct regarding the TP Pips in the image (ATRX) and the values (ATRX_BP) are the same (as shown in the image), why it does not work correctly in BreakEven and TrailStop?

          image.png

          3f1c5e44-7ab6-4378-9014-d726a70a2405-image.png

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

            From the look of your pictures, it looks like it would work, but is hard to tell without a shared link.

            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! 😊

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

              @jstap Yes sorry, I was preparing it, I have reduced it because of the big project. Before the Pass would be the conditions and from there is what you do. Thank you very much. https://fxdreema.com/shared/noGjUsOKb

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

                Without a no trade block it was placing hundreds of trades, I am not sure what is happening with trail, but if you change the trail to a fixed 10 pips, it trails as expected:
                image.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! 😊

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

                  @jstap Yes, in pips it works perfectly I have tested it, but with the current implementation is erratic, the strange thing is that the values are maintained perfectly, but does not apply them that way, the trail sometimes works sometimes not, the breakeven sometimes works and sometimes not, and there is nothing to interfere with it, both breakeven and takeprofit have higher level.

                  I give you an example, in this operation the take profit is perfect based on the ATRX values, the takeprofit always sets it correctly.

                  707dbdfb-eacd-4f47-9ab9-5ea5f5a493e7-image.png

                  The first order closes with TakeProfit, the price moves to BreakEven, but the trail does not move when it should.

                  afc0727b-edc3-4dcf-be79-f7f9c21d2e5b-image.png

                  The strange thing is that sometimes the BreakEven moves correctly and sometimes it does not, and also the Trail Stop moves sometimes and sometimes it does not...

                  I have a version exactly like this one but only with fixed pips, no variables, only fixed pips and it works perfectly.

                  It doesn't make sense, I know, I don't know how I could change the approach, focus it to make this work. I appreciate the time you are giving me.

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

                    I have never used trail by price level, only ever used with pips.

                    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! 😊

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

                      @jstap

                      Finally I got it and it works perfectly, the problem was two areas, apparently the variables have to be set to double not int.

                      The other problem was a detail that I missed, in the conversion NormalizeDouble(ATRX_BP,2) I had not modified ATRX by the correct variable for each module which is ATRX_BP ATRX_BP2 etc... now it seems to work correctly.
                      91e0e31e-b02d-43a0-98ff-7949d1fca295-image.png

                      I have to do more tests but it looks promising.

                      This has allowed me to dive in and understand the potential of variables and changes everything :). Thank you very much for your time.

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

                        Your welcome

                        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

                        F
                        R
                        S
                        D
                        V
                        O

                        12
                        Online

                        146.7k
                        Users

                        22.4k
                        Topics

                        122.6k
                        Posts

                        Powered by NodeBB Forums | Contributors