EA not displaying data on certain symbols,

 

Hello, im new on EA´s i currently have one problem, my EA seems to not be running (not displaying any comments, and suddenly on certain symbols it starts working an not on others,

attached my on tick code and a picture of 12 symbols running my EA and only some have the comments and are operating (after almost 6 hours) .


any help is welcome

Ed

void OnTick(){ 
              //contar las posiciones abiertas de este par y globales
              operaciones=0;
              GlobalOP=0;
              for (int o=PositionsTotal()-1; o>=0; o--){
                                                        string simbolo=PositionGetSymbol(o);
                                                        if (Symbol()==simbolo){
                                                                               operaciones+=1;
                                                                              }
                                                        GlobalOP+=1;                        
                                                        }


              rsi=(RSI(pos));
              //Comment ("RSI = ",rsi,"\n");//msg RSI
              if ((rsi<RSILowLimit) && (operaciones==maxOperaciones) && (rsi_low==0) && (GlobalOP<maxGlobalOp)){
              Alert("No puede comprar Maximo De operaciones "+Symbol()+" alcanzado : "+maxOperaciones);
              SendNotification("No puede comprar Maximo De operaciones "+Symbol()+" alcanzado : "+maxOperaciones);
              Print("No puede comprar Maximo De operaciones ",Symbol()," alcanzado : ",maxOperaciones);
              }
              if ((rsi>RSIHighLimit) && (operaciones==maxOperaciones) && (rsi_low==0) && (GlobalOP<maxGlobalOp)){
              Alert("No puede vender Maximo De operaciones "+Symbol()+" alcanzado : "+maxOperaciones);
              SendNotification("No puede vender Maximo De operaciones "+Symbol()+" alcanzado : "+maxOperaciones);
              Print("No puede vender Maximo De operaciones ",Symbol()," alcanzado : ",maxOperaciones);
              }
              if ((rsi<RSILowLimit) && (operaciones<maxOperaciones) && (rsi_low==0) && (GlobalOP==maxGlobalOp)){
              Alert("No puede comprar Maximo De operaciones Globales alcanzado : "+maxOperaciones);
              SendNotification("No puede comprar Maximo De operaciones Globales alcanzado : "+maxOperaciones);
              Print("No puede comprar Maximo De operaciones Globales alcanzado : ",maxOperaciones);
              }
              if ((rsi>RSIHighLimit) && (operaciones>maxOperaciones) && (rsi_low==0) && (GlobalOP==maxGlobalOp)){
              Alert("No puede vender Maximo De operaciones Globales alcanzado : "+maxGlobalOp);
              SendNotification("No puede vender Maximo De operaciones Globales alcanzado : "+maxOperaciones);
              Print("No puede vender Maximo De operaciones Globales alcanzado : ",maxOperaciones);
              }
              
              if ((rsi<RSILowLimit) && (operaciones<maxOperaciones) && (rsi_low==0) && (GlobalOP<maxGlobalOp) && time_passed){
                                       
                                       operaciones+=1;
                                       double Ask = NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_ASK),_Digits);
                                       trade.Buy((LoteBuy*multiplier), _Symbol, NULL,NULL,NULL,"AMS-Laser");
                                       rsi_low=1;
                                       time_passed = false;
                                       EventSetTimer(PeriodSeconds(PERIOD_CURRENT)*CandlesToWait);
                                       Print ("Condicion de Compra, Operacion #",operaciones," RSI= ",rsi," ",TimeLocal());
                                       Comment ("Condicion de Compra, Operacion #",operaciones," RSI= ",rsi);
                                       SendNotification ("Compra "+Symbol()+"Operacion #"+operaciones+" RSI= "+rsi);
                                       Alert("Compra "+Symbol()+"Operacion #"+operaciones+" RSI= "+rsi);
                                       }

                                       
                                                                 
                                   
              
                
                 if ((rsi>RSIHighLimit) && (operaciones<maxOperaciones) && (rsi_high==0) && (GlobalOP<maxGlobalOp) && time_passed){
                                        
                                        operaciones+=1;
                                        double Bid = NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_BID),_Digits);
                                        trade.Sell((LoteSell*multiplier), _Symbol, NULL,NULL,NULL,"AMS-Laser");
                                        rsi_high=1;
                                        time_passed = false;
                                        EventSetTimer(PeriodSeconds(PERIOD_CURRENT)*CandlesToWait);
                                        Print ("Condicion de Venta, Operacion #",operaciones," RSI =",rsi," ",TimeLocal());
                                        Comment ("condicion de Venta, Operacion #",operaciones," RSI= ",rsi);
                                        SendNotification ("Venta "+Symbol()+"Operacion #"+operaciones+" RSI= "+rsi);
                                        Alert("Venta "+Symbol()+"Operacion #"+operaciones+" RSI= "+rsi);
                                        PlayAlertSound();
                                       }
                                       
               if(rsi>RSILowLimit){
                                  rsi_low=0; 
                                  }                       
                                  else{
                                       if (rsi<RSIHighLimit){
                                                             rsi_high=0; 
                                                             }
                                       }                       
              
              
              //buscar posiciones
      if (PositionSelect(_Symbol)==true)
      {
         //contar las posiciones
         for(int i=PositionsTotal()-1; i>=0; i--) 
         {
            //calcular el numero de tiket
            ulong PositionTicket=PositionGetTicket(i);
            //obtener el par en el que trabajamos
            string PositionSymbol=PositionGetString(POSITION_SYMBOL);
            //calcular precio de apertura de la posicion
            double PositionPriceOpen = PositionGetDouble(POSITION_PRICE_OPEN);
            //calcular precio actual
            double PositionPriceCurrent = PositionGetDouble(POSITION_PRICE_CURRENT);
            //calcular profit
            double PositionProfit=PositionGetDouble(POSITION_PROFIT);
            // calcular swap
            int PositionSwap=(int)PositionGetDouble(POSITION_SWAP);
            double positionLot=(POSITION_VOLUME);
            //calcular profit neto
            double PositionNetProfit=PositionProfit+PositionSwap;
                       
            //ver si alcanzamos las ganancias esperadas
            if ((PositionNetProfit>=ProfitUSD) && (PositionSymbol==Symbol())){
                                             //cerrar posicion con ganancias            
                                              if (trade.PositionClose(PositionTicket,-1)){
                                                                                          Print("Position #", PositionTicket, " closed at $",PositionNetProfit);
                                                                                          SendNotification(Symbol()+" Cierre de Posicion #"+PositionTicket+" Cerrado en $"+PositionNetProfit);
                                                                                          Alert(Symbol()+" Cierre de Posicion #"+PositionTicket+" Cerrado en $"+PositionNetProfit);
                                                                                          operaciones=(operaciones-1);
                                                                                          //deshabilitar martingala
                                                                                          multiplier=1;
                                                                                          PlayAlertSound();
                                                                                          }//if trade position close
                                             }//if position net profit
                                             
           
                                             
            Comment("Posicion : ",i,"\nTicket : ",PositionTicket,"\nEstado: ",PositionNetProfit,"\nPosiciones totales: ",PositionsTotal(),"\nPosiciones ",Symbol()," : ",operaciones,"\nrsi: ",rsi);                                                                                                             
         
             
            }//for close
            }//if close
     
      
      }//on tick close