devalpha-node icon indicating copy to clipboard operation
devalpha-node copied to clipboard

backtesting cash synchronization problem

Open unsaved opened this issue 7 years ago • 0 comments

I am not limited by startCapital. In any strategy event callback invocation where state.capital.cash > 0, I can buy as I wish to using multiple buys as long as each buy is for <= state.capital.cash. state.capital.cash goes negative.

It seems that within a single event cycle you either don't update state.capital.cash or don't check trades against the updated value.

unsaved avatar Jul 10 '18 03:07 unsaved