Skip to content
Prev 14988 / 15274 Next

Quantstrat Position Accounting System: Netting vs Hedging Systems

The chained order quantity isn't directly passed to the triggered chain
rule right now.

Rules have access to the full current state, since they are path
dependent.  

So, you have two options here.  You can either?

- write a custom order sizing function that queries the order status to
check the chained rule and order to get the quantity

- propose a patch/pull request to rules.R and ruleSignal.R that could
process a chain.qty optional argument

see the code in rules.R to see how we pass chain.price, and it should
inform how you would take either of the above approaches.

Regards,

Brian