I am writing a strategy and trying to access two values within the indicator.
cumulativeDelta.DeltaClose[0]
cumulativeDelta.DeltaClose[1]
I can access index 0 but index 1 gives me an error:
Parameter name: index
onstateChange()
{
if (State == State.Configure)
{
AddDataSeries(Data.BarsPeriodType.Tick, 1);
AddDataSeries("ES 12-24", Data.BarsPeriodType.Second, 15, Data.MarketDataType.Last);
}
}
And in onBarUpdate
if (BarsInProgress == 0)
{
double currentDelta = cumulativeDelta.DeltaClose[0];
double previousDelta = cumulativeDelta.DeltaClose[1]; // This one gives error
}
Can someone kindly help please?
Thanks
Ben

Comment