Download MetaTrader 5
To add comments, please log in or register
Having troubles understanding the code? Perhaps, you can find an article on that topic!
Dustin.N 2016.02.22 13:44 


i want to subscribe to a signal out of an EA.

I got it working, BUT after "Subscription enabled" (see the attached screenshot) the subscribed Signal doesnt sync the opened Positions :(

He did not even connect to the Signal Server! In this state he did not recognise trading actions from Provider.


For Example, when i am in this state (see screenshot) and plug off and plug in my LAN cable, then MT4 connects to the Signal-Server and does sync the opened positions.


How ca i tell my EA, that he should connect to Signal Server and sync after subscription immediately?


kind regard




Her is my EA-Code:


 int OnInit()


   string nLastError;

   bool status = SignalSubscribe(166745);

   Print("Error : "+GetLastError());

   Print("Subscribe: ", status);



   nLastError = GetLastError();    Print("SIGNAL_INFO_CONFIRMATIONS_DISABLED: ",ErrorDescription(nLastError));



   nLastError = GetLastError();    Print("SIGNAL_INFO_COPY_SLTP: ",ErrorDescription(nLastError));



   nLastError = GetLastError();    Print("SIGNAL_INFO_DEPOSIT_PERCENT: ",ErrorDescription(nLastError));



   nLastError = GetLastError();    Print("SIGNAL_INFO_SUBSCRIPTION_ENABLED: ",ErrorDescription(nLastError));



   nLastError = GetLastError();    Print("SIGNAL_INFO_TERMS_AGREE: ",ErrorDescription(nLastError));



To add comments, please log in or register