Dear Support
I did not find any documentation of the ordering of timer and event execution.
After some investigation I found out that the timer event is executed before a onBar or onQuote event is fired. This may be not want you want.
Imagine that you want to calibrate parameters based on the market data up to say 4pm every Monday. We can set up a timer event to do this. However, if a quote comes in at exactly 4pm the standard OQ approach would be to process it in an onQuote event and possibly add it to a list of market data, which is then used by the calibration routine.
However, because the onQuote comes after the timer, the timer set at 4pm does not get that quote, which is not what you want.
I can solve this artificially by adding 1 sec to the timer event, so that I get the quote at 4pm. This however does not work anymore with tick data.
I suggest that somewhere one can set the execution order of the events and the timer. Would you please consider to add this feature in a next release as it would resolve the arbitrariness of event scheduling and adds much more transparency.
Thanks, Daniel
|