I need two functions: open positions total gain and Close everyhing

 

Hi evryone!

I'm a starting programmer in MT.. and to be sincere I'm waiting the new MT 5 lanuage to better learn.. so .. how to say.. I'm pretty

Anyhow I'm testing one EA I'm trying to make, but I can't figure how to have these two functions:


1) have the total profit of ALL the positions opened, may be undefined number


2) Close them all.


Can anyone help me please?


Thank you in advance,

Andrea

 

Hi!

I fonud how to close everything at once: https://forum.mql4.com/21415

Still lookong for total profit of opened order.

Thank you!