'profit' = profit of the trade. If the trade is settled is a net profit (BF fees deducted), if not is a gross profit. If the parameter [id_trade] equals the current trade (@id_trade) the function returns the same value of the variable @trade_profit.
'back_size' = sum of back sizes of all bets of the trade. Only cancelled bets are excluded.
'lay_size' = sum of lay sizes of all bets of the trade. Only cancelled bets are excluded.
'back_avg_price' = average price of all back bets. Weighted with sizes of the bets.
'lay_avg_price' = average price of all lay bets. Weighted with sizes of the bets.
'unmatched_bets' = count of unmatched or partially unmatched bets.