¡Una tarea con botones! - página 8

 
También es una opción. Sólo que no es necesario crearlos en cada tic.
 
static string name=NULL;
for(int i=0;i<10;i++)
  {
   bool But=ObjectGetInteger(0,(string)i,OBJPROP_STATE);
   if(but && name!=(string)i)
     {
      ObjectSetInteger(0,name,OBJPROP_STATE,false);
      name=(string)i;
     }
  }
Si los nombres de los botones no son números, entonces pon los nombres en un array.
 
Rorschach:
Si los nombres de los botones no son números, los nombres se almacenarán en una matriz.
El botón anterior permanece pulsado hasta la siguiente llamada del ciclo ...
 

No sé si este es el enfoque correcto, pero resuelve el problema

static string name=NULL;
for(int i=0;i<10;i++)
  {
   bool But=ObjectGetInteger(0,(string)i,OBJPROP_STATE);
   if(but && name!=(string)i)
     {
      ObjectSetInteger(0,name,OBJPROP_STATE,false);
      name=(string)i;
      i=0;
      }
  }
 
static string name=NULL;
for(int i=0;i<10;i++)
  {
   bool But=ObjectGetInteger(0,(string)i,OBJPROP_STATE);
   if(But && name!=(string)i)
     {
      ObjectSetInteger(0,name,OBJPROP_STATE,false);
      name=(string)i;
      ChartRedraw();
      break;
     }
  } 
Puede que sí, no lo he probado.
 
Rorschach:
Puede que sí, no lo he probado.

Decidí algo diferente

static string name=NULL;
for(int i=0;i<10;i++)
  {
   bool But=ObjectGetInteger(0,(string)i,OBJPROP_STATE);
   if(but && name!=(string)i)
     {
      ObjectSetInteger(0,name,OBJPROP_STATE,false);
      name=(string)i;
      i=0;
      }
  }

No he comprobado tu última variante, pero sospecho que si se pulsa el índice del botón 10 y luego se pulsa el índice 9, entonces el índice 10 no se pulsará porque el bucle se rompe en el índice 9...