Signal Substription via Expert Advisor doesn't synchronise on Start of Substription

 

Hello,

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

Dustin 

 

 

Her is my EA-Code:

 

 int OnInit()

  {

   string nLastError;


   bool status = SignalSubscribe(166745);

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

   Print("Subscribe: ", status);

   

   SignalInfoSetInteger(SIGNAL_INFO_CONFIRMATIONS_DISABLED,1);

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

   

   SignalInfoSetInteger(SIGNAL_INFO_COPY_SLTP,1);

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

   

   SignalInfoSetInteger(SIGNAL_INFO_DEPOSIT_PERCENT,45);

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

    

   SignalInfoSetInteger(SIGNAL_INFO_SUBSCRIPTION_ENABLED,1);

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

   

   SignalInfoSetInteger(SIGNAL_INFO_TERMS_AGREE,1);

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


   return(INIT_SUCCEEDED);

  }