PureBytes Links
Trading Reference Links
|
It is easy [and fast] via AddToComposite() function.
Suppose you have your tickers in WL2.
In AA select
Apply to:use filter:Define:WatchList:List 2
Range:All quotations
paste the
t=LastValue(C);
r=100*C/t;
population=20;//set the WL2 population here
for(n=0;n<population;n++)
{
AddToComposite((n==Status("stocknum"))*r,"~R_"+Name(),"C");
Buy=0;
}
and SCAN.
A new group of artificial tickers is already created
~R_MSFT, ~R_IBM, ~R_INTC etc.
You may move them now in a separate Group/WatchList for easier
reference.
Call them in IB or AA windows via Foreign() function.
Example
Plot(Foreign("~R_MSFT","C"),"~R_MSFT",1,1);
or
[use filter WL2 again, all quotations, Back Test]
Buy=Cross(Foreign("~R_"+Name(),"C"),99);
Sell=Cross(105,Foreign("~R_"+Name(),"C"));
Note here that ANY similar backtesting is only theoretical, the
LastValue(C) was not known in the past...
If, instead of today's value you put a reference value of the past
[the 1st bar of 2003 for example] then it would make sense to
backtest and get useful results.
Dimitris Tsokakis
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "Mr Valley" <valleymj@xxxx> wrote:
> ???
> -----Original Message-----
> From: Mr Valley [mailto:valleymj@x...]
> Sent: Saturday, May 01, 2004 8:28 PM
> To: AmiBroker TS
> Cc: psytek@xxxx
> Subject: Ratio Adjusted Databases Question
>
>
> How can I create databases of Ratio Adjusted Data from existing EOD
and RT
> databases (including time or tick value frames) , so that each bar
is put
> into the ratio of what today's market value is or (Now's value for
RT data)
> ?
>
> Is there a convenient way to Array this within the existing
databases?
>
> It would really be convenient and set AmiBroker above any other
system to be
> able to backtest on Ratio Adjusted Data, in my opinion.
> It would be Wonderful to have a built-in Selection function to just
display
> it. I believe could really improve portfolio analysis, because
everything,
> including Drawdowns, could be evaluated in today's terms.
>
> This way each move will have the same relative weight as the
present any
> each system could be tested then on percentage terms.
>
> Grateful for replies.
>
> Mr. Valley
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->
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
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/
|