Download MetaTrader 5

Stop signal from Expert program

To add comments, please log in or register
Publish your article to let the traders see it in MetaTrader 5!
alont
29
alont 2016.01.29 08:51 

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.   

Stuart Browne
5820
Stuart Browne 2016.01.29 09:05  
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
alont
29
alont 2016.01.29 09:23  

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.  

Mohammad Soubra
25041
Mohammad Soubra 2016.01.29 09:58  
do you mean the AUTOTRADE to be disabled ???
Stuart Browne
5820
Stuart Browne 2016.01.29 10:16  
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?
alont
29
alont 2016.01.29 10:20  
Mohammad Soubra:
do you mean the AUTOTRADE to be disabled ???
yes, from the service of robots from the site of MQL signals
alont
29
alont 2016.01.29 10:21  
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

Stuart Browne
5820
Stuart Browne 2016.01.29 10:58  
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
alont
29
alont 2016.01.29 11:02  
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 

Stuart Browne
5820
Stuart Browne 2016.01.29 11:04  
alont:

thanks,

I will try it 

Please report back with your findings in case others are looking for the same answer :)
Mohammad Soubra
25041
Mohammad Soubra 2016.01.29 11:47  

Most Advanced 

good 

12
To add comments, please log in or register