After using Quantstrat to successfully backtest a strategy, is there any way to use the same signal/indicator/rule code to generate orders for production trading?
It seems like this might be possible by using the order book, but I haven't been able to find any examples or demos that explain how to generate orders for the future using data up to the present time.
Any pointers or advice on how to accomplish this would be appreciated.
It's theoretically possible, but why would you want to? quantstrat is designed to make it easier to test ideas quickly and accurately. That's a very different problem domain than production trading. In short, use the right tool for the job.
If you really want to go this route, you would need to:
mktdata
object for each new piece of relevant market data you receive,applyIndicators
,applySignals
, andapplyRules
on the necessary subset,ruleOrderProc
(and mayberuleSignal
) to send orders to your broker.