at NinjaTrader.Indicator.IndicatorBase.MRO(Condition condition, Int32 instance, Int32 lookBackPeriod)
at NinjaTrader.Indicator.Trending.OnBarUpdate()
the code segment is here.
i cannot think of a reason why i would get this exception.
if(High[0]!=1)
{
if((High[0]>High[1] ) && (High[1]>High[2] ))
{
HigherHigh.Set(1);
if(HigherHigh[1] != 1)
{
// check if this instance is greater than the last higher high
int barsago=MRO(delegate {return HigherHigh[1] == 1;}, 2, 100);
if(High[0]>High[ barsago])
{
higherhighBoolSeries.Set(true);
}
}
}
Comment