Go Back   DailyFX Forum > FXCM Products and Services > FXProgrammers > Discussion / Support Forum > Indicator SDK Support

Reply
 
Thread Tools Rate Thread
  #1 (permalink)  
Old 05-04-2009, 07:43 AM
Registered User
 
Join Date: Apr 2009
Posts: 3
Jolam0524 is an unknown quantity at this point
RSI 14

Anyone could help to illustrate how RSI in the MarketScope be obtained?
Reply With Quote
  #2 (permalink)  
Old 07-26-2009, 01:05 PM
FrAnton's Avatar
Member
 
Join Date: Jul 2009
Posts: 199
FrAnton is an unknown quantity at this point
Quote:
Originally Posted by Jolam0524 View Post
Anyone could help to illustrate how RSI in the MarketScope be obtained?
I tried to calculate RSI 14 manually taking open/close values from FXCM trading station marketscope 2.0 chart, and could not get result to be even close.

I have used the standard formula

RSI = 100 - (100 / (1 + RS)); where
RS = Average Gain / Average Loss for 14 periods.

So I also wonder what formula is in use to calculate this Indicator?
Reply With Quote
  #3 (permalink)  
Old 07-26-2009, 10:00 PM
Member
 
Join Date: Oct 2008
Posts: 474
Nikolay.Gekht is on a distinguished road
RSI is implemented according Perry Kaufman "Trading System and Methods" chapter 6 "Momentum and Oscillators".

The pseudo code:
Code:
sumup := 0
sumdown : = 0
for i = 1 to n begin
    if close[i + 1] - close[i] > 0 then
        sumup := sumup + close[i + 1] - close[i];
        else sumdown := sumdown + close[i] - close[i + 1];
    end;
end;
RSI = 100 - (100 / (1 + sumup / sumdown));
Reply With Quote
  #4 (permalink)  
Old 07-26-2009, 11:46 PM
FrAnton's Avatar
Member
 
Join Date: Jul 2009
Posts: 199
FrAnton is an unknown quantity at this point
Quote:
Originally Posted by Nikolay.Gekht View Post
RSI is implemented according Perry Kaufman "Trading System and Methods" chapter 6 "Momentum and Oscillators".

The pseudo code:
Code:
sumup := 0
sumdown : = 0
for i = 1 to n begin
    if close[i + 1] - close[i] > 0 then
        sumup := sumup + close[i + 1] - close[i];
        else sumdown := sumdown + close[i] - close[i + 1];
    end;
end;
RSI = 100 - (100 / (1 + sumup / sumdown));
thank you for the sample. I guess this is just for the first period.
For the next periods it seems that it calculates Avg as:

diff = source[period] - source[period - 1];
if (diff > 0) then
sump = diff;
else
sumn = -diff;
end
positive = (pos[period - 1] * (n - 1) + sump) / n;
negative = (neg[period - 1] * (n - 1) + sumn) / n;

This is what I found in RSI body. Is that right?
Reply With Quote
  #5 (permalink)  
Old 07-27-2009, 02:08 PM
Member
 
Join Date: Oct 2008
Posts: 474
Nikolay.Gekht is on a distinguished road
Exactly so! pos and neg are hidden streams which contains the previous values for the data.
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




Disclaimer: Trading foreign exchange on margin carries a high level of risk, and may not be suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to trade foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with foreign exchange trading, and seek advice from an independent financial advisor if you have any doubts. Any opinions, news, research, analyses, prices, or other information contained on this website is provided as general market commentary and does not constitute investment advice. Forex Capital Markets LLC. will not accept liability for any loss or damage, including without limitation to, any loss of profit, which may arise directly or indirectly from use of or reliance on such information.

All times are GMT -5. The time now is 04:50 PM.
Copyright ©2009 Daily FX. All Rights Reserved.