average position price

 

Hi,

Can I create a script or EA that calculate and plot my average position price?

TIA

 
Try this indicator. It should work if not hedge trading.
Reason: