Changed logic of shouldBuy and shouldSell.