Error on calling the 'OnBarUpdate' method for indicator 'ProfitLine' on bar 0: Object reference not set to an instance of an object.
The very first stmt in the 'OnBarUpdate' method is :
if (Bars == null || CurrentBar < 500) return;
so I never reference any indicator until after that. Unfortunately I do not control the ProfitLine code -- however, the indicator plots on a chart without problem. But I want to reference it in code. Help?
Comment