ruleOrderProc(portfolio, symbol, mktdata, timestamp = NULL, ordertype = NULL, ..., slippageFUN = NULL)
This function would need to be revised or replaced for
connection to a live trading infrastructure. In a
production mode, you would replace the
addOrder
function with a custom function to
connect to your market infrastructure. In that case, you
might need to add additional code to your strategy, or
overload functions for checking position.
Note that this function is called by default in the
'orders' slot of the applyRules
processing.
If you have defined another order processing rule, it will
replace this function. If you want your custom
order rule and ruleOrderProc to both be called, you will
need explicitly add a rule to call ruleOrderProc either
before or after your custom order processing function.
We would like to model slippage here via
slippageFUN
. Code contributions, suggestions, and
requests appreciated.
applyRules
getOrderBook
addOrder
updateOrders