I'm trying to convert this nested line ...
RSI2 = RSI(SMA1, Convert.ToInt32(Variable1), 1);
into an int or something I can use as a variable in another line further down the strategy.
The errors I get are....
Cannot convert type'Ninjatrader.NinjaScript.Indicators.RSI' to 'int'
If I don't convert, it compiles, but when run results in ...
Error on calling 'OnStateChange' method: Unable to cast object of type 'NinjaTrader.NinjaScript.Indicators.RSI' to type 'System.IConvertible'.
Any help would be GREATLY appreciated
Comment