Indicators: AveragePrice

 

AveragePrice:

Indicator for calculating the average price of open positions, you can use the magic number if you want to separate the positions of just one robot, but the zero number is for manual operations.

AveragePrice

Author: Francisco Gomes Da Silva

 

thanks for the review

 
The calculation does not include swaps and commissions, which is important.
 
Francisco Gomes Da Silva #:

thanks for the review

Hi Francisco, 

Great indicator. Can you please show summary of lots (Sum) and the actual average price ? 


Thank you

Mawela

 
mawela #:

Hi Francisco, 

Great indicator. Can you please show summary of lots (Sum) and the actual average price ? 


Thank you

Mawela

hello Mawela, if you press CTRL+D you can see the summary of lots on metatrader

 
Vitaly Muzichenko #:
The calculation does not include swaps and commissions, which is important.
Totally agree. 

And also the net average price is wrong, because it's simply using buy avg price if there are more buy volume then sell, and viceversa, which is not correct.

Another variable should be used, in which buy info are added and sell info subtracted, there you will have the correct average price, but once again, without swaps and commissions.

In few words: good basic idea, but very bad realization.