I found the solution:

In your broker API code, within your implementation of the function BrokerCommand(int nCommand, DWORD dwParameters), convert the argument dwParameters to an hexadecimal pointer address:

char hex[10];
sprintf(hex, "%x", dwParameters );
TRADE* trades = (TRADE*)strtoul(hex, NULL, 16);

Then fill the trades array with the trades you will have loaded from the broker.

Important: remember to set the structure alignment of your code to 4 as mentioned in Zorro documentation in Broker / Feed Plugin.
In Visual Studio 2017, go to your project properties, then under C/C++ Code Generation set Struct Member Alignment to 4.

Finally from Zorro call during INITRUN:
int npos = brokerTrades(0);

And check your broker API code works:
for(open_trades)
{
printf("\nTradeID number %d is loaded", TradeID);
}


Last edited by byakuren81; 03/06/22 20:13.