need help...

 

hello guys.. could you help me how to stop counting of  ++  to a certain count...    

   if(Bid<ma) SARup++;

   if(SARup>4) SARup=0;

 but after it become 0 it count again.. i want  the rest of ++ to become zero.

 thanks guys appreciated your help. 

 
Don't reset it to zero. Leave it at 5 until you want it to start counting again.
   if(SARup < 5 && Bid < ma) SARup++;

 
WHRoeder:
Don't reset it to zero. Leave it at 5 until you want it to start counting again.


 it work, but its stuck on 5.. how can i make it count again? 

   if(SARup>5 && Bid<ma) {SARup++; SARdown=0;}

   if(SARdown>5 && Bid>ma) {SARdown++; SARup=0;} 

   THANKS..

   

 
Your first code snippet looks correct for your task. It increments SARup on Bid < ma and resets the counter if SARup reaches 4. Why it is not working for you?
 
enivid:
Your first code snippet looks correct for your task. It increments SARup on Bid < ma and resets the counter if SARup reaches 4. Why it is not working for you?

i need to stop the counting of ++ to 5, and all the rest count of ++ must be any number so that the count will not continue. but on my code both stuck on 5. 
 
thanks guys i found new solution... i add bool (true or false).
Reason: