Download MetaTrader 5

How can I programmatically cancel/suspend signal subscription or block a specific fund in my account?

To add comments, please log in or register
Samer Gowid
1223
Samer Gowid  

Hi

I would like to know whether it is possible to suspend/ cancel a signal programmatically. This is a very important function that should be included as the signal keeps opening trades even after you close its current positions. the only way is to suspend or to cancel the subscription before you close all opened trades. I would also like to know if there is function that can block a specific amount in my account so that this amount will not be available for trading.

Thank you in advance.


Kind regards, 

Marco vd Heijden
Moderator
6136
Marco vd Heijden  

Yes

1 is called:

TERMINAL_TRADE_ALLOWED

and 2 is called:

withdrawal
Although 2 needs to be done manually for security reasons.
Samer Gowid
1223
Samer Gowid  
Marco vd Heijden:

Yes

1 is called:

and 2 is called:

Although 2 needs to be done manually for security reasons.

Thank you very much for your reply. I need a code/function that can stop/pause a signal subscription programmatically. The code provided above is for EA and scripts and not for signals. Please correct me if i am mistaken. 

Stuart Browne
6926
Stuart Browne  
Samer Gowid:

Thank you very much for your reply. I need a code/function that can stop/pause a signal subscription programmatically. The code provided above is for EA and scripts and not for signals. Please correct me if i am mistaken. 


SignalUnsubscribe

Cancels subscription.

bool  SignalUnsubscribe();

Returned value

Returns true if subscription has been canceled successfully, otherwise returns false. To read more about the error call GetLastError().



See here for the rest of MQL4 signals functions

To add comments, please log in or register