Is there any way prevent user click on OBJ_BUTTON or disable OBJ_BUTTON on mql4?

Hello,

I have create button by OBJ_BUTTON. I want to prevent user click on button in some case.

Is there any way for enable/disable button click on MQL4?

Thank in advance!

Minh Truong Pham:

Hello,

I have create button by OBJ_BUTTON. I want to prevent user click on button in some case.

Is there any way for enable/disable button click on MQL4?

Thank in advance!

You could hide it with 

ObjectSetInteger(ChartID(),name,OBJPROP_TIMEFRAMES,OBJ_NO_PERIODS);

Or you could place a curtain above it (a blank bitmap for instance)

  1. Hide it
  2. cover it
  3. delete it
  4. Ignore clicks on it.
Lorentzos Roussos #:

You could hide it with 

Or you could place a curtain above it (a blank bitmap for instance)

Thank. I will try to hide it.