I've been struggling to find the right most bar index.
ie. If the last price is on the right side of the chart, right most index is 0.
ie. If the user scrolls back in time, so the 10th bar is on the right side, it will return 10.
Tried:
chartMaxBars = ChartBars.ToIndex;
chartWidthPixels = myChartScale.Width ;
rightMostPixel = chartWidthPixels - 1;
rightMostIndex = ChartBars.GetBarIdxByX(ChartControl, Convert.ToInt32(rightMostPixel));
Comment