how can i Index the calculated values of variables or doubles in the OnTick method of cBots ?
in this example i have to manually calculate each value or else this error will pop up : 'index' is a type which is not valid in the given context
` // Calculate BBP value
double hullo = Hullopen.Result.LastValue;
double hullh = HullHigh.Result.LastValue;
double hulll = HullLow.Result.LastValue;
double bullp = hullh - hullo;
double bearp = hulll - hullo;
double BBP = bullp + bearp;
// Get BBP value of the previous candle
double previousHullo = Hullopen.Result.Last(1);
double previousHullh = HullHigh.Result.Last(1);
double previousHulll = HullLow.Result.Last(1);
double previousBullp = previousHullh - previousHullo;
double previousBearp = previousHulll - previousHullo;
double previousBBP = previousBullp + previousBearp;`
while in the regular indicator , i can easily index values to call values of previous indicator candles
ACCBBPhisto[index] = (BBPhisto[index] - BBPhisto[index-1]) + BBPhisto[index];