Change text of an object on every second by OnTimer?

[Deleted]  
// where ProfitLabel is the object name
void OnTick(){
       
    ObjectSetString(chart_ID,"ProfitLabel",OBJPROP_TEXT,DoubleToStr(profit,2));
}
Karish  

sorry i edited the OnTick to OnTimer, please help, it support to be OnTimer...!

William Roeder  
  1. OnTick or OnTimer is irrelevant. You must set the text. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
  2. string text = "12345";
    string curr = ObjectGetString(chart_ID,"ProfitLabel",OBJPROP_TEXT);
    int    len  = (StringLen(curr) % StringLen(text)) + 1;              // 1->2->3->4->5->1
    string next = StringSubstr(text, 0, len);                           // "1","12"...
    ObjectSetString(chart_ID,"ProfitLabel",OBJPROP_TEXT, next);

Karish  

@WHRoeder, thank you for your help, i understand, but the function "OnTimer()" is new for me..,

 

i'm just trying to make a simple text change every 1 second.., like so for example:

"."

".."

"..."

"...."

"....."

and then the text will return to the first text in a loop and so on every 1 second... 

 

please help..., thank you..! 

Keith Watford  
   static string text=".";
   if(text=="......")
      text=".";
   //Set the text in the object
   text+=".";

.

Karish  
Thanks!!