I have not tested this with trendlines etc. but perhaps they may react in a similar manner.
foreach (IDrawObject draw in DrawObjects)
{
if ((draw.Tag.Contains(regChannelTag)) &&draw is IRegressionChannel)
{
IRegressionChannel regression = (IRegressionChannel) draw;
if(regression.DrawType==DrawType.RegressionChannel ) // is this required as well?
{
regression.EndBarsAgo = 0 ; // Does not work
regression.StartBarsAgo = 50 ; // Does not work
regression.PenUpper.Color = Color.Green ; // Works fine - changes color
regression.Pen.Width = 5 ; // Works fine - changes width
}
}
}
Is this a bug? Thanks.

Comment