I have created this function that sums up net pip movements for buy and sell orders but it does not seem to work properly. Basically for example, the ea opens a buy order at 81.50 and now the pair has moved 81.70. the net pip movement is 0.20. then the same ea sells the same pair at 81.50 and the pair has moved to 81.60. the net pip movement is -0.10. Now the net pip movements for the 2 positions is 0.20+ -0.10 = 0.10.
What is wrong with my code?
for(int i=OrdersTotal()-1; i>=0; i--)
// match the symbol EUR/USD or EUR/CHF, etc
ith my code below?