MT5 "netting" how the orders are managed

 

Hi everybody,

I would like to know how MT5 manage the orders. When you sell 5 lots after having buy repetidly 1 lot ten times for example, will MT5 be closing the orders starting from the oldest like in cTrader or by the profitable order or something else.


Thanks for your help

 
https://www.metatrader5.com/en/trading-platform/trading

Two position accounting systems

MetaTrader 5 supports two order accounting modes: the netting mode is adopted on exchange markets, while the hedging method can be used for Forex trading. With the netting system, the trader will be able to have only one open position of a financial instrument at a time. The volume of that position can be increased or reduced through any further operation on the same symbol. With the hedging system, any new deal on a financial instrument opens a new position. Individual Stop Loss and Take Profit levels can be set for each of the open positions.


 
This is determined by your account type, please be sure what account type you're opening with your broker.

There is no way of changing it later.
 
Soewono Effendi:
This is determined by your account type, please be sure what account type you're opening with your broker.

There is no way of changing it later.
I know exactly that. This is not the point. I want to know how the orders are managed on NETTING mode. Means how MT5 calculate the average entry price of the resulting position composed of multiple orders with different size executed in a period of time. How MT5 manage the orders that reduce the position for example..
Reason: