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

[amibroker] Relative Performance



PureBytes Links

Trading Reference Links



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}}" );








------------------------ 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/