fxDreema

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

    Can I create a break in the EA following TP ??

    Questions & Answers
    2
    3
    547
    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
      Dre last edited by

      Hi Everyone,

      I have created an EA that opens a trade when a candle closes above a Moving Average and then closes the trade once a candle closes back below that same MA.

      There are times when the trade is open and price rallies quickly and sharply to the upside and then falls back down - closing a lot lower - once the candle closes back below the MA (as intended).

      If possible, I would like to TP if a trade is open and price rallies to the upside by a certain amount (e.g. 100 pips).

      I tried to do this by simply setting a TP on the "Buy Now" block (as I previously had "No Stop Loss" set) but of course once the TP is executed, another trade is automatically and immediately opened as the conditions are still met for a buy signal (candle close above the MA).

      Is there a way that I could:

      • Program the EA to miss one buy step cycle so that it doesn't open another trade immediately following TP and only gets ready for another buy signal once price has closed below the MA (where it would've closed the trade had the TP not have triggered).

      OR (if that is asking too much)

      • Program the EA to turn off if/when a trade hits TP. At which point I could manually start it again once price closes below the MA - ready for another buy signal.

      I am new to the platform so let me know if I haven't explained anything clearly enough and I will do my best to do so.

      Thanks,

      Dre

      roar 1 Reply Last reply Reply Quote 0
      • roar
        roar @Dre last edited by

        @dre Hi!

        Just use "crosses above" instead of simply "is above" in your MA condition.

        Need small help? Tag me in your post
        Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

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

          @roar Thanks! I appreciate your help. I will give that a go!

          Dre

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

          Online Users

          M
          C
          K
          T
          K
          D
          K

          15
          Online

          146.6k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors