RelativeStrengthIndex.Result.Last(0) does not return a value.
Created at 07 Mar 2021, 18:50
MA
RelativeStrengthIndex.Result.Last(0) does not return a value.
07 Mar 2021, 18:50
[Parameter("RSI period", DefaultValue = 14)]
public int RSIperiod { get; set; }
public DataSeries SourceRSI { get; set; }
private RelativeStrengthIndex RSI { get; set; }
Print("RSI = " + RSI.Result.Last(0));
And in my log it prints:
Crashed in Calculate with NullReferenceException: Object reference not set to an instance of an object. ( x like 1000)
and then it says: RSI = NaN
Does anyone els have this problem, or does someone know if there is a solution?
PanagiotisCharalampous
08 Mar 2021, 09:08
Hi maxdelater,
Can you provide the complete cBot/Indicator code?
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous