Add all the entry prices together.
Divide by 10.
for(int x=OrdersTotal()-1; x>=0; x--)
Please note that if your orders have different volumes (lots) and you are trying to calculate the net open price (that will be equivalent to a single order for the entire batch), then you have to apply the following calculations:
Forum on trading, automated trading systems and testing trading strategies
Any great idea about HEDGING positions welcome here
Fernando Carreiro, 2018.09.17 21:17
For those of you that want to learn to see the "light" and not fall into the trap of "hedging" and Grid strategies, here is the basic math:
Learn to do your research properly! Do not be blinded by false promises. Do the math!
Well, it does require that you have some understanding of mathematics and its notation, in order to understand it. In essence:
You can apply the same logic in the calculation of the "Net Mean Closing Price" (or the S/L or the T/P).
For the "Net Mean Profit or Loss", subtract the "Net Mean Opening Price" (step 3) from the "Net Mean Closing Price", then multiple by the "Net Total Volume" (step 1).
Sir Fernando is this what you mean volume? is that the lotsize?
im not good in english sorry
Yes! Order "Volume" is measured it "Lots"!
The word "Mean" is equivalent to "Average"!
Please enable the necessary setting in your browser, otherwise you will not be able to log in.