I would like to request that a new BrokerCommand SET_TRIGGER_PIPE be supported by Zorro. Below is my explanation.

The broker API is synchronous in nature. I am proposing a basic way for Zorro to set up a dedicated asynchronous listener, so that a plugin can request a BrokerAsset call for a specific Asset.

Command: SET_TRIGGER_PIPE
Text/Parameter: PipeName (f.i. "\\.\pipe\PipeName")

Sets the name of an existing named pipe. Zorro will create the named pipe and asyncronously listen to it. The plugin will write to the pipe using the Trigger Protocol defined below. Return Value: the version number of the Trigger Protocol supported, or zero if not supported.


Proposal for Trigger Protocol (Version 1):

The protocol will consist entirely of fixed-size messages. Each message will be exactly 128 bytes. The message will contain a null-terminated string.

The message struct:

Code:
typedef struct TRIGGER_V1
{
	char Asset[128];
} TRIGGER_V1;


Here's how it works:

* Plugin has a dedicated listener.
* Plugin receives market data.
* Plugin sends Asset name to pipe.
* Zorro calls BrokerAsset() for the specified Asset.

On the Zorro side, instead of sleeping for TickTime between BrokerAsset calls, there can be a listener with a timeout of TickTime. This way, no multithreading is required.

And that's it. No need to rewrite the broker API from scratch in order to support pushing market data.