Buttons MQL5

 

Hello,


i trade since long time with ipad and VPS server, in this case i had generated few button but the dont work as i wont.

When i press the button, it always looks pressed till the next time.  



attached you find the code, maybe someone have an idea how the problem ist

 

yes you have to reset :

OBJPROP_SELECTED

In OnChartevent() function.

https://www.mql5.com/en/docs/constants/objectconstants/enum_object_property

Documentation on MQL5: Standard Constants, Enumerations and Structures / Objects Constants / Object Properties
Documentation on MQL5: Standard Constants, Enumerations and Structures / Objects Constants / Object Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Objects Constants / Object Properties - Reference on algorithmic/automated trading language for MetaTrader 5
 
Marco vd Heijden:

yes you have to reset :

In OnChartevent() function.

https://www.mql5.com/en/docs/constants/objectconstants/enum_object_property


how you mean to reset? do you have an code example?


amando

 
amando:

how you mean to reset? do you have an code example?


amando

If you look at the link there is a code example below the documentation, this is usually the case.

      //--- reset button state
      ObjectSetInteger(0,sparam,OBJPROP_SELECTED,false);