Download MetaTrader 5

Average price of open position ??

To add comments, please log in or register
KuzMan
14
KuzMan 2012.04.29 22:35 
Hi !

I make N buys and want to calculate the average price :

( Price_1*Qty_1 + ... Price_N*Qty_N) / (Qty_1 + .. Qty_N)

Analysing history of deals is a little bit difficult to me...


Can you advice me a standard function, pls ?

Documentation on MQL5: Standard Constants, Enumerations and Structures / Indicator Constants / Price Constants
  • www.mql5.com
Standard Constants, Enumerations and Structures / Indicator Constants / Price Constants - Documentation on MQL5
Trinh Dat
37532
Trinh Dat 2012.05.03 03:08  

On mq5 do not need calculate the average price.

each symbol have only one position. it is price of position.

POSITION_PRICE_OPEN


KuzMan:
Hi !

I make N buys and want to calculate the average price :

( Price_1*Qty_1 + ... Price_N*Qty_N) / (Qty_1 + .. Qty_N)

Analysing history of deals is a little bit difficult to me...


Can you advice me a standard function, pls ?



Alexander Piechotta
6973
Alexander Piechotta 2012.05.03 18:21  
tuoitrecuoi:

On mq5 do not need calculate the average price.

each symbol have only one position. it is price of position.

POSITION_PRICE_OPEN


He thinks that Analysing history of deals
To add comments, please log in or register