Summary

How the aggregation works

The MEME platform system performs aggregation on a price first, time first basis. "Buy/long" is the buy order direction, "sell/short" is the sell order direction.

Buy order direction price is the highest, the earliest time for the buy order process first, sell order direction price is the lowest, the earliest time for the sell order process first. When the first price of the buy order process is greater than or equal to the first price of the sell order process, then the transaction can be aggregated.

What happens after a successful aggregation

If a buy/sell order with the same direction as the position held is successfully aggregated (added), the system will increase the position held in the corresponding direction of the corresponding contract and recalculate the average price of the position and the estimated strong closing price.

If a buy/sell order in the opposite direction of the held position is successfully aggregated (reduced), the system will reduce the position in the corresponding direction of the corresponding contract, and the average price of the position and the estimated closing price will remain unchanged.

How to calculate the average price of a position

Average price of position = ( original number of positions * average price of original positions + number of newly opened positions * average price of newly opened transactions ) / ( original number of positions + number of newly opened positions )

Average price of newly opened positions = ( number of contracts at price 1 * price 1 + number of contracts at price 2 * price 2 + ... )/ Number of new positions opened

Number of new positions opened = Number of contracts at price 1 + Number of contracts at price 2 + ...

To calculate the average price of a position:

The current latest transaction price is 6,000 USDT, a trader holds a long direction position contract 6 BTC, then the trader added 5 BTC buy contracts at the following prices: 5,800 USDT traded 1, 5,700 USDT traded 1, 5,600 USDT traded 3.

Then the average price of the five contracts traded = (1 * 5,800 + 1 * 5,700 + 3 * 5,600) / 5 = 5660.

Then the average price of the new position is = (6 * 6,000 + 5 * 5660) / (5 + 6) = 5840.

The number of new positions is = 5 + 6 = 11.

Copy link
On this page
How the aggregation works
What happens after a successful aggregation
How to calculate the average price of a position
To calculate the average price of a position: