SMA Sma_1, Sma_2;
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
Calculate = Calculate.OnBarClose;
}
else if (State == State.DataLoaded)
{
Sma_1 = SMA( 10 );
Sma_2 = SMA( 10 );
AddChartIndicator( Sma_1 );
Print( "Sma_1 == Sma_1 = "+ (Sma_1 == Sma_1).ToString() );
}
}
protected override void OnBarUpdate()
{
Sma_2.PlotBrushes[0][0] = Brushes.Blue;
}
If to use different periods, for example
Sma_1 = SMA( 10 );
Sma_2 = SMA( 11 );
Is it expected?
Can I let strategy to create different instances of hosted indicator with same parameters?
Comment