The most common reason for an immediate loss to be reflected in your Portfolio View on a recent buy is due to the fact that it was a USD buy in a CAD account. When you buy a USD security in a CAD account, you are also buying the USD currency at the BUY rate for foreign exchange (FX). When that position is added to your holdings we are reflecting the liquidation value of the holding using the current Bid price of the stock and the FX sell rate. Although the USD pricing has not changed much, the performance of your position is impacted by the difference in converting currency from the buy rate to the sell rate. This is similar to converting currency at any retail institution. The difference between the Ask price of the stock (where you bought) and the current Bid price of the stock can also affect the price of your holding.
If you would like to avoid the foreign exchange slippage when trading US securities, you may consider opening a USD account.