Download MetaTrader 5

Calcualtion of total closed lots script-indicator

To add comments, please log in or register
Added support for the Spanish language. Come and check it out!
Mohamed Mohamady
486
Mohamed Mohamady 2015.12.04 20:26 

Hello,

I'm looking for a script/indicator that tells me how much lots I've already traded.. Is there any such script/indicator..?!

Alain Verleyen
Moderator
30711
Alain Verleyen 2015.12.05 08:02  
Mohamed Mohamady
486
Mohamed Mohamady 2015.12.05 18:36  
Alain Verleyen:

The code base is not well searchable....
Biantoro Kunarto
14833
Biantoro Kunarto 2015.12.07 02:24  
Mohamed Mohamady:

Hello,

I'm looking for a script/indicator that tells me how much lots I've already traded.. Is there any such script/indicator..?!

   double Lot = 0;
   for(int x=OrdersHistoryTotal()-1;x>=0;x--)
      {
         if ( OrderSelect(x,SELECT_BY_POS,MODE_HISTORY))
            Lot += OrderLots();
      }
   Print(Lot);
To add comments, please log in or register