How do I set up EA to Execute once per EMA cross?
-
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 -
@burnsm16, for open trade, use condition>once per bar>buy now. Make sure both MA candle ID is 1.
-
@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. -
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

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

-
@burnsm16 , your trigger is crossing ema. The middle operand should be x> or x<.
-
@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

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