mikembb wrote:
ok, how come the onBar events are put into the queue before the orderprocessings are put into the queue?
Please help me to understand.
Market data arrive without the queue.
Queue is designed for processing the orders only.
Example of how trade is coming through framework.
1)trade comes to BarFactory.
If bar is completed it will be send(synced) to framework(process similar as trade)
2)trade comes to DataManager, to fill trade by provider/by instrument.
3)trade comes to InstrumentManager, to fill Instrument.Trade
4)trade comes to ExecutionSimulator,
order can be triggered, report can be(or nor) placed in queue and send to framework.
5)trade comes to Strategy.
At result even a single trade can trigger tree of events(eg new bar, or new execution report).