Download MetaTrader 5
To add comments, please log in or register
Looking for like-minded people? You will find lots of them on the Forum!
Francis
23
Francis 2015.10.26 01:14 
(Please, some patience because I just started in MQL.)
On the chart I put an OBJ_BITMAP_LABEL, which has two states: on and off. When I click the image changes (img1 in img2 or img2 in img1), and so on.
But the key-thing for me is: how to launch a script when I click?
I searched the internet but I found nothing.
Thank Guys

Francis

 

 

Keith Watford
Moderator
7869
Keith Watford 2015.10.26 03:27  
   if(sparam=="Reset Button" && ObjectGetInteger(0,"Reset Button",OBJPROP_STATE)==true)
     {
      if(ReSet())
      ObjectSetInteger(0,"Reset Button",OBJPROP_STATE,false);
     }

Here's an example of what I do in OnChartEvent (Object Clicked) with a button object.

The function ReSet()  returns a bool when complete and so the button is un-clicked automatically. 

/
To add comments, please log in or register