do while loop

 

I must be going blind.... why does this code cause my MT4 platform to hang? I'm assuming an infinite loop.... but the code looks good to me.... please help....THanks!


#property indicator_chart_window

//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
{

int b=1;
   do
      {
       Alert(" b=",b);
       b=b++;
      }
   while(b<10);
     
     
return(0);

}

 

This is your problem:

b=b++;

 

It should be:

b++;

 

or

b=b+1;

 

or

b=++b;


or

b+=1;
Reason: