The primary instrument is 5 min timeframe.
I have initialized the other timeframes as below in Initialize()
Add(PeriodType.Minute, 15);
Add(PeriodType.Minute, 60);
I have created a simple Spread function
public double Spread(IDataSeries data1, IDataSeries data2) {
return data1[0]-data2[0];
}
I create a strategy where I want to compute a variable x such that
x = Spread(15min-low, 60min-high)*100
Using
x = Spread(Lows[1][0],Highs[2][0]) *100
doesnot work correctly due to datatype error.
Please advise.
Comment