In 7, the linreg is not plotted continuously in chart, It looks like a few places where there are clear breaks. I am including a sample image using CL 03-10. If I change the plot style to dots in chart window, it's drawn correctly.
thanks for the help,
Alex
protected override void Initialize()
{
Add(new Plot(Color.Red, PlotStyle.Line, "Plot1"));
Add(new Plot(Color.Lime, PlotStyle.Line, "Plot2"));
CalculateOnBarClose = false;
}
protected override void OnBarUpdate()
{
if(CurrentBar <= 10)
return;
if(LinReg(10)[0] < LinReg(10)[1])
PlotLsma1.Set(LinReg(10)[0]);
else if(LinReg(10)[0] > LinReg(10)[1])
PlotLsma2.Set(LinReg(10)[0]);
}
#region Properties
[Browsable(false)]
[XmlIgnore()]
public DataSeries PlotLsma1
{
get { return Values[0]; }
}
[Browsable(false)]
[XmlIgnore()]
public DataSeries PlotLsma2
{
get { return Values[1]; }
}
#endregion

Comment