Canopy calculates/ shows the following as such,
Example:
Quantity: 10, Price: 2, Fee: 1
Quantity: -10, Price: 2, Fee: 1
Realized Trading Profit: 80
Realized Profit: 78
Total Profit = Realized Trading Profit + Distributions + Unrealized Profits =
80 + 0 + (-2)
Therefore, Position is 0