The profit of any trade is the difference of entry and exit price minus spread and commission. This is not different in backtest and in live trading. If something looks wrong, look up the trade in the log and check it from start to end.