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

RE: [amibroker] CSI data in AB's native format (speed vs convenience)



PureBytes Links

Trading Reference Links




<FONT face=Arial color=#0000ff 
size=2>Ken,
<FONT face=Arial color=#0000ff 
size=2> 
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!!
<BLOCKQUOTE 
>
  <FONT face="Times New Roman" 
  size=2>-----Original Message-----From: Ken Close 
  [mailto:closeks@xxxxxxxx]Sent: Wednesday, February 25, 2004 8:32 
  PMTo: AmiBroker ListSubject: [amibroker] No Trades in 
  Rotational Mode
  I am hoping someone 
  has a simple fix for a perplexing problem.<SPAN 
  lang=en-us>
  I have a simple four 
  fund system, with a fairly simple scoring<SPAN 
  lang=en-us> <FONT face=Verdana 
  size=2>algorithm.<FONT 
  face=Verdana size=2>  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 face=Verdana 
  size=2>particular <FONT 
  face=Verdana size=2>fund<SPAN 
  lang=en-us>, and I "force" the score for the fund I 
  want to be the highest<SPAN 
  lang=en-us>.<SPAN 
  lang=en-us>
  A portion of the 
  scoring code is as follows:
  <FONT face="Courier New" color=#000000 
  size=2>RS =(Sig<<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>2<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2> 
  AND<SPAN 
  lang=en-us><FONT face="Courier New" 
  color=#000000 size=2><SPAN 
  lang=en-us> <FONT face="Courier New" color=#0000ff 
  size=2>Name<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>()==<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>"SML4"<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>)*<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>10<SPAN 
  lang=en-us> 
  +
  <FONT face="Courier New" color=#000000 
  size=2>    (Sig<<SPAN 
  lang=en-us><FONT face="Courier New" 
  color=#ff00ff size=2>2<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2> 
  AND<SPAN 
  lang=en-us><FONT face="Courier New" 
  color=#000000 size=2><SPAN 
  lang=en-us> <FONT face="Courier New" color=#0000ff 
  size=2>Name<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>()==<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>"SML3"<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>)*<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>4<SPAN 
  lang=en-us> + 
  
  <FONT face="Courier New" color=#000000 
  size=2>    (Sig<<SPAN 
  lang=en-us><FONT face="Courier New" 
  color=#ff00ff size=2>2<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2> 
  AND<SPAN 
  lang=en-us><FONT face="Courier New" 
  color=#000000 size=2><SPAN 
  lang=en-us> <FONT face="Courier New" color=#0000ff 
  size=2>Name<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>()==<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>"SML2"<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>)*<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>6<SPAN 
  lang=en-us> 
  +
  <FONT face="Courier New" color=#000000 
  size=2>    (Sig<<SPAN 
  lang=en-us><FONT face="Courier New" 
  color=#ff00ff size=2>2<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2> 
  AND<SPAN 
  lang=en-us><FONT face="Courier New" 
  color=#000000 size=2><SPAN 
  lang=en-us> <FONT face="Courier New" color=#0000ff 
  size=2>Name<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>()==<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>"SML1"<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>)*<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>8<SPAN 
  lang=en-us> 
  +
  <FONT face="Courier New" color=#000000 
  size=2>    (Sig==<SPAN 
  lang=en-us><FONT face="Courier New" 
  color=#ff00ff size=2>2<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2> 
  AND<SPAN 
  lang=en-us><FONT face="Courier New" 
  color=#000000 size=2><SPAN 
  lang=en-us> <FONT face="Courier New" color=#0000ff 
  size=2>Name<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>()==<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>"SML4"<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>)*<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>8<SPAN 
  lang=en-us> 
  +
  <FONT face="Courier New" color=#000000 
  size=2>    (Sig==<SPAN 
  lang=en-us><FONT face="Courier New" 
  color=#ff00ff size=2>2<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2> 
  AND<SPAN 
  lang=en-us><FONT face="Courier New" 
  color=#000000 size=2><SPAN 
  lang=en-us> <FONT face="Courier New" color=#0000ff 
  size=2>Name<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>()==<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>"SML3"<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>)*<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>10<SPAN 
  lang=en-us> + 
  
  <FONT face="Courier New" color=#000000 
  size=2>    (Sig==<SPAN 
  lang=en-us><FONT face="Courier New" 
  color=#ff00ff size=2>2<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2> 
  AND<SPAN 
  lang=en-us><FONT face="Courier New" 
  color=#000000 size=2><SPAN 
  lang=en-us> <FONT face="Courier New" color=#0000ff 
  size=2>Name<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>()==<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>"SML2"<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>)*<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>4<SPAN 
  lang=en-us> 
  +
  <FONT face="Courier New" color=#000000 
  size=2>    (Sig==<SPAN 
  lang=en-us><FONT face="Courier New" 
  color=#ff00ff size=2>2<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2> 
  AND<SPAN 
  lang=en-us><FONT face="Courier New" 
  color=#000000 size=2><SPAN 
  lang=en-us> <FONT face="Courier New" color=#0000ff 
  size=2>Name<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>()==<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>"SML1"<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>)*<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>6<SPAN 
  lang=en-us> 
  +
  etc
  PositionScore = 
  RS;
  Try as I might, I 
  cannot get it to show any open positions<SPAN 
  lang=en-us>, although it 
  does appear to score everything correctly for every bar in the test 
  range<FONT face=Verdana 
  size=2>.
  The detailed log 
  shows the funds being scored but no Open positions.<SPAN 
  lang=en-us>
  All settings have 
  been triple checked<SPAN 
  lang=en-us> (see PS below for 
  completeness)<FONT 
  face=Verdana size=2>, but is there any<SPAN 
  lang=en-us><FONT face=Verdana 
  size=2>thing<FONT 
  face=Verdana size=2> obvious<SPAN 
  lang=en-us> that<SPAN 
  lang=en-us> I am leaving off 
  based on just this info. <SPAN 
  lang=en-us> T<SPAN 
  lang=en-us>he 
  SML<FONT face=Verdana 
  size=2>1, 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.<SPAN 
  lang=en-us>  Each SMLx 
  "fund", when plotted, looks like any other fund price plot.<SPAN 
  lang=en-us>
  Any comments, public 
  or private, would be appreciated.
  <FONT face=Verdana 
  size=2>Ken<FONT 
  face=Verdana size=2> 
  
  PS:
  <FONT face="Courier New" color=#0000ff 
  size=2>EnableRotationalTrading<SPAN 
  lang=en-us><FONT face="Courier New" 
  color=#000000 size=2>(); <SPAN 
  lang=en-us> <FONT face="Courier New" 
  color=#008000 size=2>//This allows rotational mode to occur and ignores all 
  Buy/Sell/Short/Cover signals.<SPAN 
  lang=en-us>
  <FONT face="Courier New" color=#000000 
  size=2>STARTEQ =<SPAN 
  lang=en-us> <FONT face="Courier New" color=#ff00ff 
  size=2>100000<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>;<SPAN 
  lang=en-us><FONT face="Courier New" color=#008000 
  size=2>//Optimize("Starting 
  Equity",100000,25000,1000000,25000);<SPAN 
  lang=en-us>
  <FONT face="Courier New" color=#0000ff 
  size=2>SetOption<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>(<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>"InitialEquity"<SPAN 
  lang=en-us>, 
  STARTEQ);
  <FONT face="Courier New" color=#0000ff 
  size=2>SetOption<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>(<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>"AllowPositionShrinking"<SPAN 
  lang=en-us><FONT face="Courier New" 
  color=#000000 size=2>,<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff0000 
  size=2>True<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>);
  <FONT face="Courier New" color=#0000ff 
  size=2>SetOption<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>(<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>"MinShares"<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>,<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>1<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>); <SPAN 
  lang=en-us> //1 for Funds, 
  100 for Stocks<SPAN 
  lang=en-us>
  <FONT face="Courier New" color=#ff0000 
  size=2>RoundLotSize<SPAN 
  lang=en-us> 
  = <FONT 
  face="Courier New" color=#ff00ff size=2>0<SPAN 
  lang=en-us><FONT face="Courier New" 
  color=#000000 size=2>; <SPAN 
  lang=en-us> <FONT face="Courier New" 
  color=#008000 size=2>//0 for Funds, 100 for Stocks<SPAN 
  lang=en-us>
  <FONT face="Courier New" color=#0000ff 
  size=2>SetTradeDelays<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>(<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>1<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>,<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>1<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>,<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>1<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>,<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>1<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>); <SPAN 
  lang=en-us> //Buy, Sell, 
  Short, Cover delays<SPAN 
  lang=en-us>
  <FONT face="Courier New" color=#ff0000 
  size=2>BuyPrice<SPAN 
  lang=en-us> 
  = <FONT 
  face="Courier New" color=#ff0000 size=2>C<SPAN 
  lang=en-us><FONT face="Courier New" 
  color=#000000 size=2>;   
         <SPAN 
  lang=en-us> <FONT face="Courier New" 
  color=#ff0000 size=2>SellPrice<SPAN 
  lang=en-us><FONT face="Courier New" 
  color=#000000 size=2> =<SPAN 
  lang=en-us> <FONT face="Courier New" color=#ff0000 
  size=2>C<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>;
  <FONT face="Courier New" color=#ff0000 
  size=2>ShortPrice<SPAN 
  lang=en-us> 
  = <FONT 
  face="Courier New" color=#ff0000 size=2>C<SPAN 
  lang=en-us><FONT face="Courier New" 
  color=#000000 size=2>; 
         <SPAN 
  lang=en-us> <FONT face="Courier New" 
  color=#ff0000 size=2>CoverPrice<SPAN 
  lang=en-us><FONT face="Courier New" 
  color=#000000 size=2> =<SPAN 
  lang=en-us> <FONT face="Courier New" color=#ff0000 
  size=2>C<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>;
  <FONT face="Courier New" color=#0000ff 
  size=2>SetOption<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>(<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>"AllowSameBarExit"<SPAN 
  lang=en-us><FONT face="Courier New" 
  color=#000000 size=2>,<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff0000 
  size=2>False<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>);
  <FONT face="Courier New" color=#0000ff 
  size=2>SetOption<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>(<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>"ActivateStopsImmediately"<SPAN 
  lang=en-us><FONT face="Courier New" 
  color=#000000 size=2>,<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff0000 
  size=2>False<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>);
  <FONT face="Courier New" color=#0000ff 
  size=2>SetOption<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>(<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>"FuturesMode"<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>,<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff0000 
  size=2>False<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>);
  <FONT face="Courier New" color=#0000ff 
  size=2>SetOption<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>(<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>"InterestRate"<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>,<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>0.00<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>);
  <FONT face="Courier New" color=#008000 
  size=2>//====================  Rotational Trading Settings  
  ====================<SPAN 
  lang=en-us>
  <FONT face="Courier New" color=#000000 
  size=2>MaxPos =<SPAN 
  lang=en-us> <FONT face="Courier New" color=#ff00ff 
  size=2>1<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>;<SPAN 
  lang=en-us>//Param("Maximum # 
  of Open Positions",2,1,15,1);//Optimize("Max 
  Positions",5,1,15,1);<SPAN 
  lang=en-us>
  <FONT face="Courier New" color=#0000ff 
  size=2>SetOption<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>(<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>"MaxOpenPositions"<SPAN 
  lang=en-us><FONT face="Courier New" 
  color=#000000 size=2>,MaxPos);
  <FONT face="Courier New" color=#ff0000 
  size=2>PositionSize<SPAN 
  lang=en-us> 
  = <FONT 
  face="Courier New" color=#ff00ff size=2>1000<SPAN 
  lang=en-us><FONT face="Courier New" 
  color=#000000 size=2>;<SPAN 
  lang=en-us>///MaxPos; //Minus 
  sign = %, otherwise dollars<SPAN 
  lang=en-us>
  <FONT face="Courier New" color=#000000 
  size=2>Factor =<SPAN 
  lang=en-us> <FONT face="Courier New" color=#0000ff 
  size=2>Param<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>(<SPAN 
  lang=en-us>"WRH Multiple of 
  MaxPos"<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>,<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>2<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>,<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>1<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>,<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>50<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>,<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>1<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>); <SPAN 
  lang=en-us> //What multiple 
  of MaxPositions<SPAN 
  lang=en-us>
  <FONT face="Courier New" color=#000000 
  size=2>WRH =<SPAN 
  lang=en-us> <FONT face="Courier New" color=#ff00ff 
  size=2>3<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>;<SPAN 
  lang=en-us>//MaxPos * 
  Factor;  //Worst Rank Held calculated as a multiple of 
  MaxPositions<SPAN 
  lang=en-us>
  <FONT face="Courier New" color=#0000ff 
  size=2>SetOption<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>(<SPAN 
  lang=en-us><FONT face="Courier New" color=#ff00ff 
  size=2>"WorstRankHeld"<SPAN 
  lang=en-us><FONT face="Courier New" color=#000000 
  size=2>,WRH);Send BUG REPORTS to 
  bugs@xxxxxxxxxxxxxSend 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.