Currently I am using below
ChartControl.Properties.BarMarginRight = 100;
for right margin, but I am rending by
RenderTarget.DrawLine(start.ToVector2(), end.ToVector2(), DXBrush, 2);
but if I scroll the chart to left, it keeps plotting the line even after the current bar. how can I stop that plotting the current bar?
second, i am also rendering below line on the same script by
public double EndPrice;
kvp.Value.EndPrice = chartScale.GetValueByY(extPoint.ToVector2().Y);
Point endPt = new Point();
endPt.X = chartControl.GetXByBarIndex(ChartBars, CurrentBars[0]);
endPt.Y = chartScale.GetYByValue(kvp.Value.EndPrice);
RenderTarget.DrawLine(startAdj.ToVector2(), endPt.ToVector2(), Other.BrushDX, Other.Width, Other.StrokeStyle);
for this line, it does not plot to the right of margin, but it its right end moves ie, it does not stays at the same point, thus it overlaps candles on chart. I want to keep it on the same place regardless, if I scroll left.
Any help will be appreciated.

Comment