Enter FOK orders simultaneously

Posted By: AndrewAMD

Enter FOK orders simultaneously - 11/24/20 14:33

jcl,

Currently, for FOK orders, the BrokerBuy2 API requires that the plugin returns the final fill status. But this means that the plugin blocks for the result on order placement. This wastes precious time that could be use for placing more orders (such as in a large portfolio) or making new calculations.

I don't see why this blocking behavior is necessary. Why not allow FOK orders to be placed simultaneously without blocking? Either BrokerTrade() or callbacks (or both) should be a fine way to give Zorro an order fill update. Something to answer the question, "was this order filled or killed?"

Thanks,
Andrew
Posted By: jcl

Re: Enter FOK orders simultaneously - 11/25/20 10:55

That's already possible on the Zorro side, but AFAIK not yet supported by plugins.

In stead of 2 simultaneous FOK orders, send 2 AON+GTC orders, wait some predefined time, then check the fill with BrokerTrade and send a DO_CANCEL command when not filled.

This requires from the plugin support of GTC, DO_CANCEL, and BrokerTrade.
© 2024 lite-C Forums