Sort the history price to get the median.