PureBytes Links
Trading Reference Links
|
Realized I was exiting on close rather than end of range close. In the
example they were the same, so it slipped by me. : )
This is corrected to calculate gain bewteen start and end of range.
/* This script reports the gain of the stocks in a portfolio over a range of
days*/
/*Double Click entry date on price chart, then double click exit date*/
/*Rik Rasmussen*/
/*Explore*/
Filter=1;
Filter = Ref( C,-1 ) != C;
entryPrice= BeginValue(Close);
exitPrice = EndValue(Close);
AddColumn( C, "Current Close" );
AddColumn(BeginValue(Close), "Test begin");
AddColumn(EndValue(Close), "Test end");
AddColumn(exitPrice - entryPrice, "Gain");
AddColumn((((exitPrice -entryPrice)/entryPrice)) *100, "% Gain");
Rik Rasmussen
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/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/
|