[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] RSI plots don't match



PureBytes Links

Trading Reference Links

Hello,

Your formula is NOT RSI. Or.. not RSI in CLASSIC sense.

RSI used by AMiBRoker is CLASSIC one based on single CLOSE price.
Your formula is based on OPEN and close price.

http://www.stockcharts.com/education/IndicatorAnalysis/indic_RSI.html

For classic formulation you would need to use difference in CLOSE prices (today-yesterday)
instead, see the formula below.
period = 14;

rsi_r = Close - Ref( Close, -1 ); // DIFFERENCE in close price

rsi_rs = Wilders(IIf(rsi_r>0,rsi_r,0),period) / Wilders(IIf

(rsi_r<0,abs(rsi_r),0),period); 

Graph0 = 100-(100/(1+rsi_rs));

Graph1=RSI(period);

 www.google.com is good place to look at for indicator definitions.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "taotra" <ggoll@xxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, September 14, 2003 6:43 PM
Subject: [amibroker] RSI plots don't match


> I have a trading program that plots an RSI with the following 
> formula in Metastock format:
> 
> rsi_r := (close - open); 
> rsi_rs := Wilders(if(rsi_r>0,rsi_r,0),period) / Wilders(if
> (rsi_r<0,Abs(rsi_r),0),period); 
> RSI := 100-(100/(1+rsi_rs));
> 
> The problem is that I get different results when compared to AB's 
> RSI (I don't know AB's RSI formula).  How can I adapt the one above 
> to match that of AB?
> 
> TIA
> 
> Gernot
> 
> 
> 
> 
> Send BUG REPORTS to bugs@xxxxxxxxxxxxx
> Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
> 
> 

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/