fxDreema

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

    How do I set up EA to Execute once per EMA cross?

    Questions & Answers
    3
    8
    542
    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.
    • B
      burnsm16 last edited by

      Hi community , I'm creating my first EA and is trying my best 🙂 .. currently one of my conditions is to place a buy when the EMA crosses up but since i have a small SL there is times when the SL is hit and since the EMAs is still crossed up, another buy posistion is opened and this is true for the opposite conditions for a Sell order. I just want it to run once and if TP or SL gets hit then to restart but EMA condition of crossing up needs to happen again. I hope this makes sense 🙂 thanks in advance

      B CedieTraderMax 2 Replies Last reply Reply Quote 0
      • B
        biztet @burnsm16 last edited by

        @burnsm16, for open trade, use condition>once per bar>buy now. Make sure both MA candle ID is 1.

        1 Reply Last reply Reply Quote 0
        • CedieTraderMax
          CedieTraderMax @burnsm16 last edited by

          @burnsm16
          You need to make two block tree with 1st condition: when crossed condition and 2nd condition: when greater/ less than on EMA condition and both must be connected on No trade. And as mention earlier the Candle ID is 1. I hope it make sense to you.

          1 Reply Last reply Reply Quote 0
          • B
            burnsm16 last edited by

            @biztet @CedieTraderMax

            thank you both for the feedback! However, I tried what you mentioned and it seems not to work. I Might have not explained the issue clearly or I might not quite understand what you mean or I'm doing it wrong.

            this is what I currently have

            0_1609554946911_456dd91a-05cc-456a-b81f-5c489f1e489f-image.png

            this is condition 2 setup true is the same for 3 concerning "Candle ID"

            0_1609555133612_1a4e77f6-29f6-4538-9b81-541e818cc96e-image.png

            1 Reply Last reply Reply Quote 0
            • B
              biztet last edited by

              @burnsm16 , your trigger is crossing ema. The middle operand should be x> or x<.

              1 Reply Last reply Reply Quote 0
              • B
                burnsm16 last edited by

                @biztet thank you so much! that fixed the problem. I do have one more question atm if you could help.

                When I change Condition 3 inputs to "see below" it doesn't want to open a trade and this is true if "candle Id" is set to 0or1

                0_1609558609165_3361da8c-deeb-48fd-973f-162b4442353f-image.png

                1 Reply Last reply Reply Quote 0
                • B
                  burnsm16 last edited by

                  Actually, I figured it out !! @biztet @CedieTraderMax thank you so much!

                  1 Reply Last reply Reply Quote 0
                  • B
                    biztet last edited by

                    Good luck!

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

                    Online Users

                    R
                    F
                    S

                    16
                    Online

                    146.7k
                    Users

                    22.4k
                    Topics

                    122.6k
                    Posts

                    Powered by NodeBB Forums | Contributors