[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] split



PureBytes Links

Trading Reference Links










Chuck: thanks for your reply, I am hoping
to receive some more speculations from folks.

 

SIG is just a summary of other standard
signals, MACD crossings and the like.  Values range from 1 to 4. Thus, I
am choosing to buy one of the four funds based on the summary of signals about
the market.

 

I started with WorstRankHeld=1 but had the
same result.  Tried others too. No help.  I thought rotationalmode
closes open trades when the rank changes.

 

Anyway, thanks.  Hope things are
going well with you.

 

Ken

 

-----Original Message-----
From: Chuck Rademacher
[mailto:chuck_rademacher@xxxxxxxxxx] 
Sent: Wednesday, February 25, 2004
10:56 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] No Trades
in Rotational Mode

 



Ken,





 





I can't help but think that you may be
opening your first position and never closing it.   Of course, I
can't tell what is going on with your SIG calculation.  I would try
reducing WRH to 1 or 2 and trying it that way.   Otherwise, I'm
stumped!!







<font size=2
face="Times New Roman">-----Original
Message-----
From: Ken Close
[mailto:closeks@xxxxxxxx]
Sent: Wednesday, February 25, 2004
8:32 PM
To: AmiBroker List
Subject: [amibroker] No Trades in
Rotational Mode



I
am hoping someone has a simple fix for a perplexing problem.

I
have a simple four fund system, with a fairly simple scoring <font
size=2 face=Verdana>algorithm. 
I am simply "forcing" a score upon each of 4 funds depending on a Sig
value.  As the Sig value changes, I want to hold 1 <font
size=2 face=Verdana>particular
fund,
and I "force" the score for the fund I want to be the highest.

A
portion of the scoring code is as follows:

RS =(Sig<<font
size=2 color=fuchsia face="Courier New">2 <font
size=2 color=red face="Courier New">AND <font
size=2 color=blue face="Courier New">Name<font
size=2 color=black face="Courier New">()==<font
size=2 color=fuchsia face="Courier New">"SML4"<font
size=2 color=black face="Courier New">)*<font
size=2 color=fuchsia face="Courier New">10<font
size=2 color=black face="Courier New"> +

   
(Sig<<span
>2 <span
>AND
Name<font
size=2 color=black face="Courier New">()==<font
size=2 color=fuchsia face="Courier New">"SML3"<font
size=2 color=black face="Courier New">)*<font
size=2 color=fuchsia face="Courier New">4<font
size=2 color=black face="Courier New"> + 

   
(Sig<<span
>2 <span
>AND
Name<font
size=2 color=black face="Courier New">()==<font
size=2 color=fuchsia face="Courier New">"SML2"<font
size=2 color=black face="Courier New">)*<font
size=2 color=fuchsia face="Courier New">6<font
size=2 color=black face="Courier New"> +

   
(Sig<<span
>2 <span
>AND
Name<font
size=2 color=black face="Courier New">()==<font
size=2 color=fuchsia face="Courier New">"SML1"<font
size=2 color=black face="Courier New">)*<font
size=2 color=fuchsia face="Courier New">8<font
size=2 color=black face="Courier New"> +

   
(Sig==<span
>2 <span
>AND
Name<font
size=2 color=black face="Courier New">()==<font
size=2 color=fuchsia face="Courier New">"SML4"<font
size=2 color=black face="Courier New">)*<font
size=2 color=fuchsia face="Courier New">8<font
size=2 color=black face="Courier New"> +

   
(Sig==<span
>2 <span
>AND
Name<font
size=2 color=black face="Courier New">()==<font
size=2 color=fuchsia face="Courier New">"SML3"<font
size=2 color=black face="Courier New">)*<font
size=2 color=fuchsia face="Courier New">10<font
size=2 color=black face="Courier New"> + 

   
(Sig==<span
>2 <span
>AND
Name<font
size=2 color=black face="Courier New">()==<font
size=2 color=fuchsia face="Courier New">"SML2"<font
size=2 color=black face="Courier New">)*<font
size=2 color=fuchsia face="Courier New">4<font
size=2 color=black face="Courier New"> +

   
(Sig==<span
>2 <span
>AND
Name<font
size=2 color=black face="Courier New">()==<font
size=2 color=fuchsia face="Courier New">"SML1"<font
size=2 color=black face="Courier New">)*<font
size=2 color=fuchsia face="Courier New">6<font
size=2 color=black face="Courier New"> +

etc

PositionScore
= RS;

Try
as I might, I cannot get it to show any open positions, although it does appear
to score everything correctly for every bar in the test range.

The
detailed log shows the funds being scored but no Open positions.

<font size=3
face="Times New Roman">




All
settings have been triple checked (see PS below for completeness), but is there
anything obvious <span
>that I am leaving off based on
just this info.  <span
>The SML1, SML2, SML3, and SML4
shown above, which are the four "funds" contained in the watchlist,
are "calculated" from combinations of real funds and would not be
available to any of you.  Each SMLx "fund", when plotted, looks
like any other fund price plot.

Any
comments, public or private, would be appreciated.

Ken


PS:

EnableRotationalTrading<font
size=2 color=black face="Courier New">();  <font
size=2 color=green face="Courier New">//This allows rotational mode to
occur and ignores all Buy/Sell/Short/Cover signals.

STARTEQ =
100000<font
size=2 color=black face="Courier New">;<font size=2
color=green face="Courier New">//Optimize("Starting
Equity",100000,25000,1000000,25000);

SetOption<font
size=2 color=black face="Courier New">(<font size=2
color=fuchsia face="Courier New">"InitialEquity"<font
size=2 color=black face="Courier New">, STARTEQ);

