fxDreema

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

    multiple tp ( tp1-tp2-tp3)

    Questions & Answers
    2
    8
    3724
    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.
    • C
      Charlie66 last edited by Charlie66

      Hi guys how to make a trade with multiple tp 1 - 2 and 3 and move sl to open price when tp 1 hit, move sl to tp1 when Tp 2 hit each tp is 1/3 of the volume
      i cant figure it out tried it all with 3 trades partial close doesnt work what i am doing wrong ?

      https://fxdreema.com/shared/QSNcS321c

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

        @charlie66 That's a good one. I'm thinking of it since some times as well. There is a simple solution and there may be some not so easy ones.
        The general issue is what happens if you close your terminal or change the settings of EA or casely close your chart and re-open it from the deleted charts. If you work with regular variables, those would be lost in all the stated cases. You might think of terminal variables maybe, but I haven't tried it, yet. The most reliable way would be if you could at any time recalculate your take profit targets, but that depends on how you calculate them.

        First the simple one: Split your order into 3 orders and each with 1/3 of the lot size. Set your TPs accordingly to your calculations. You may use groups for each different TP target. And finally you create a block path on the onTrade tab, where you do the following. If closed group 1 trade set group 2 and group 3 to BE (or wherever you want it) and so on

        If you want to keep 1 order, than as stated above you need to store (or be able to re-calculate) the take profit targets ar any time and store them in variables. You also need to care about the case that EA ghets reloaded while trades are open. Then you'd check if profit target variables have a sensful value and if not you'd recalculate them.

        Basically I've done both ways already in some projects. If you have some experience you may chose the second approach. Otherwise I'd recomand to choose the multiple trades option.

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

        1 Reply Last reply Reply Quote 0
        • C
          Charlie66 last edited by Charlie66

          thx for the explanation I'm not capable of doing it any help appreciated

          C 1 Reply Last reply Reply Quote 0
          • C
            Charlie66 @Charlie66 last edited by

            @charlie66
            found it with trial and error thx for the inuput

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

              @charlie66 Ups, sorry I built your project yesterday but forgot to upload. I will send it anyway when I'm in front of my PC.

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

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

                @charlie66 Here you go .. 0_1578696837127_10 pips.mq4

                I implemented 2 ways. For BE I use the pips away block like you did. For SL to TP1 on TP2 I implemented on the onTrade tab if the 2nd trade was closed by TP.

                I also introduced some constants in order to show how that would look like.

                0_1578697030212_98ff7b6c-212e-40e3-82c8-c7451ac4bcf4-image.png

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

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

                  @trader-philipps
                  nicely done i havent finished my project yet i have noticed in your EA is TP1 is hit only the SL from the second trade TP2 moves to BE and not Trade 3

                  i tried to move all SL to BE when tp1 is hit

                  Thx a lot for you input but first backtest seems to be profitable

                  https://fxdreema.com/shared/pp5QsPfzc

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

                    @charlie66 It should set BE for both. At least it did when I tested it ?!?

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

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

                    Online Users

                    T
                    N
                    K
                    R
                    R
                    G
                    K

                    14
                    Online

                    146.7k
                    Users

                    22.4k
                    Topics

                    122.6k
                    Posts

                    Powered by NodeBB Forums | Contributors