#BTC

calculate rPNL when averaging position?

Simply put, position averaging is a strategy in which a user adds additional positions to an open one, but at more favorable prices, reducing the average price.

This does not create new, separate trades - instead, the entry price is changed and the position size is increased. If the average market price after averaging is profitable, then part of the trade can be closed.

Let's say a trader bought 1 BTC for $100,000. After some time, the price of BTC dropped to $90,000, resulting in a loss of $10,000.

Instead of closing the position at a loss, the trader decides to average it out by buying another 1 BTC at a price of $90,000. If he does this, the average purchase price will be: (1 * $100,000 + 1 * $90,000) / 2 = $95,000.

If the price of BTC rises again to $100,000, the position will be in profit because the average purchase price of the asset is lower than the current price. In this case, part of the uPNL (unrealized profit or loss) can be converted into rPNL by closing part of the position.

If the trader decides to close half, i.e. 0.5 BTC, at the current price of $100,000, his rPNL will be: (0.5 * $100,000 − 0.5 * $95,000) = $2,500. In this case, averaging the position was profitable, as the BTC price rose back to its original level and the average purchase price became less than the current one.