Calculating Profit and Loss
In X_TRADER® and X_RISK®, open P/L is based on the same prices as P/L and is calculated using the Match Price formula. For example:
- 2 @100
- 3 @ 25
- 20 @ 150
- 10 @ 120
Your current open position: 15
Your open P/L is based on last traded price (LTP): (e.g., 160)
Open P/L using the Match Price formula = 15 * (160 - average price of the last 15 trades) = 15 * (160-150) = 150.
This differs from how open P/L is calculated in FIX Adapter and TT API, which use an averaging formula. For FIX Adapter, refer to Understanding P&L Calculations.