There has to be more to your issue than just creating vertical lines that is creating the OnRender() error.
I have created a barebones strategy that only draws vertical lines and I am not receiving any errors. I have attached my code and a screenshot of a chart that demonstrates that the NinjaTrader 8 drawing objects do work properly.
If you are completely stumped with debugging your code, we could get you connected with a NinjaScript Consultant that would be happy to debug the code for you. (If that is the case, please send an email to platformsupport[at]ninjatrader[dot]com.)
Please let me know if I can be of further help.
Comment