ChartControl.BarWidth is less than actual bar width on chart.
This code results picture below.
private void CalcBounds() { int w = indicator.ChartControl.BarWidth + 4; int x = indicator.ChartControl.GetXByBarIdx(indicator.BarsArray[0],Trade.StartBarIdx) - w / 2; ... public void Draw(Graphics graphics, Rectangle drawRect, Font fontVolText, Brush brushVolText, StringFormat sfVolText) { CalcBounds(); if (drawRect.IntersectsWith(bounds)) { graphics.FillRectangle(brush, bounds); graphics.DrawString(Trade.Volume.ToString(), fontVolText, brushVolText, bounds, sfVolText); } }
Comment