This is read-only version of AFL library entry. Ability to add user formulas
and comment is only available from members-only area.
Details:
Formula name:
Baseline Relative Performance Watchlist charts V2
Author/Uploader:
Michael.S.G. - OzFalcon [at] Bden.org
Date/Time added:
2003-08-06 02:10:25
Origin:
Keywords:
Baseline Relative Performance Watchlist charts
Level:
basic
Flags:
indicator
DISCLAIMER: Most formulas present in AFL on-line library are submitted
by the users and are provided here on an "as is" and "as available" basis.
AmiBroker.com
makes no representations or warranties of any kind to the contents or the operation
of material presented here. We do not maintain nor provide technical support
for 3rd party formulas. Description:
A Slightly more streamline version of the original.
This revision uses the currently selected ticker as the baseline. Watchlist May be selected via CTRL-R Param Dialog.
This example plots lines for each entry in watchlist.
<OzFalcon>
Formula:
/* Baseline Relative Performance Watchlist charts
** Current Symbol used as a base line.
** (Use an Index as your Base eg XAO,XEJ,XMJ Etc...)
**
** This example plots lines for each entry in watchlist
** White = Base Line. (Usualy Selected Index)
**
** Change the Watchlist with CTRL-R. Carefull of Big Watchlists.
**
** AFL implementation by Tomasz Janeczko
** Watchlist & Parameter's Addition by Michael.S.G.
**
** Use Automatic scaling, Grid: Percent, Limits, Middle
*/
Listnum = Param( "Watchlist", 5, 0, 100, 1 );// Watchlist to display.
// the start point of comparision will be StartPoint bar
sp = Param( "Startpoint %", 55, 1, 100, 1 );
startpoint = int(BarCount*(sp/100));
// Here is a base line - We Use Currenty Selected Ticker.
// (Use an Index as your Base eg XAO,XEJ,XMJ Etc...)
price = Close;
baseline = 100 * ( price/ValueWhen( Cum(1) == startpoint, price ) - 1 );
// base line chart (flat line)
Plot ( baseline - baseline,Name(),2,1);
list = GetCategorySymbols( categoryWatchlist, listnum );
for( i = 0; ( sym = StrExtract( list, i ) ) != ""; i++ )
{
price = Foreign( sym, "C" );
Plot (100 * ( price/ValueWhen( Cum(1) == startpoint, price ) - 1 )-
baseline,sym,6+i,1);
}
"StartPoint =" +WriteVal(startpoint);
Comments:
April trueme_3454 [at] mailinator.com 2005-12-25 13:37:23
Nice Indicatior. Thank you, Michael.
It would probably be best to use a date for starting point of performance comparison instad of %.
With the current setting of %, it is impossible to compare performance of a watch list from a specific date (such such as the lowest point of a decline) onward.
It would also be helpful to add the "ending date" in addition to the default "latest available date" currently used by the indicator. If this is done, then it would be possible to compare the perfomance of a watch list during a specific time period in the past such as during the bear market of March 2000 - October 2003 and then use this data to project which stocks/indexes are likely to hold better in another bear market.
I would also recommend changing defaults to % scale which make more meaningful comparisons and to show time scale at the bottom of the indicator.
Overall, good work Michael, and you have the potential to turn it into excellent work.