Download MetaTrader 5

How can i add button on MT4

To add comments, please log in or register
Mohammad Ali
21230
Mohammad Ali  

Dear Guys

How can i write code to add button like that.

 

Keith Watford
Moderator
10561
Keith Watford  
Type "OBJ_BUTTON" into the search box in the Editor help and you will see an example with functions already written for you.
Mohammad Ali
21230
Mohammad Ali  
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.

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


Thanks.
To add comments, please log in or register