fxDreema

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

    Close trades under condition once certain profit reached

    Questions & Answers
    3
    6
    613
    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.
    • S
      SirLuk last edited by

      Hi guys, here is what I would like to do: I have an EA where only one trade at a time can be open. Once the trade reaches 100% of stop loss distance, I want a permanent (on tick) condition which closes the trade if price crosses the 50 MA. So the trade doesn't have a fix take profit. I have tried various things but can't really solve the issue. The thing is, I don't only want the trade to close when price crosses the MA while it is still 100% in profit (of SL). It should just activate that rule no matter what happens with the price later. Kind of like a trailing stop, where the stop is the crossing of the 50 MA.

      Is there anyone who can help with this?

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

        @sirluk Not sure I fully understand. Which of those conditions is supposed to be the top priority? If you set your trade to be closed when in profit at 100% Sl distnace, it close no matter what. Could you please be more specific?

        (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
        • S
          SirLuk last edited by

          @l-andorrà Ok, let's make an example. I have a trade with a 20 pips stop loss. Now, what I want is the following: Once my trade is 20 pips in profit (which is 100% of the SL), I want the trade to close whenever price crosses (on close) the 50 MA. So once condition A (trade in profit 100% of SL) it triggers B (close if 50 MA crossed). Is that more clear?

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

            @sirluk Ok That is more clear now. Now the problem is 'price crossing 50 MA'. Is that corssing supposed to happen immediately it is confirmed on candle ID 0 or you need to be confirmed at the close of candle ID 1?

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

            S 1 Reply Last reply Reply Quote 0
            • kriespy
              kriespy last edited by

              Hi, I just put something together not sure if it works but it should work. I used a variable called "trailingactive" which becomes true if price was 200% pips away from current trade. Then I used this variable as starting condition for the price is below 50 ma for buys or above the 50 ma for sells.

              https://fxdreema.com/shared/i6Qs3nyLc

              Let me know if this worked. I couldn't test it myself because I didn't get the code and I'm too busy to put one together myself right now.

              Cheers.

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

                @l-andorrà at the close of the candle. So ID 1.

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

                Online Users

                P
                M
                M
                E
                Y
                L
                F
                S
                F

                25
                Online

                146.7k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors