EA code just alternates Buy Sell Buy Sell

 

Hello and thank you for reading.I'm new to coding, but have a basic understanding to make small adjustments. My EA seems to wait for a Sell signal after the Buy trade is finished. Even tho there is more buy trades in the trend. Can someone please direct me as to what part of the code i can fix this. I have Heiken Ashi close coded to enter above a moving average. Should i use Close[1] instead of indicator close?

Reason: