PDA

View Full Version : ChartControl.LastBarPainted is always -1


sbgtrading
10-19-2009, 06:43 PM
I know this is in the Plot method...but I hope it's supported...

The attached code is prints out the ChartControl.LastBarPainted...and for some reason ChartControl.LastBarPainted is always "-1"...even if CurrentBar is a huge number (like 23000).

NinjaTrader_Dierk
10-19-2009, 08:25 PM
Please take a look e.g. at the @Pivots.cs implementation.

for (int idx = this.LastBarIndexPainted; idx >= Math.Max(this.FirstBarIndexPainted, this.LastBarIndexPainted - Width); idx--)