quick channel send and receive

 

does anyone know how to send and receive data between brokers using quick channel?

does it happen on the same channel name? or do you have 2 channels?

I have an ea sending information going one direction, now I need to respond back to the 1st broker.

Example: Broker 1 ea sends Broker 2 ea current Ask and Bid prices.

if Broker 2's Ask is below Broker 1's Bid it needs to send Broker 1 a signal to execute an order.

Is the return message done on the same channel? It says it can be done by the same ea, but I can't figure out how.

Thanks anyone.

 

One channel per communication direction. for a two-way communication you need 2 channels.

just take care to not end up in an infinite loop (ie. EA1 sends a message to EA2, EA2 now immediately responds back to EA1, now EA1 again responds to this message and so on so on...)

Write yourself a most simple and easy communication "protocol", the more simple the better. if you need to implement complex message have a look at the FIX protocol, it's open source. in effect, there's not a big difference between a FIX or quick channel communication. FIX is a good example for how to encode different messages of different complexity in a string command.

don't rely on the MT4 Print() function for logging/debugging. Use DbgView and win32 calls to OutputDebugStringA(string lpMessage).

regards

 
paulepanke:

One channel per communication direction. for a two-way communication you need 2 channels.

just take care to not end up in an infinite loop (ie. EA1 sends a message to EA2, EA2 now immediately responds back to EA1, now EA1 again responds to this message and so on so on...)

Write yourself a most simple and easy communication "protocol", the more simple the better. if you need to implement complex message have a look at the FIX protocol, it's open source. in effect, there's not a big difference between a FIX or quick channel communication. FIX is a good example for how to encode different messages of different complexity in a string command.

don't rely on the MT4 Print() function for logging/debugging. Use DbgView and win32 calls to OutputDebugStringA(string lpMessage).

regards

I got it to work... thanks

 

Hello :)

I'm trying to send and receive a simple message using QuickChannel, i made a sender EA and a receiver, but it didn't work, now I'm gonna find problems

this is my sender code:

#import "FXBlueQuickChannel.dll"
   int QC_StartSenderW(string);
   int QC_ReleaseSender(int);
   int QC_SndMessageW(int,string,int);
   int QC_StartReceiverW(string,int);
   int QC_ReleaseReceiver(int);
   int QC_GetMessage5W(int, uchar&[],int);
   int QC_CheckChannelW(string);
   int QC_ChannelHasReceiverW(string);
#import


extern string  ChannelName = "channel1";

string handle;

// EA initialisation.
void init()
{
  
   QC_StartSenderW(handle);
   start();
  
}


void deinit()
{
   handle=QC_ReleaseSender(ChannelName);
 
}


void start()
{

   QC_SndMessageW(handle,"I am sender",1);
   Alert("hello");                      //---------------------------------------This line doesn't run -----------------------------------

}  

Why the Alert never execute! can you tell me what is wrong with my sender EA firs?

 
  1. Don't paste code
    Play video
    Please edit your post.
    For large amounts of code, attach it

  2. Do you have a receiver running? They can't both be sending at the same time.