SomeIndicator1:
protected override void Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
Add(instrumentB, PeriodType.Minute, 1);
Overlay = false;
CalculateOnBarClose = false;
}
protected override void OnBarUpdate()
{
if (CurrentBars[0] < 390 || CurrentBars[1] < 390)
return;
Plot0.Set((Closes[0][0]+Closes[1][0])/2);
}
protected override void OnBarUpdate()
{
if (CurrentBar < 390 )
return;
double val = SomeIndicator1()[0];
Print(val);
Plot0.Set(val);
}
PS: the
if (CurrentBars[0] < 390 || CurrentBars[1] < 390)
Thank you in advance.

Comment