close when in profit