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

Re: [amibroker] Relative Sttrength



PureBytes Links

Trading Reference Links

Hello,

Comparative Relative Strength is calculated in AmiBroker as follows:

RS = 1000 * close / foreign( "base ticker", "C" );

So the RS is a price of selected security divided by the price of base security.

What you want to achieve is something different. You might consider using
ROC (percentage rate of change) from RS. If you want to find out 
which stock outperforms index during last week you may use
5-bar ROC from RS:

outperforms = roc( relstrength("^SPC"), 5 ) > 0;

Best regards,
Tomasz Janeczko
===============
AmiBroker - the comprehensive share manager.
http://www.amibroker.com


----- Original Message ----- 
From: <jmp23834@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, September 17, 2001 10:54 PM
Subject: [amibroker] Relative Sttrength


> I have a group of 5 mutual funds and I want to rotate into the 
> strongest fund base on relative strength. When I use the "relstrength
> ("^spx")" in exploration I get results that seem to be a direct 
> correlation to the ticker close price. I expected a positive number 
> in MRS if I was outperforming the index and a negitave one for under
> performance. The largest MRS should be the fund that is out 
> performing the S&P by the largest margin. Can someone explain how AB 
> calculates RS? I think I need to add some more code to get where I 
> want but I need to understand the relstrength calculation first.
> 
> Thanks
> John Pyle
> 
> Here is the code:
> 
> //**********Calculations
> Periods = 28;
> 
> RS=relstrength("^spc");
> MRS=EMA(RS,14);
> RSChange=MRS-ref(MRS,-Periods);
> 
> Filter = Close >0;
> NumColumns = 3;
> Column0 = Close; Column0Name = "Close"; Column0Format=1.2;
> Column1 = MRS; Column1Name = "MRS"; Column1Format=1.2;
> Column2 = RSChange; Column2Name = "RSChange"; Column2Format=1.2;
> 
> Scan/Exploration Results:
> Ticker, Date, Close, MRS, RSChange
> FSPHX, 9/10/01, 126.02, 1629.87, 113.15,
> FSVLX, 9/10/01, 47.83, 643.15, 8.23, 
> FSELX, 9/10/01, 43.19, 598.78, -12.14,
> FDCPX, 9/10/01, 33.61, 462.52, -24.58, 
> FSESX, 9/10/01, 25.58, 332.23, -19.03, 
> 
> 
> 
> 
> 
> 
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
> 
>