Please edit your post and use the code button (Alt+S) when pasting code.
EDIT your original post, please do not just post the code correctly in a new post.
Keith Watford:
Please edit your post and use the code button (Alt+S) when pasting code.
EDIT your original post, please do not just post the code correctly in a new post.
thanks for reply,
gamblerappa: I need a help in calculating average price of open positions, considering both buy positions and sell positions.
Lots Weighted Average Price = ∑ op(i) × lot(i) ÷ ∑ lot(i). This is the break even price of all orders combined.
OrderOpenPrice question . - MQL4 programming forum (2017)
looking for sample code on how to calculate the price BE for a few Buy and Sell orders simultaneously - Pips - MQL4 programming forum (2016)
When combining buys and sells, use +Lots for buys and -Lots for sells.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
hi All,
I need a help in calculating average price of open positions, considering both buy positions and sell positions.
currently i am using two separate functions, buy average price and Sell average price.
i use reverse martingale system to add positions.
please help me out for the same,
thanks in advance