RSI( Relative strenght Indicator), calculate or download from website ?

cpampas

Registered User.
Local time
Yesterday, 20:26
Joined
Jul 23, 2012
Messages
221
I am trying to calculate the RSI(Relative Strenght Indicator), for a stock at the current day but with the function i am using , there is a huge difference between the result and published RSI data like yahoo finance
I also tought of downloading RSI data , instead of calculating, i just cant find a website from where i can retrieve this data (no historical data, just the current RSI)


Any thoughts ?
 
Divide and conquer, eliminating possible mistakes one at a time.

First, I had no idea what RSI was so googled it and spent 5 minutes learning. So keep in mind everything below is from a near ignoramus specifically, but someone who has a solid math/algorithm background.

Step 1. Pick a stock and period that you can verify the RSI of.

Step 2. Compare that RSI between 2 sources (yahoo, morningstar, etc.). If they match you can be confident its the right answer. If they don't find a 3rd source.

Step 3. Find an online RSI calculator and try and duplicate the RSI for that stock and period. This means finding all the data you need for that period and plugging it in. Do this until you get the right answer.

Step 4. Move the data into Access and run it through your code. If it matches game over. If it doesn't you need to fix your formula because you know the right answer and you know you have the right data. From here its just code debugging.
 
Thanks for your reply Plog.
I did as you said, and confirm that 2 different websites, yahoo finance and morningstar , have very similar RSI values (65) as an example for 3M (share symbol MMM)
my function that i already changed so many times, keeps on returning completely diferent values.
I would prefer to find these values for the current day. ej: 65 for MMM, for all the shares with the S&P500, or maybe someone have an idea of whats wrong with my calculation.

I attached a copy with the form that calculates the rsi. just enter the symbol in this case MMM
Thanks
 

Attachments

You would need to supply some established formula for rsi, as we have nothing to compare it to?

As I always advise, walk your code line by line to find the error.

I get -1 ?
1723539947872.png



Found one.

Now up to you to check each step has valid values.

Edit: I cannot even get ANY valid data with your code? :(
 
Last edited:
Gasman, I am going to review the calculation in my code again
Maybe you get -1, because you are not entering into the inputbox any share ticker
Did you try to enter MMM ?
 
Gasman, I am going to review the calculation in my code again
Maybe you get -1, because you are not entering into the inputbox any share ticker
Did you try to enter MMM ?
Of course I did. :(
I have used Access before you know. :)

I even tried BNC and BNC.L as Santander is on the London Stock Exchange.

I would still inspect every variable as you get to them, if you can get valid data from your url
 

Users who are viewing this thread

Back
Top Bottom