- datastream1 is 5 min
- datastream2 is daily
I dont understand why this code does not display the daily close. It is always the 5-min bar close. It is as if the datastream number (i.e. "new VariableSeries<double>( this, 0, 2 )" or "new VariableSeries<double>( this, 0, 1 )") has no effect.
Regards.
Code: Select all
namespace PowerLanguage.Indicator{
public class fp_test_datastream2 : IndicatorObject {
VariableSeries<double> series_var;
public fp_test_datastream2(object _ctx):base(_ctx){}
private IPlotObject plot1;
protected override void Create() {
// create variable objects, function objects, plot objects etc.
plot1 = AddPlot(new PlotAttributes("", EPlotShapes.Line, Color.Red));
series_var = new VariableSeries<double>( this, 0, 2 );
}
protected override void StartCalc() {
// assign inputs
}
protected override void CalcBar(){
// indicator logic
series_var.Value = Bars.Close[0];
plot1.Set( series_var[0] );
}
}
}