Fix Trades Out of Order

Certain brokers occasionally get their trade history out of exact order of execution. Many times sells are listed before buys for a specific date, or buys to cover are listed ahead of short sales. This makes it almost impossible to match trades properly.

This function will make sure all buys come before sells and all sell shorts come before buys to cover for a specific day before matching and assigning trade numbers. This is only for those brokers who do not provide a time stamp.