Close at opposite signal - page 3

To add comments, please log in or register
David Diez
1485
David Diez  

It's strange that symbol filter does work in the first loop for orders count.

      //+--- Internal loop ------------------------------------------!
      double BuyOrders=0,SellOrders=0;
      for(int i=0;i<PositionsTotal();i++){
         ulong iTicket=PositionGetTicket(i);
         if(PositionSelectByTicket(iTicket)&&
         PositionGetString(POSITION_SYMBOL)==SName){
            double SPoint=SymbolInfoDouble(SName,SYMBOL_POINT);
            if(PositionGetInteger(POSITION_TYPE)==POSITION_TYPE_BUY){ BuyOrders++; }
            if(PositionGetInteger(POSITION_TYPE)==POSITION_TYPE_SELL){ SellOrders++; }
            }
         }
123
To add comments, please log in or register