Realized Gain/Loss by Stock Symbol - Coding problem | OneNoughtOne