Working buy/sell price function

Yeah buddy!