July 24, 2020
The “P&L” (Profit and Loss) number you will see on CoinFLEX is there for your reference. We have picked one standard of calculation. This number does not affect the functioning of the exchange, margining, reserved balances, etc.
CoinFLEX does not differentiate between realized and unrealized P&L, as gains/losses from price changes are reflected in the account balances immediately.
CoinFLEX keeps track of the average entry price for all open positions and uses that to calculate P&L. This is best shown using a series of examples.
Example 1:
Trade | Long/Short | Quantity | Contract | Price |
1 | Long | 10 | BTC-USD-SWAP-LIN | 9000 |
2 | Long | 10 | BTC-USD-SWAP-LIN | 10000 |
Current market price | 11000 |
Example 2:
Trade | Long/Short | Quantity | Contract | Price | |
1 | Short | 10 | BTC-USD-SWAP-LIN | 9000 | |
2 | Long | 10 | BTC-USD-SWAP-LIN | 10000 | |
3 | Long | 10 | BTC-USD-SWAP-LIN | 11000 | |
Current market price | 10000 |
This is because the first two trades have closed out the earlier position.
Example 3:
Trade | Long/Short | Quantity | Contract | Price | |
1 | Long | 5 | BTC-USD-SWAP-LIN | 9000 | |
2 | Long | 5 | BTC-USD-SWAP-LIN | 10000 | |
3 | Short | 5 | BTC-USD-SWAP-LIN | 10000 | |
3 | Long | 10 | BTC-USD-SWAP-LIN | 11000 | |
Current market price | 10000 |
The average entry price after the first 3 trades is applied at the reduced quantity when calculating the average price, as trade 3 reduced exposure. After the first three trades, the remaining balance is 5 BTC at average entry price of 10500.