I've run through and changed all the code. The file now compiles. I can run it on a chart but nothing shows on the chart and I get an Output error:
Indicator '____John Elhers SineWave-NT8': Error on calling 'OnBarUpdate' method on bar 3: Object reference not set to an instance of an object.
I've identified the general area of the error in the code but can't find a solution. I've commented it in green in the code (if (CurrentBar < 3) return ; ///////THIS SEEMS TO BE RELATED TO THE ERROR)
The indicator should paint support and resistance lines on the chart plus a crossover sinewave in the second panel.
I also can't get the plots to show up in the Properties of the indicator. (to select color, type and size of plot line). I've compared it to another indicator that does work but am stumped.
I've included the indicator code for whomever has the time to help. Would really appreciate it.
Comment