I need this in order to dynamically calculate quantity of stock shares when entering into new trades. I would like the size of orders to be proportional to running total value of the account during the backtest.
Any code samples are greatly appreciated.
I tried using the OnExecution(IExecution execution) but it doesn't seem to be called when backtest is running.
Please help.
Comment