button activation mql4

 
Good morning, on the mt4 platform I have an expert and an indicator attached to a chart (both without source code).

My expert shows two buttons on the chart, one buy and one sell, which are activated and deactivated with a mouse click.

I would like to understand if it is possible to simulate an automated click on the expert, enabling or disabling the buy or sell button,

in relation to the trend that the indicator provides me (with an up or down writing). 

Hoping to have been clear enough and to be in the right section of the forum, thank you in advance.

Peter
 
Your topic has been moved to the section: MQL4 and MetaTrader 4
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
 
Pietro_1977:
Good morning, on the mt4 platform I have an expert and an indicator attached to a chart (both without source code).

My expert shows two buttons on the chart, one buy and one sell, which are activated and deactivated with a mouse click.

I would like to understand if it is possible to simulate an automated click on the expert, enabling or disabling the buy or sell button,

in relation to the trend that the indicator provides me (with an up or down writing). 

Hoping to have been clear enough and to be in the right section of the forum, thank you in advance.

Peter

Yes, you can modify button states using code. You can get the button's name and then use ObjectSetInteger with the OBJPROP_STATE property. But, I'm still unsure whether this approach is a practical solution...