In pinescript I can access the previous candle double value by doing (variable name)[1].
I tried to do the same in pinescript but it is not working.
Error CS0021 Cannot apply indexing with [] to an expression of type 'double' NinjaTrader.Custom C:\Users\woshr\Documents\NinjaTrader 8\bin\Custom\Indicators\CryptoStars.cs 152 Active
is there any way to work around it?
double hb = MAX(RSI(14, 3), 90)[0];
double lb = MIN(RSI(14, 3), 90)[0];
double max;
double max_rsi;
double min;
double min_rsi;
max = hb == 0 ? Close[0] : max[1] == 0 ? Close[0] : max[1];
Comment