RSI different between indicator and function

Questions about MultiCharts and user contributed studies.
ivanyu
Posts: 31
Joined: 24 Jul 2013
Has thanked: 3 times
Been thanked: 1 time

RSI different between indicator and function

Postby ivanyu » 17 Aug 2013

Hi,

I am new to EasyLanguage on MultiCharts.

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.

Thank you very much!

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: RSI different between indicator and function

Postby TJ » 17 Aug 2013

Hi,
I am new to EasyLanguage on MultiCharts.
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.
Thank you very much!
Indicators are calculated intrabar throughout the bar, and set the final value at EOB.
Signals are calculated at the End Of Bar (EOB).

Exception: When IntrabrOrderGeneration (IOG) is enabled.


Please post your analysis detail (code, screenshot, printfile, etc.,) for further study.

ivanyu
Posts: 31
Joined: 24 Jul 2013
Has thanked: 3 times
Been thanked: 1 time

Re: RSI different between indicator and function

Postby ivanyu » 17 Aug 2013

Now the market is closed with no more live ticks, values do match between indicator and my function call inside strategy...

Need to try again Monday.


Return to “MultiCharts”