Two lines of code - first is working, the second not?! The only difference is the Brush from ChartControl properties:
Draw.Text(this, "ssLabel" + CurrentBar.ToString(), TrendValue().ToString(), 0, Highs[0][0] + (5 * TickSize), Brushes.Black); //Draw.Text(this, "ssLabel" + CurrentBar.ToString(), TrendValue().ToString(), 0, Highs[0][0] + (5 * TickSize), ChartControl.Properties.ChartText);
Error on calling 'OnBarUpdate' method: on bar 147: object reference not set...
Why at bar 147, all my object references are fine except the Brush? Any hints or help would be appreciated!
Thank you,
Momchil

... Conditioning the text drawing to the main series of bars did not help. The missing reference error is the first bar where the code calls the procedure to place a label. If I use a const brush like Brushes.Black - it always works, but my goal was to use the chart properties for the size of the text/labels. Is this the only way to get it?
Comment