Closed irperez closed 6 years ago
The null reference happens because a sell signal is discovered before a buy signal, getting the open of the last transaction will throw null reference exception
@lppkarl so did I do something wrong here? How do I prevent this from occurring? Or do we need to do a null check before processing the sell signals?
Nope, you're not doing wrong. I've commited code to fix the issue this morning.
@lppkarl I believe I found a bug. NullReferenceException in backtesting. Maybe I'm doing something wrong?
If I am doing something wrong, maybe we need validation. Otherwise I think this is valid scenario, no?
Here is my sample.