The problem is I am trying to act as a market maker only to benefit from zero commission. The strategy is built on that. I'm sending post-only orders through the broker plugin to the exchange that either get rejected because they would act as taker orders or the plugin waits for the order to get filled. It will repost rejected orders or wait until a maximum timeout has passed and then return 0 if the order wasn't filled in time.

So the plugin has to "work" to get fills, which can take some time. E.g. on 1 min bars, I can't wait longer than that for an order to get filled. If I send two separate orders the process must happen twice within the bar duration, increasing the chance that orders are missed, or at least making the order process more complicated.


Originally Posted by jcl
Yes, it iterates over all open trades and calculates the open profit from scratch. The closed profit only changes when a trade is closed.


Thank you, that is good to know. But the same probably does not apply to the array of balances Zorro uses to draw the equity curve. Can you tell me how this is handled? Based on my experience it looks like this value is adjusted with spread/commission/slippage immediately upon the enterLong() call, before I can modify any values of the trade struct.