Added and fixed code for apple trading