Implemented order placement algorithm.