PureBytes Links
Trading Reference Links
|
Viginio
I am sure there are more than one way to do this.
I currently use a modification of the built in
Relative
Performance indicator.
// -- "Rel Perf Explore" -- //
// --- eXploration for outperforming stocks --- //
// Based on ROC of stock vs Index as a screening tool.
fc = Foreign("XAO", "Close");
p = Param("Bars",60, 60,200,10); // roughly three
months trading.
x = 100 * ( C - Ref ( C, -p)) / Ref (C, - p); // ROC
of stock.
y = 100 * ( fc - Ref ( fc, -p)) / Ref ( fc, - p); //
ROC of Index.
Filter = x >= 2 * y AND
C > 0.4 AND C < 6.00 AND
C * MA(Volume,15) > 100000; // Modify to suit.
AddColumn(x,"code",1.2);
AddColumn(y,"index", 1.2);
AddColumn(x/y, "code / Index",1.2);
ChrisB
--- virgola562000 <v.marra@xxxxxxxxx> wrote:
>
>
> Hi,
> Could somebody help in writing the formula to run an
> Automatic
> Analysis based on the following Relative Performance
> formula?
> I would like the Automatic Analysis to report the RP
> Value of each
> stock.
> Thank you!
> Virginio
>
> This is the formula for plotting the Relative
> Performance
>
> _N( TickerList = ParamStr("Tickers", "^OMXS30") );
> NumBars = 20;
> fvb = Status("firstvisiblebar");
> Plot( 100 * ( C - C[ fvb ] ) / C[ fvb ], Name(),
> colorBlue );
> for( i = 0; ( symbol = StrExtract( TickerList, i ) )
> != ""; i++ )
> {
> fc = Foreign( symbol, "C" );
>
> if( ! IsNull( fc[ 0 ] ) )
> {
> Plot( 100 * ( fc - fc[ fvb ] )/ fc[ fvb ],
> symbol, colorWhite + (
> (2*i) % 15 ), styleLine );
> }
> }
> PlotGrid( 0, colorYellow );
> _N( Title = "{{NAME}} - Relative Performance [%]:
> {{VALUES}}" );
>
>
>
>
>
>
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail
------------------------ Yahoo! Groups Sponsor --------------------~-->
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|