RSI calculation - cannot get agreement
Author: karla2010
Creation Date: 1/27/2011 1:13 PM
profile picture

karla2010

#1
I tried to duplicate RSI with the stated computation on the help page but cannot.

Any idea what's wrong?

I tried to download the RSI code but cannot get Attachments to show up in my browser.


CODE:
Please log in to see this code.
profile picture

Eugene

#2
QUOTE:
I tried to download the RSI code but cannot get Attachments to show up in my browser.

It's clearly advised in the Wiki what to do with regard to Attachments, so there's no reason in duplicating it here.

Caveat: what said there in relation to Community/TASC indicators does not apply to RSI and other Standard indicators (btw the Wiki doesn't claim the code can be obtained) - their code is closed source, owned by Fidelity, not for sharing.
profile picture

karla2010

#3
Ok,

Misunderstood what could be downloaded.

As far as invisible attachments go, advice in Wiki was taken already and a ticket was opened for the second time. This seems to be a recurring problem for me.

Too bad about the closed source. It clearly makes a difference in backtesting. Would like to know what is so special about their RSI. Tried a few obvious things like the Wilder average going into the ration and a simple Exp average but still could not get agreement.
profile picture

karla2010

#4
Ok,

Essntially got a perfect match. Used an exponential average for the average up/down value and doubled the period

(e.g. for a 21 period RSI(Close,21), use a 42-period EMA).

This works:

CODE:
Please log in to see this code.
profile picture

Eugene

#5
Here's Wealth-Lab's RSI as coded by fundtimer a few years back and translated to V6:
CODE:
Please log in to see this code.
profile picture

karla2010

#6
Eugene,

Thanks. Looks like fundtimer used the Wilder average. I tried that but could not get a match to the Fidelity RSI. Will stick with the 2x EMA since it is so close in my testing and it performs so well in backtesting.
profile picture

Cone

#7
CODE:
Please log in to see this code.
It's unlikely you'll get an unstable indicator (WealthScript Programming Guide > Indicators > Stability of Indicators) to match in another application unless you load precisely the same amount of data (and of course the same data). ATP must be seeding indicators "off the chart" because indicators show up on the first bar displayed. How much seed data is there? I don't know, but if you did, you could start WLP's chart in the same place and you'd likely get the same result.