Code
	if (crossOver(DEMAShort, DEMALong)) 
		exitLong();
		enterLong();
	if (crossUnder(DEMAShort, DEMALong)) 
		exitShort();
		enterShort();

like this?

or do I need a condition first that checks if it has an open position?

Last edited by coinpump; 01/08/22 00:40.