I have made several addOns with NT8 and find it quite a useful upgrade. I still remain completely at a loss as to the Class Hierarchy within Ninja.
While the following function works well within an indicator or strategy, the HighestBar() call fails to compile without the IndicatorBase prefix. No amount of tweaking the using NinjaTrader... namespace declarations would fix the error. Only trial end error found the IndicatorBase.HighestBar().
private double getRange(int per){
// determine the vertical range of the previous period
double ttop = hhigh[IndicatorBase.HighestBar(hhigh, per)];
double bbot = llow[IndicatorBase.LowestBar(llow, per)];
return (ttop - bbot);
}
public bool isReversalUp( int bAgo ){ // finds reversal up from consecutive lows followed by consecutive highs
bool retVal = false;
if( ( NBarsDown(bAgo-1, true, true, true)[bAgo] == 1.0) && (NBarsUp(bAgo-1, true, false, true)[bAgo-2] == 1.0 ) )
retVal = true;
return retVal;
}
Apologies for sounding frustrated, as I really appreciate this product, but where can I find the NBarsDown() reference?

Comment