Because I cannot use the indicator output directly inside a strategy, I called RSI function in my strategy, then add RSI indicator to the same data series, then when I cross check the RSI values in the indicator data box vs. print statements (output from RSI function call), I see different values.
I have already manually set MaxBarsBack to be 50 in both strategies and indicator, and yet the RSI values are still different. I have checked that the input params are the same to the function vs the indicator.
I have also checked the values that are max bars back apart, e.g. bar number 100 in indicator, vs, bar number 150 in strategy function call, RSI values are also different. I also checked RSI for the same bar time between indicator and strategy function call, still different.
However, when I call a different function and do the same, e.g. Keltner channel, I do not see this issue. Indicator values and function call values are the exact same.
I am totally lost as to why this happens....
Hope someone can shed some light and advice on this for me.