Simple 'Close trade after crossing Moving Average' not working
-
Hi, I hope someone can please help me.
I have created an EA that I want to close trades after crossing a moving average (after the trade has been entered manually) however my EA closes the trades immediately after loading, not after crossing the MA.
The conditions are:
If in a manually entered buy trade, close the trade after bar crosses from ABOVE and closes BELLOW the Moving Average.
If in a manually entered sell trade, close the trade after bar crosses from BELLOW and closes ABOVE the Moving Average.
Does anyone have some advice for me on how to get this to work. I have attached the my EA here.
-
It closes because you have your candle set to 1 and ma set to candle 0. You have to set both to the same candle.