How to add EA condition to take trade when moving average is fixed and not pull back
-
Hi guys. I have a moving average crossover trading EA and would like to know how do I set the EA to only take trades when the moving average crosses over and stays in it's position ( no pull back) usually after the current candle closes. The problem I am experiencing now with my EA is that the fast moving average touches the slow moving average and it opens a trade. Then as time passes the moving average pulls back and moves the other direction. It is as though the crossover never happened but I am still in the losing trade. I would like to have the EA only take trades after the current candle once the moving average is painted or fixed in it's position.
-
Hi @rogerthat . I think your situation, in the MA condition block, you need to set the Candle ID =1. And so your EA will open trade only after the crossing is confirmed, that is after the candle is closed.
-
Hey thanks for your help. I have tested your solution in my demo and carefully observed what the EA does. However the problem I am experiencing with setting the candle ID =1 is that the current candle=0 also first has to close before the trade is taken which can cause me to lose many profitable pips. What I would like to have is that if candle =1 conditions are confirmed that the trade is taken the moment the candle=0 opens instead of waiting for candle=0 to close also. Do you perhaps have a solution to this?
-
@rogerthat Biztet is right. The only way to confirm a crossover happened is by working on candle ID1. Otherwise, you'll never be completely sure your visual crossing right now is a final crossing after a few minutes.
-
@rogerthat , you will never get the perfect entry with MA. Either you use a custom indi or you have a very good strategy, then you might get close to perfect entry. Well, if you have one, please do share with us.
