here's what i've tried so far and either get "can't apply indexing to a double" or "High doesn't exist in this context"
else if (State == State.Configure)
{ AddDataSeries(BarsPeriodType.Minute, 2); }
else if (State == State.DataLoaded)
{
diff = new Series<double>(this);
emaDiff = EMA(diff, Period);
emaClose = EMA(BarsArray[1],Period);
}
}
protected override void OnBarUpdate()
{
/// diff[0] = High[0] - Low[0]; /// ORIGINAL;
/// diff[0] = High[1][0] - Low[1][0]; ///// nope indexing
/// diff[0] = BarsArray[1]High[0] - BarsArray[1]Low[0]; //// not working either indexing
diff = High (BarsArray[1])[0] - Low (BarsArray[1])[0]; //// High doesn't exist in this context
double middle = emaClose[0];
double offsetOne = emaDiff[0] * OffsetOne;
double offsetTwo = emaDiff[0] * OffsetTwo;
double upper = middle + offsetOne;
double lower = middle - offsetOne;
double upper2 = middle + offsetTwo;
double lower2 = middle - offsetTwo;
Midline[0] = middle;
if ( PlotBands1 )
{ Upper[0] = upper;
Lower[0] = lower; }
if ( PlotBands2 )
{ Upper2[0] = upper2;
Lower2[0] = lower2; }
it seems to me that there shouldn't be any difference between the original argument and the one with [1][0] in it. What am i missing ?
i also tried the argument in the State.DataLoaded section with the same results...
thanks,
w

Comment