Quick Channel is Not Functioning As Expected

 

Dears,


I have been trying to achieve this one-way communication between two sperate account in two different brokers..

I even tried to make those two accounts within the same broker but still no feed is being sent through, not even the error messages being displayed. 


Sender 

#import "FXBlueQuickChannel.dll"
   int QC_StartSenderW(string);
   int QC_ReleaseSender(int);
   int QC_SendMessageW(int, string&, int);
#import

int glbHandle = 0;

void OnInit()
{
   glbHandle = QC_StartSenderW("TestChannel");
}

void OnDeinit(const int reason)
{
   QC_ReleaseSender(glbHandle);
   glbHandle = 0;
}

void OnTick()
{
   string strMsg = "Hello @ " + TimeToStr(TimeCurrent());
   if (!QC_SendMessageW(glbHandle, strMsg , 3)) {
      Print("Message failed");
   }
}

Receiver

#import "FXBlueQuickChannel.dll"
   int QC_StartReceiverW(string, int);
   int QC_ReleaseReceiver(int);
   int QC_GetMessages5W(int, uchar&[], int);
#import

#define QC_BUFFER_SIZE     10000

int glbHandle = 0;
uchar glbBuffer[]; // Allocated on initialisation

void OnInit()
{
   // Do initialisation in OnTick (or OnStart), not in OnInit()
}

void OnDeinit(const int reason)
{
   if (glbHandle) QC_ReleaseReceiver(glbHandle);
   glbHandle = 0;
}

void OnTick()
{
   // Create handle and buffer if not already done (i.e. on first tick)
   if (!glbHandle) {
      glbHandle = QC_StartReceiverW("TestChannel", WindowHandle(Symbol(), Period()));
      ArrayResize(glbBuffer, QC_BUFFER_SIZE);
   }

   if (glbHandle) {
      int res = QC_GetMessages5W(glbHandle, glbBuffer, QC_BUFFER_SIZE);
      if (res > 0) {
         string strMsg = CharArrayToString(glbBuffer, 0, res);
         Print(strMsg);
      }
   } else {
      Print("No handle");
   }
}
 

Would appreciate a hint here or there.. 

 
mnsr94 2021.09.20 05:00 Would appreciate a hint here or there.. 

When did you try? The FX market was closed until Sunday 5PM EDT (NY). No ticks, no send.