PureBytes Links
Trading Reference Links
|
load into Indicator builder.......
//Chose your timeframe for comparison
//Pick one and comment the other out
barno=100<FONT
size=2>;
//timeframe=barno;//will start at the N
bar.
//timeframe=Year();
timeframe=Month();
startpoint = IIf<FONT
size=2>(timeframe==Year<FONT
size=2>(),ValueWhen<FONT
size=2>(Year<FONT
size=2>()!=Ref<FONT
size=2>(Year<FONT
size=2>(),-1<FONT
size=2>),Cum<FONT
size=2>(1<FONT
size=2>)),IIf<FONT
size=2>(timeframe==Month<FONT
size=2>(),ValueWhen<FONT
size=2>(Month<FONT
size=2>()!=Ref<FONT
size=2>(Month<FONT
size=2>(),-1<FONT
size=2>),Cum<FONT
size=2>(1<FONT
size=2>)),IIf<FONT
size=2>(timeframe==barno,barno,Null))); // the
start point of comparision will be Yearly or monthly<FONT
face="Courier New" color=#ff0000 size=2> or Bar number.<FONT
size=2>
//Current Active Chart
price = Close;
Color=colorBlue;
Currentchart = 100<FONT
size=2> * ( price/ValueWhen<FONT
size=2>( Cum<FONT
size=2>(1) ==
startpoint, price ) - 1<FONT
size=2> );
//Comparison chart #1
// you can change the ticker below
mkt1="^DJI"<FONT
size=2>;//change ticker here<FONT
size=2>
Color1=colorRed;
ticker1 = ParamStr(
"Ticker1",
mkt1);
price1 = Foreign(mkt1,
"C");
Chart1 = 100 * (
price1/ValueWhen(
Cum(<FONT
color=#ff00ff size=2>1) == startpoint, price1 ) -
1
);
//Comparison chart #2
// you can change the ticker below
mkt2="IBM"<FONT
size=2>;//change ticker here<FONT
size=2>
Color2=colorYellow;
ticker2=ParamStr(
"Ticker2",
mkt2);
price2 = Foreign(mkt2,
"C");
Chart2 = 100 * (
price2/ValueWhen(
Cum(<FONT
color=#ff00ff size=2>1) == startpoint, price2 ) -
1
);
//Comparison chart #3
// you can change the ticker below
mkt3="MSFT"<FONT
size=2>;//change ticker here<FONT
size=2>
Color3=colorWhite;
ticker3=ParamStr(
"Ticker3",
mkt3);
price3 = Foreign(mkt3,
"C");
Chart3 = 100 * (
price3/ValueWhen(
Cum(<FONT
color=#ff00ff size=2>1) == startpoint, price3 ) -
1 );
Plot(Currentchart,<FONT color=#ff00ff
size=2>"",color,styleLine);<FONT color=#0000ff
size=2>
Plot(Chart1,<FONT color=#ff00ff
size=2>"",color1,styleLine);<FONT
color=#0000ff size=2>
Plot(Chart2,<FONT color=#ff00ff
size=2>"",color2,styleLine);<FONT
color=#0000ff size=2>
Plot(Chart3,<FONT color=#ff00ff
size=2>"",color3,styleLine);<FONT
color=#ff0000 size=2>
//plots vertical line at yearly or monthly intervals<FONT
color=#0000ff size=2>
Plot(IIf<FONT
size=2>(timeframe==Year<FONT
size=2>(),Year<FONT
size=2>()!=Ref<FONT
size=2>(Year<FONT
size=2>(),-1<FONT
size=2>),IIf<FONT
size=2>(timeframe==Month<FONT
size=2>(),Month<FONT
size=2>()!=Ref<FONT
size=2>(Month<FONT
size=2>(),-1<FONT
size=2>),IIf<FONT
face="Courier New" size=2>(timeframe==barno,Null,<FONT color=#ff00ff
size=2>0)<FONT face="Courier New"
size=2>)),<FONT color=#ff00ff
size=2>""<FONT
size=2>,colorBlack,styleHistogram|styleOwnScale|styleDots);
Title=WriteIf<FONT
size=2>(timeframe==Year<FONT
size=2>(),"Yearly..."<FONT
size=2>,WriteIf<FONT
size=2>(timeframe==Month<FONT
size=2>(),"Monthly..."<FONT
size=2>,WriteIf<FONT
size=2>(timeframe==barno,"Startpoint is
Bar #..("+<FONT color=#0000ff
size=2>WriteVal(barno,<FONT color=#ff00ff
size=2>1)+"
)",<FONT color=#ff00ff
size=2>"")))+<FONT color=#ff00ff
size=2>"..Comparative Analysis for :...."+<FONT
color=#0000ff size=2>EncodeColor(Color)+<FONT
color=#0000ff size=2>Name()+<FONT color=#ff00ff
size=2>".."+<FONT color=#0000ff
size=2>EncodeColor(Color1)+ticker1+<FONT
color=#ff00ff size=2>".."+<FONT color=#0000ff
size=2>EncodeColor(Color2)+ticker2+<FONT
color=#ff00ff size=2>".."+<FONT color=#0000ff
size=2>EncodeColor(Color3)+ticker3;
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
jbell5931
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Friday, June 06, 2003 4:12 PM
Subject: [amibroker] Performance Chart in
Amibroker
Hi, How would I go by doing a Performance
comparison chart of multiple stocks? I can do that on MoneyCentral
and Yahoo, but would be nice to be able to do it offline.Thanks
for you help.Joe
Send BUG REPORTS to <A
href="">bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
<A
href="">suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
<BLOCKQUOTE
><FONT
face="Courier New">---Outgoing mail is certified Virus
Free.Checked by AVG anti-virus system (<A
href="">http://www.grisoft.com).Version: 6.0.488
/ Virus Database: 287 - Release Date: 6/6/2003
Yahoo! Groups Sponsor
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|