MQL4 OnChartEvent Issue

 

Hi,

i have problem with OnChartEvent specially with CHARTEVENT_OBJECT_CLICK.

For me it's strage what happen.

With an indicator a create 3 different button in separate window. If i load the indicator for the first time the Function  CHARTEVENT_OBJECT_CLICK work perfectly with it but :

If i change TF of the chart where is loaded the Indicator loaded on the chart the Function CHARTEVENT_OBJECT_CLICK don't work whit these 3 button.

If i load another Symbol on the chart where is loaded the indicator the Function CHARTEVENT_OBJECT_CLICK don't work whit these 3 button.

 I use the &sparam costant for the OnChartEvent and CHARTEVENT_OBJECT_CLICK.

Sorry for my English.

Someone can help me? 

 

Do any other chart objects overlap the buttons? Try changing the z-order of your buttons:

 

OBJPROP_ZORDER

Priority of a graphical object for receiving events of clicking on a chart (CHARTEVENT_CLICK). The default zero value is set when creating an object; the priority can be increased if necessary. When applying objects one over another, only one of them with the highest priority will receive the CHARTEVENT_CLICK event.

long

 
honest_knave:

Do any other chart objects overlap the buttons? Try changing the z-order of your buttons:

 

OBJPROP_ZORDER

Priority of a graphical object for receiving events of clicking on a chart (CHARTEVENT_CLICK). The default zero value is set when creating an object; the priority can be increased if necessary. When applying objects one over another, only one of them with the highest priority will receive the CHARTEVENT_CLICK event.

long

 

Hi, thank you for the reply. There aren't other object that overlap the buttons also because there are other buttons, create from the same indicator and with the same funtion, that work perfecly also if i change tf or symbol. The problem there is only with the 3 buttons.
 
Sorry i found the error. I did a mistake in deinit when delete theese 3 buttons. Now i delete correctly the 3 button and it work perfectly
 
I'm glad you got it sorted
Reason: