PureBytes Links
Trading Reference Links
|
If I understand what you want (i.e., "short ticker" =
1/QQQQ) then there should be no problem. See screen shot
below showing plot of QQQQ and 1/QQQQ. If this is your definition of
"short ticker" and are not getting it then there is something wrong with
your code. If this is not what you want then take another shot at
explaining.
Bill
----- Original Message -----
Sent: Wednesday, July 18, 2007 12:10
PM
Subject: [amibroker] Re: Creating a "short"
ticker
> Thanks Bill but using xO = 1/foreign("symbol",
"open")..... does not > produce the correct "short" ticker. >
Larry > > --- In amibroker@xxxxxxxxxxxxxxx,
"wavemechanic" <fimdot@xxx> wrote: >> >> One way is to
use foreign(): >> >> xO = 1/foreign("symbol",
"open"); >> xH = ... >> xL = ... >> xC =
... >> >> plotOHLC(xO, ... >> >>
Bill >> >> ----- Original Message ----- >> From:
"onelkm" <LKMCD1@xxx> >> To: <amibroker@xxxxxxxxxxxxxxx> >> Sent: Wednesday, July 18, 2007 9:45 AM >>
Subject: [amibroker] Creating a "short" ticker >> >>
>> >I want to create a short ticker that is the inverse of QQQQ for
>> > example. Some of the inverse ETF's that are now available do
not > have >> > much history, so I want to calculate the
inverse ticker based on > the >> > long ticker. Here is what
I have so far, but it is not totally >> > correct since the open is
always higher than the high for the > day. >> > Any
suggestions? >> > Thanks >> > Larry >> >
>> > Buy=1; >> > j = Cum(-(log10(C) - log10(Ref(C,
-1)))); >> > k = Cum(-(log10(O) - log10(Ref(O, -1)))); >>
> m = Cum(-(log10(H) - log10(Ref(H, -1)))); >> > n =
Cum(-(log10(L) - log10(Ref(L, -1)))); >> > jReal = 10 ^ j;
>> > kReal = 10 ^ k; >> > mReal = 10 ^ m; >>
> nReal = 10 ^ n; >> >
Plot(jReal,"j",colorWhite,styleLine); >> > AddToComposite(jReal
,"~qst","C",1+2+8+16); >> > AddToComposite(kReal
,"~qst","O",1+2+8+16); >> > AddToComposite(mReal
,"~qst","H",1+2+8+16); >> > AddToComposite(nReal
,"~qst","L",1+2+8+16);
__._,_.___
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
SPONSORED LINKS
__,_._,___
|