Download MetaTrader 5

How to Disable / Enable Expert programmably ? - page 2

To add comments, please log in or register
whroeder1
14780
whroeder1  
Shantappa Kapase: But I want to Re-Enable it, How to do it..?
You stopped the EAs, they are not running, therefor you can't add any code to start them.
Shantappa Kapase
272
Shantappa Kapase  
alphatrading:

Opposite to all the denying postings here this has been possible *from* MQL since more than 10 years (not *with* pure MQL). To re-enable disabled experts just call the function again.

In fact the command toggles the EA status: enabled => disabled => enabled => disabled and so on.


Hello,

You are correct, the command toggles the EA status: enabled => disabled => enabled => disabled and so on.

I want, disable the Button only if it Enabled. or vice versa.

Thnx!

Shantappa Kapase
272
Shantappa Kapase  
wadi2014:

Hello

I want to Disable / Enable Expert (Auto Trading) button programmably as if i click on it to enable or disable Expert according to condition. I am searching MQL4 code to do that but i did not find.

Any help please.


Hello, 

Regarding the Enable/Disable the Expert Button on MT4.

I want Disable the Button only if Its Already Enabled.

The Function 

PostMessageA(main, WM_COMMAND,  MT4_WMCMD_EXPERTS,0);

Only toggles like Enable->Disable->Enable->Disable.

I dont want toggle, want to Disable the Button only if Its Already Enabled.


Thanking you.!
whroeder1
14780
whroeder1  
Shantappa Kapase: I dont want toggle, want to Disable the Button only if Its Already Enabled.
You already know that it's enabled -- the code is running. After you disable it, nothing will run again.
Alain Verleyen
Moderator
31184
Alain Verleyen  
whroeder1:
You already know that it's enabled -- the code is running. After you disable it, nothing will run again.
This is not exact, enable/disable only concern trading operations, for all the rest EA is continuing to run.
12
To add comments, please log in or register