Here is the part of code I cant get to work:
else if (State == State.DataLoaded)
{
bollinger = Bollinger(2, 20);
}
protected override void OnBarUpdate()
{
if(CurrentBar < 2) return;
double upperValue = bollinger.Upper[1];
double lowerValue = bollinger.Lower[1];
double _HigherBand = MAX(upperValue,2)[0];// I need to identify the highest BB Upper band of the last two candles from previous close (close[1] and close[2]
double _LowerBand= MIN(lowerValue,2)[0];
}
Comment