PureBytes Links
Trading Reference Links
|
Ken,
There is no NEED to use rotational mode at all. It is provided as a faster replacement
for already existing PT formulas. But for nothing more.
99% of cases are solved by regular mode.
You just need REGULAR mode all the time if you have buy/sell signals.
Regular mode ALLOWS RANKING TOO and allows buy/sell signals to be evaluated.
So use REGULAR mode.
fc = Foreign("INDEX", "C")
Buy = Cross( fc, MA( fc, 50 );
Sell = Cross( MA( fc, 50 ), fc );
PositionScore = 100 - RSI();
This code would attempt to enter long on *all securities* at the same time
when INDEX close rises above its MA
and will exit long on INDEX close falling above MA.
Among all securities under test ONLY THOSE scored HIGHEST will be entered.
(in the example formula securities with LOW RSI are preferred)
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "Ken Close" <closeks@xxxxxxxx>
To: "AmiBroker List" <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, October 05, 2003 5:37 PM
Subject: [amibroker] Force Buy of Particular Fund
> First question on coding I can not figure out...
>
> I want to buy ranked and scored funds on the Buy of a general market
> signal, and then Sell all of them on the Sell of the general Market
> Signal.
>
> When the general market signal is on a Sell I would like the Backtester
> to be holding (ie, having Bought) a money market mutual fund or some
> other "safe" fund acting as a substitute for the mm fund.
>
> I do not know how to even start (and perhaps I should wait until
> Interest is included) but if it is possible to code this situation, then
> how to do it?
>
> Other code.....
>
> Buy = IIf( MarketBuyOn, 1, ???????);
>
> I have no idea how to do this. Anyone?
>
> Perhaps there is a way to use Rotational Trading Mode....
>
> With MarketBuyOn, then rank all funds and select, and when MarketBuyOn
> is "0" (off), then force the rank score of the mm fund high and others
> to low value (artificially). If Positions = 4, will it buy four
> positions in the MM fund (essentially putting all equity into the MM
> fund) or will it only buy 1 position (25% in the mm fund)?
>
> My experience level with portfolio trading is low enough that I may not
> have the right to ask these questions, but what better way to learn --
> Again, any comments?
>
> Ken
>
>
>
> 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 http://docs.yahoo.com/info/terms/
>
>
>
------------------------ 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
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|