fxDreema

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

    Custom price crossing MA condition with minimum turnover distance

    Questions & Answers
    3
    7
    867
    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.
    • O
      osryan last edited by

      Note: I wasn't sure how to phrase the subject. I think I can do what I want but could use some assistance on the logic:

      My EA relies on price crossing above or below an MA, utilizing the minimum turnover distance (MTD). So for example, if price moves below MA20 by 100 pips, then crosses back up, EA triggers a buy order.

      What I want to do is get into the trade earlier. In the above example, I would still want price to move below the MA20 by 100 pips, but trade to trigger when it moves back up 80 pips, so it would still be 20 pips below the MA20.

      Anyone have any advice on how to program this?

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

        @osryan That can be very dangerous. How can you be sure the price will finally cross up the MA?

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

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

          @l-andorrà Can't be sure of anything. I'm not worried about that part. If it doesn't and hits my stop loss, that's fine. I'm just trying to figure out how to make the MTD asymmetrical. Need it to drop below MA as defined by MTA, but not apply to the move back up. Since it isn't a crossover then, I think I'm using the wrong condition.

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

            @osryan in other words:

            • if price is less than 20 pips below MA,
            • check if price has been 100 pips below MA at some point

            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

            roar O 2 Replies Last reply Reply Quote 1
            • roar
              roar @roar last edited by

              Here's a loop trick for that
              https://fxdreema.com/shared/oGxoWZwX

              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

              O 1 Reply Last reply Reply Quote 1
              • O
                osryan @roar last edited by

                @roar Ahh, that makes sense. Not as difficult as I was making it to be. Thank you!

                1 Reply Last reply Reply Quote 1
                • O
                  osryan @roar last edited by

                  @roar Oh I see. That makes sense. Thanks for the help, saved me a lot of time with that loop!

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

                  Online Users

                  A
                  T
                  M
                  E
                  C
                  B

                  18
                  Online

                  146.7k
                  Users

                  22.4k
                  Topics

                  122.6k
                  Posts

                  Powered by NodeBB Forums | Contributors