Apologies if this has been answered before, but I can't find a suitable answer.
How do I close an open position when certain criteria are met?
if(fast moving average crosses over and above slow moving average)
Open long position
if(fast moving average crosses over and below slow moving average)
Close the open (long) position <== This is the part I can't do.
In MT4 it was easy with the ClosePosition () function, but MT5 works differently.
There is no ClosePosition() on "MT4".
Your question is about mql4 or mql5 ?