Amibroker - viewing comparative chart for multiple stocks

milind

Active Member
#1
Hi,

How do you display comparative chart of multiple stocks in Amibroker - similar to the way Yahoo/Google charts allow? Sorry if this question was answered already - I did search.

Thanks

-- Milind
 

milind

Active Member
#3
Thank you Omkarmango. That solves problem of getting two tickers in the same pane. I would like to have scales not completely independent - so that gains can be compared relative to each other. ownscale charts are not exactly comparable.

-- Milind
 

apfx

New Member
#4
This is how you can do it programatically

//RELATIVE PERFORMANCE



//list = CategoryGetSymbols(categoryMarket,3); //retreive symbols form a category

list = "EURUSD,EURGBP,EURJPY,EURCHF,EURAUD,EURCAD"; // type in symbols

fvb = Status("firstvisiblebar");
myAverage = 0;
num = 0;

for( i = 0; ( symbol = StrExtract( list, i ) ) != ""; i++ )
{
fc = Foreign( symbol, "C" );

if( ! IsNull( fc[ 0 ] ) )
{
relPerf = 100 * ( fc - fc[ fvb ] )/ fc[ fvb ];
myAverage = myAverage + relPerf;
Plot( relPerf, symbol, colorLightOrange + ( (2*i) % 15 ), styleLine );
num++;


}
}
myIndex = myAverage/num;
//Plot( myIndex,"" ,colorRed, styleThick ); // plots the average
 

Similar threads