fxDreema

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

    Partial close after 1 ATR at the time of trade open

    Questions & Answers
    2
    4
    475
    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.
    • K
      krunal20 last edited by

      Hi All,

      I have a pretty basic EA which correctly works when placing the trades but i'm having trouble with my exit strategy for profitable trades. The exit strategy is as follows: Close 50% of the trade when price is at 1 ATR (ATR should be based off of the value at the time of opening the trade) and then the child trade (remaining 50%) should move the stop loss to break-even and the trade should close when the MACD signal and main lines cross.

      I have tried using the modify variable block, the pips away from open block as well as conditions based off of an ATR formula but can't get any of them to work. I'm not sure what i'm doing wrong. Any help would be much appreciate. Thanks, KP. Here is my setup:

      0_1629646399481_Screenshot 2021-08-23 at 01.31.27.png

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

        @krunal20 I would save the current atr at trade open like you have done with formula, in here https://fxdreema.com/forum/topic/12802/atr-pips you'll see how to put atr into pips so you can use in all your conditions.

        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
        • K
          krunal20 last edited by

          Thanks for that @jstap - That's really helpful.

          Just out of curiosity, do you know why my current setup isn't already doing this? Because as you said, i'm using the formula blocks after the buy/sell to save the trade open price +/- ATR into a variable and then using that variable in the 'pips away from open price' block to close half of the trade. As I would only ever have 1 live trade per symbol, the variable would only update once at trade inception (because of where I have placed the formula block) so there shouldn't be any issue of the ATR updating as time moves on. Thanks, KP.

          https://fxdreema.com/shared/WOFLE7Otb

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

            @krunal20 To be honest I'm not sure, that would save it as a price fraction, so if that's what you were using in pips away it should have worked. I tend to always use pips, probably to do with me but previous problems is what's caused this.

            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

            M
            D
            A
            M

            13
            Online

            146.7k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors