Sorted recordTrade() function