aaron1281
09-18-2007, 06:07 PM
I have checked the code but I do not see my error in the bold syntax.
protected override void OnBarUpdate()
{
double value = EMA(RSI(5), 17)[0]
}
NinjaTrader_Josh
09-18-2007, 11:42 PM
It is because the RSI() takes two parameters, not one.
RSI(int period, int smooth)so you would use this instead
double value = EMA(RSI(14,3),17)[0];
You can view additional RSI() syntax and usage here: http://www.ninjatrader-support.com/HelpGuideV6/RelativeStrengthIndexRSI.html
NinjaTrader_Dierk
09-18-2007, 11:51 PM
As the editor intellisense suggests, the RSI has at least 2 parameters.
Please try something like
double value = EMA(RSI(<your-RSI-period>, <your-RSI-smooth-value>), 17)[0]