At Bybit, due to inverted trading for perpetual contract, please use the following guide to calculate your position's average entry price:
Average entry price = Total quantity of contracts / Total contract value in BTC
Total contract value in BTC = [(Quantity1/Price1) + (Quantity2/Price2) + (Quantity3/Price3)....]
A trader bought 50 contracts at 8000 USD and another 50 contracts at 9000 USD.
Total contract value in BTC = (50/8000) + (50/9000) = 0.01180555
Average entry price = 100/0.01180555 = 8470.58 USD