How to do the same here?
protectedoverridevoid Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.Blue), PlotStyle.Line, "Plot0"));
Add(new Plot(Color.FromKnownColor(KnownColor.BlueViolet), PlotStyle.Line, "Plot1"));
Add(new Line(Color.DarkGray, 0, "Zero line"));
protectedoverridevoid OnBarUpdate()
{
double roc = ROC(12)[0];
Plot0.Set(roc);
double average = SMA(ROC(12), 5)[0];
Plot1.Set(average);
}
Comment