How to toggle/blinking Text Colors

 
How to toggle or make a blinking Object or to oscillate colors or something ?  
Is this possible or does the code just read so fast that it wouldn't be noticed ? 
I can see doing a counter of some type but I don't want to hold up reading of the rest of the code either. 

Is there such a thing ? Or has anyone done this ? 

Example for illustration:
   if(histo()) ObjectSetText("B10","BUY",12,"Arial",clrGreen);
   else ObjectSetText("B10","BUY",12,"Arial",clrBlack);
   if(!histo()) ObjectSetText("B11","SELL",12,"Arial",clrRed);
   else ObjectSetText("B11","SELL",12,"Arial",clrBlack);


Let's say I want to blink or oscillate color for B10 and not just change from Green to Black but instead blink Green/Red on/off for a few seconds first before changing to Green or Black.

Is counting recommended or bad idea ? 
Thanks


 
Agent86:
How to toggle or make a blinking Object or to oscillate colors or something ?  
Is this possible or does the code just read so fast that it wouldn't be noticed ? 
I can see doing a counter of some type but I don't want to hold up reading of the rest of the code either. 

Is there such a thing ? Or has anyone done this ? 

Example for illustration:


Let's say I want to blink or oscillate color for B10 and not just change from Green to Black but instead blink Green/Red on/off for a few seconds first before changing to Green or Black.

Is counting recommended or bad idea ? 
Thanks


use 

void OnTimer();

https://docs.mql4.com/basis/function/events

Event Handling Functions - Functions - Language Basics - MQL4 Reference
Event Handling Functions - Functions - Language Basics - MQL4 Reference
  • docs.mql4.com
Event Handling Functions - Functions - Language Basics - MQL4 Reference
 

Thanks, 

Took me a little reading but I see it now. 

I never used this feature so didn't realize how this was used. 
Thanks again. 

Reason: