PureBytes Links
Trading Reference Links
|
G'day Ken,
I don't think that you will be able to do this with a "ranking system". If
you only have the two funds (one long and one short), why are you using a
ranking system? Why not do what you are doing now and then:
BUY = ticker == "ABC" and positionscore > x;
BUY = ticker == "XYZ" and positionscore < y;
Sorry, I haven't bothered with the syntax. But you should get the drift.
Cheerio
Chuck
-----Original Message-----
From: Ken Close [mailto:closeks@xxxxxxxx]
Sent: Sunday, October 03, 2004 12:57 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] Long and Inverse Fund
Dingo:
Yes, I tried this (as this was reply from Tomasz a year ago on same
question) but I must have something wrong because the trade list only
shows the longfund being bought.
-----Original Message-----
From: dingo [mailto:dingo@xxxxxxxxxxx]
Sent: Sunday, October 03, 2004 1:24 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] Long and Inverse Fund
I guess you've tried:
If ( Name() == "InverseFund" )
{
tmp = Buy; // must use temporary variable
Buy = Sell;
Sell = tmp;
}
?
d
> -----Original Message-----
> From: Ken Close [mailto:closeks@xxxxxxxx]
> Sent: Sunday, October 03, 2004 12:49 PM
> To: AmiBroker List
> Subject: [amibroker] Long and Inverse Fund
>
>
> Can someone help with the basic coding to buy a long fund on
> a market buy signal, and sell it and buy an inverse fund on a
> market sell signal.
>
> I put two funds in a watchlist, LongFund and InverseFund.
>
> I have a Market Timing Signal: either MarketBuy or MarketSell.
>
> How do I write the Buy and Sell signals and any PositionScore
> statements (if any) to make the system BUY the LongFund and
> SELL the InverseFund on MarketBuy signal, and the reverse,
> SELL the LongFund and BUY the InverseFund on MarketSell signal?
>
> I have tried various combinations of PositionScore and IIf
> statements to no avail. The trade report buys the LongFund
> on every MarketBuy signal and sells it on every MarketSell
> signal but never "buys" the InverseFund.
>
> Totally frustrated.
>
> Any help?
>
> Thanks,
>
> Ken
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (HYPERLINK
"http://www.grisoft.com)."http://www.grisoft.com).
> Version: 6.0.768 / Virus Database: 515 - Release Date: 9/22/2004
>
>
>
>
> ------------------------ Yahoo! Groups Sponsor
> --------------------~--> Make a clean sweep of pop-up ads.
> Yahoo! Companion Toolbar.
> Now with Pop-Up Blocker. Get it for free!
> HYPERLINK
"http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM"http://us.clic
k.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
> --------------------------------------------------------------
> ------~->
>
> Check AmiBroker web page at:
> HYPERLINK "http://www.amibroker.com/"http://www.amibroker.com/
>
> Check group FAQ at:
> HYPERLINK
"http://groups.yahoo.com/group/amibroker/files/groupfaq.html"http://grou
ps.yahoo.com/group/amibroker/files/groupfaq.html
> Yahoo! Groups Links
>
>
>
>
>
>
>
Check AmiBroker web page at:
HYPERLINK "http://www.amibroker.com/"http://www.amibroker.com/
Check group FAQ at: HYPERLINK
"http://groups.yahoo.com/group/amibroker/files/groupfaq.html"http://grou
ps.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Sponsor
ADVERTISEMENT
HYPERLINK
"http://us.ard.yahoo.com/SIG=129nkc1bi/M=294855.5468653.6549235.3001176/
D=groups/S=1705632198:HM/EXP=1096910941/A=2376776/R=0/SIG=11ldm1jvc/*htt
p:/promotions.yahoo.com/ydomains2004/index.html" \nclick here
HYPERLINK
"http://us.adserver.yahoo.com/l?M=294855.5468653.6549235.3001176/D=group
s/S=:HM/A=2376776/rand=122109337"
_____
Yahoo! Groups Links
* To visit your group on the web, go to:
HYPERLINK
"http://groups.yahoo.com/group/amibroker/"http://groups.yahoo.com/group/
amibroker/
* To unsubscribe from this group, send an email to:
HYPERLINK
"mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe"amibro
ker-unsubscribe@xxxxxxxxxxxxxxx
* Your use of Yahoo! Groups is subject to the HYPERLINK
"http://docs.yahoo.com/info/terms/"Yahoo! Terms of Service.
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.768 / Virus Database: 515 - Release Date: 9/22/2004
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.768 / Virus Database: 515 - Release Date: 9/22/2004
[Non-text portions of this message have been removed]
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Sponsor
ADVERTISEMENT
----------------------------------------------------------------------------
--
Yahoo! Groups Links
a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
b.. To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/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/
|