How to move text label on click

 
I have OBJ_LABEL containing text. How I can make it move a few pixels right and down on CHARTEVENT_OBJECT_CLICK, then return back, to imitate click. 
 

Use the

ObjectMove();

Function.

Or you can use the 

ObjectSetInteger();
//+------------------------------------------------------------------+ 
//| Move the text label                                              | 
//+------------------------------------------------------------------+ 
bool LabelMove(const long   chart_ID=0,   // chart's ID 
               const string name="Label", // label name 
               const int    x=0,          // X coordinate 
               const int    y=0)          // Y coordinate 
  { 
//--- reset the error value 
   ResetLastError(); 
//--- move the text label 
   if(!ObjectSetInteger(chart_ID,name,OBJPROP_XDISTANCE,x)) 
     { 
      Print(__FUNCTION__, 
            ": failed to move X coordinate of the label! Error code = ",GetLastError()); 
      return(false); 
     } 
   if(!ObjectSetInteger(chart_ID,name,OBJPROP_YDISTANCE,y)) 
     { 
      Print(__FUNCTION__, 
            ": failed to move Y coordinate of the label! Error code = ",GetLastError()); 
      return(false); 
     } 
//--- successful execution 
   return(true); 
  } 
//+------------------------------------------------------------------+ 
Documentation on MQL5: Constants, Enumerations and Structures / Named Constants / Predefined Macro Substitutions
Documentation on MQL5: Constants, Enumerations and Structures / Named Constants / Predefined Macro Substitutions
  • www.mql5.com
//| Expert initialization function                                   | //| Expert deinitialization function                                 | //| Expert tick function                                             | //| test1                                                            |...