@johnjohnson55 You seem to be using a sale price in your calculation for maximum cost during the year - you should only be using the cost in Cdn$.
Take your total cost in Cdn$ before you sold any shares. Calculate average cost per share by dividing the total cost by the number of shares.
To...