Uma tarefa com botões ! - página 8

 
Também uma opção. Só que você não precisa criá-los em cada carrapato.
 
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;
     }
  }
Se os nomes dos botões não forem números, então coloque os nomes em uma matriz.
 
Rorschach:
Se os nomes dos botões não forem números, então os nomes serão armazenados em uma matriz.
O botão anterior permanece pressionado até a chamada do próximo ciclo ...
 

Eu não sei se esta é a abordagem correta, mas resolve o 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;
     }
  } 
Talvez sim, ainda não o tenha experimentado.
 
Rorschach:
Talvez sim, ainda não experimentei.

Eu decidi um pouco 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;
      }
  }

Não verifiquei sua última variante, mas suspeito que se o botão índice 10 for pressionado e depois o índice 9 for pressionado, então o índice 10 não será pressionado porque o laço está quebrado no índice 9...