Skip to content
Prev 8601 / 15274 Next

Quantstrat Delayed Execution

I'd like some guidance on how to use quantstrat to execute an order some number of bars after the signal - typically the next bar. The default seems to be to execute on the same bar as the signal. 

I have read a few threads that seem to indicate the "delay" function is a) designed more for intra-day data or b) hasn't yet been well tested. One solution suggested was to lag the signal but I haven't been able to get that to work.  I've spent some time trying to understand the workflow to see how to modify a function to do what I'd like. However, I'm having trouble understanding the work flow. So far I have been able to track the following: applyStrategy calls applyRules which in turn calls ruleProc or ruleOrderProc which calls addOrder [at least in some instances].

I'm not sure I've got the workflow correct. So one question is - is there a map or some type of development tool - or entity-relationship diagram available? However, the main question is - what is the recommended or best way to manage order execution timing?


Thanks
Dan Avery