Now I an attempting to move the vertical lines of the rectangle to the outside edge of the bar as opposed to NT default drawing them in the middle of the bar. I have uploaded an image for a visual.
The latest attempt at this is:
//MyAnchor.MoveAnchorX(lastPoint, newPoint, chartControl, chartScale);
double barPixelWidth = chartControl.GetBarPaintWidth(chartControl.BarsArray[0]);
NinjaTrader.Code.Output.Process(string.Format("barPixelWidth {0} ", barPixelWidth ), PrintTo.OutputTab1);
Point lastPoint = StartAnchor.GetPoint(chartControl, chartPanel, chartScale) ;
NinjaTrader.Code.Output.Process(string.Format("lastPoint {0} ", lastPoint ), PrintTo.OutputTab1);
double newX = lastPoint.X - barPixelWidth;
NinjaTrader.Code.Output.Process(string.Format("newX {0} ", newX ), PrintTo.OutputTab1);
Point deltaPoint = new Point(newX, lastPoint.Y);
NinjaTrader.Code.Output.Process(string.Format("lastPoint {0} deltaPoint {1}", lastPoint, deltaPoint ), PrintTo.OutputTab1);
StartAnchor.MoveAnchorX( lastPoint, deltaPoint, chartControl, chartScale);
barPixelWidth 25
lastPoint 262.5,782.5
newX 237.5
lastPoint 262.5,782.5 deltaPoint 237.5,782.5
Thanks.
Comment