Hi there, I'm trying to build an algo using SMA. How do I code it so that it will wait for the next signal. For example, the algo will take a position, take profit and then wait for the next crossover? What I have right now will continute to take positions since slow>fast. 

Thank you