The definition of Buy Price and Sell Price is essential for understanding the results of a trade. When there are multiple buy and sell executions within the same position, it becomes necessary to calculate the average price, which summarizes these entries into a single reference value.
Buy Price and Sell Price
For the buy side, the average of the buy execution prices will be considered, weighted by the quantity of each trade. For the sell side, the same logic applies, but considering the sell executions. In the example below, we have two buy orders of 1 contract each and two sell orders of 1 contract each, each with its own individual price.
Considering the prices and quantities of the executions that compose the operation, we have the following:
Trade Average Price
For real-time monitoring of trade results, we also use the operation's average price. This value serves as a reference price which, when compared to the current price of the asset, allows us to determine the actual financial result of the open position. Unlike the Buy Price and Sell Price, the operation’s average price can take both buy and sell executions into account.
In BlackArrow, we have two calculation methods that can be selected in the menu below:
Opening
In this method, the operation’s average price is calculated in the same way discussed in the first part of this article. Only the executions from the side in which the position was opened will be considered. In other words, if the position was opened on the buy side, only buy executions will be used in the average price calculation.
In the example below, the operation consists of three executions:
The first: a buy of quantity 0.6 at the price of 24,890.91
The second: a buy of quantity 0.4 at the price of 24,891.98
The third: a sell of quantity 0.4 at the price of 24,887.50
Using the Opening method, the operation’s average price will be equal to the Buy Price, since the trade that originated the position occurred on the buy side. Thus, this is a buy operation.
In Chart Trading, the operation will appear as shown below:
Openings and Closings
Considering the same example operation, but now using the Opening and Closing method, all executions in the operation must be considered. Thus, following the Average Price formula, we have the expression below:
In Chart Trading, the operation will be displayed as follows:
Therefore, if you want the average price to update as partial exits are made, it is necessary to enable the Opening and Closing option.
In general terms, the calculation of the buy price, sell price, and operation price follows the expression below:
where:
Qi represents the quantity traded in trade i
corresponds to the unit price of trade i
This formula provides the weighted average of the prices, considering the weight of each execution according to its quantity.
Did you find this content useful?
Don't forget to rate us below.