Hi .I copied a signal and using it , I want enable and disable Signal sometimes with Expert advisor in MQL5 .
In the days when the news is economic I don't want Signal open positions and i not have any time access to VPS for enable or disable Signal manual .
how can I select Signal in mql5?
That would be handy .
There is a signal set command here
bool SignalInfoSetInteger( ENUM_SIGNAL_INFO_INTEGER property_id, // property identifier long value // new value );
And a property :
SIGNAL_INFO_SUBSCRIPTION_ENABLED
And based on this article and libraries ,which i assume are tested ,the subscription is toggled on and off . But better safe than sorry so it should be tested.
from the article :
there are also users who report an error but they might have had the allow modification of signals unchecked , or , the author has not tested his library. But its a published article and mq checks them . So odds are good . Here in the article he subscribes first and then sets copying deals by subscription.
and this call leads to this function with a true flag
bool CMQLSignalsCollection::CurrentSetSubscriptionEnabledFlag(const bool flag) { ::ResetLastError(); if(!::SignalInfoSetInteger(SIGNAL_INFO_SUBSCRIPTION_ENABLED,flag)) { CMessage::ToLog(DFUN,::GetLastError(),true); return false; } return true; }
Hi .I copied a signal and using it , I want enable and disable Signal sometimes with Expert advisor in MQL5 .
In the days when the news is economic I don't want Signal open positions and i not have any time access to VPS for enable or disable Signal manual .
how can I select Signal in mql5?
That's not possible.
When you subscribe to a signal you should follow the signal as a whole. Or just don't subscribe.
Any attempts to control of filter the trades you want to "copy" will result in a mess and worsen things.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi .I copied a signal and using it , I want enable and disable Signal sometimes with Expert advisor in MQL5 .
In the days when the news is economic I don't want Signal open positions and i not have any time access to VPS for enable or disable Signal manual .
how can I select Signal in mql5?