Stop signal from Expert program

 

I try to control my Robot signal activities from MQL4 expert program.

I want to turn it on and off according to account equity

The closest command I found was  "TerminalClose" command.

Does anything like this exist?  

Thanks in advance.   

 
alont:

I try to control my Robot signal activities from MQL4 expert program.

I want to turn it on and off according to account equity

The closest command I found was  "TerminalClose" command.

Does anything like this exist?  

Thanks in advance.   

ExpertRemove() to totally unload your expert. But, depending on your code logic, it is usually better to set a bool, stop trading if true (using code logic) and re-check until it's false so the EA can continue trading
 

Sorry, I didn't clarify myself good enough, what I meant is to stop a Robot that I use in my account from the "Trading signals with Automatic Execution on your account" service.

 Thanks in advance.  

 
do you mean the AUTOTRADE to be disabled ???
 
alont:

Sorry, I didn't clarify myself good enough, what I meant is to stop a Robot that I use in my account from the "Trading signals with Automatic Execution on your account" service.

 Thanks in advance.  

Sorry, it's still a bit unclear what you're asking. Do you mean you want to stop a signal service from taking more trades when you reach a certain equity DD?
 
Mohammad Soubra:
do you mean the AUTOTRADE to be disabled ???
yes, from the service of robots from the site of MQL signals
 
Stuart Browne:
Sorry, it's still a bit unclear what you're asking. Do you mean you want to stop a signal service from taking more trades when you reach a certain equity DD?

Hi Stuart,

Thanks,

Yes thats exactly what I mean

 
alont:

Hi Stuart,

Thanks,

Yes thats exactly what I mean

Well, I've never played with the signal properties in code before but I would probably look at the ENUM_SIGNAL_INFO_INTEGER property SIGNAL_INFO_SUBSCRIPTION_ENABLED. I'd play with it on a demo first as it MAY cancel the subscription (there's not much about signal info in the documentation). 

 

Signal Properties - MQL4 Documentation
  • docs.mql4.com
Signal Properties - MQL4 Documentation
 
Stuart Browne:

Well, I've never played with the signal properties in code before but I would probably look at the ENUM_SIGNAL_INFO_INTEGER property SIGNAL_INFO_SUBSCRIPTION_ENABLED. I'd play with it on a demo first as it MAY cancel the subscription (there's not much about signal info in the documentation). 

 

thanks,

I will try it 

 
alont:

thanks,

I will try it 

Please report back with your findings in case others are looking for the same answer :)
 

Most Advanced 

good 

Reason: