william60902 / Publications
Forum
How to close a position in condition?
Hello there! I'm wondering how to close a position in condition? For example When EMA 20 cross over EMA 50 then start buy position and when EMA 20 cross under EMA 50 then close this buy position I only using trade.buy() if( (myMAfast[0] > myMAslow[0]) && (myMAfast[1] < myMAslow[1]) ) //cross over