SetOption<font
size=2 color=black face="Courier New">(<font size=2
color=fuchsia face="Courier New">"AllowPositionShrinking"<font
size=2 color=black face="Courier New">,<font size=2
color=red face="Courier New">True<font size=2 color=black
face="Courier New">);

SetOption<font
size=2 color=black face="Courier New">(<font size=2
color=fuchsia face="Courier New">"MinShares"<font
size=2 color=black face="Courier New">,<font size=2
color=fuchsia face="Courier New">1<font
size=2 color=black face="Courier New">);  <font
size=2 color=green face="Courier New">//1 for Funds, 100 for Stocks

RoundLotSize<font
size=2 color=black face="Courier New"> = <font
size=2 color=fuchsia face="Courier New">0<font
size=2 color=black face="Courier New">;  <font
size=2 color=green face="Courier New">//0 for Funds, 100 for Stocks

SetTradeDelays<font
size=2 color=black face="Courier New">(<font size=2
color=fuchsia face="Courier New">1<font
size=2 color=black face="Courier New">,<font size=2
color=fuchsia face="Courier New">1<font
size=2 color=black face="Courier New">,<font size=2
color=fuchsia face="Courier New">1<font
size=2 color=black face="Courier New">,<font size=2
color=fuchsia face="Courier New">1<font
size=2 color=black face="Courier New">);  <font
size=2 color=green face="Courier New">//Buy, Sell, Short, Cover delays

BuyPrice<font
size=2 color=black face="Courier New"> = <font
size=2 color=red face="Courier New">C<font size=2
color=black face="Courier New">;  
        <font size=2
color=red face="Courier New">SellPrice<font size=2
color=black face="Courier New"> = <font size=2 color=red
face="Courier New">C<font size=2 color=black
face="Courier New">;

ShortPrice<font
size=2 color=black face="Courier New"> = <font
size=2 color=red face="Courier New">C<font size=2
color=black face="Courier New">;        
CoverPrice<font
size=2 color=black face="Courier New"> = <font
size=2 color=red face="Courier New">C<font size=2
color=black face="Courier New">;

SetOption<font
size=2 color=black face="Courier New">(<font size=2
color=fuchsia face="Courier New">"AllowSameBarExit"<font
size=2 color=black face="Courier New">,<font size=2
color=red face="Courier New">False<font size=2 color=black
face="Courier New">);

SetOption<font
size=2 color=black face="Courier New">(<font size=2
color=fuchsia face="Courier New">"ActivateStopsImmediately"<font
size=2 color=black face="Courier New">,<font size=2
color=red face="Courier New">False<font size=2 color=black
face="Courier New">);

SetOption<font
size=2 color=black face="Courier New">(<font size=2
color=fuchsia face="Courier New">"FuturesMode"<font
size=2 color=black face="Courier New">,<font size=2
color=red face="Courier New">False<font size=2 color=black
face="Courier New">);

SetOption<font
size=2 color=black face="Courier New">(<font size=2
color=fuchsia face="Courier New">"InterestRate"<font
size=2 color=black face="Courier New">,<font size=2
color=fuchsia face="Courier New">0.00<font
size=2 color=black face="Courier New">);

//==================== 
Rotational Trading Settings  ====================

MaxPos = <font
size=2 color=fuchsia face="Courier New">1<font
size=2 color=black face="Courier New">;<font size=2
color=green face="Courier New">//Param("Maximum # of Open
Positions",2,1,15,1);//Optimize("Max Positions",5,1,15,1);

SetOption<font
size=2 color=black face="Courier New">(<font size=2
color=fuchsia face="Courier New">"MaxOpenPositions"<font
size=2 color=black face="Courier New">,MaxPos);

PositionSize<font
size=2 color=black face="Courier New"> = <font
size=2 color=fuchsia face="Courier New">1000<font
size=2 color=black face="Courier New">;<font size=2
color=green face="Courier New">///MaxPos; //Minus sign = %, otherwise dollars

Factor = <font
size=2 color=blue face="Courier New">Param<font
size=2 color=black face="Courier New">(<font size=2
color=fuchsia face="Courier New">"WRH Multiple of MaxPos"<font
size=2 color=black face="Courier New">,<font size=2
color=fuchsia face="Courier New">2<font
size=2 color=black face="Courier New">,<font size=2
color=fuchsia face="Courier New">1<font
size=2 color=black face="Courier New">,<font size=2
color=fuchsia face="Courier New">50<font
size=2 color=black face="Courier New">,<font size=2
color=fuchsia face="Courier New">1<font
size=2 color=black face="Courier New">);  <font
size=2 color=green face="Courier New">//What multiple of MaxPositions

WRH = <font
size=2 color=fuchsia face="Courier New">3<font
size=2 color=black face="Courier New">;<font size=2
color=green face="Courier New">//MaxPos * Factor;  //Worst Rank Held
calculated as a multiple of MaxPositions

SetOption<font
size=2 color=black face="Courier New">(<font size=2
color=fuchsia face="Courier New">"WorstRankHeld"<font
size=2 color=black face="Courier New">,WRH);



Send
BUG REPORTS to bugs@xxxxxxxxxxxxx<font size=2
face="Courier New">
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to:
amiquote@xxxxxxxxxxxxxxx 
(Web page: <a
href="">http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: <a
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html





Send BUG
REPORTS to bugs@xxxxxxxxxxxxx<span
>
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to:
amiquote@xxxxxxxxxxxxxxx 
(Web page: <a
href="">http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: <a
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html













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 Sponsor


ADVERTISEMENT




Click Here















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 the Yahoo! Terms of Service.