How can i add button on MT4

 

Dear Guys

How can i write code to add button like that.

 

 
Type "OBJ_BUTTON" into the search box in the Editor help and you will see an example with functions already written for you.
 
GumRai:
Type "OBJ_BUTTON" into the search box in the Editor help and you will see an example with functions already written for you.


Thanks RumRai. I am created button now.  Can you tell me how attack event into my Button.

 
void OnChartEvent(const int id, const long &lparam, const double &dparam,  const string &sparam)
   {
    if(id==CHARTEVENT_OBJECT_CLICK)
       {
        if(sparam=="MyButton")
           { ....
 
honest_knave:


Thanks.
Reason: