For the algo below, does anyone know of a any way I can keep the number of open positions to 5 and only add new positions when open positions are less than 5?