Apologies if this is covered elsewhere or a super obvious question.
I want to increase and decrease position sizes i.e. phase in an out of the stock.
Strategy:
buy = cross (close, MA) // buy when price crosses over MA
buy = cross (close, MA2) // buy more (add to position) when price crosses over second MA
close = cross (MA2, close) // close one of my two positions
close = cross (MA, close) // close second position
Many thanks.