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

Re: [amibroker] StoRSI + 144MA + BB rank



PureBytes Links

Trading Reference Links




Hi Greg,
 
I would love to compare results with you--good or 
bad.
 
Just let me know your settings and 
stocks.
 
-john
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  Greg 
  
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Thursday, December 18, 2003 5:34 
  AM
  Subject: Re: [amibroker] StoRSI + 144MA + 
  BB rank
  
  Hi,
  Forget it . I had not tested over enough time periods. Doesn't look so 
  good to me now. Back to the drawing board.
   
  Greg
  <BLOCKQUOTE 
  >
    ----- Original Message ----- 
    <DIV 
    >From: 
    Greg 
    
    To: <A title=amibroker@xxxxxxxxxxxxxxx 
    href="">AmiBroker@xxxxxxxxxxx 
    Sent: Thursday, December 18, 2003 9:13 
    AM
    Subject: [amibroker] StoRSI + 144MA + 
    BB rank
    
    
    Hi,
     
    I was trying to workout a system in Amibroker that would use 
    StoRSI and 144 Ma for trading rules.
     
     I wasn't having great results until I added a ranking method 
    presented by Gary Serkoshian in his slideshow presentation. It used 
    BollingerBands to score and rank the trades. 
     
     The following Amibroker Code is what I came up with. 
     
    Try it and tell me what you think about the system if you care to 
    comment and get the time. This is intended for trading a portfolio of two or 
    more stocks and won't improve the score of only one stock. 
    
     
    // Stochastic - RSI , recommended by Steve 
    Karnish //
    
    // With portfolio mode //
    /*****
    ** REGULAR PORTFOLIO mode 
    ** This sample optimization
    ** finds what is optimum number of positions open simultaneously
    ** 
    ****/
    SetOption(<FONT color=#ff00ff 
    size=1>"InitialEquity", <FONT color=#ff00ff 
    size=1>10000 );
    SetTradeDelays(<FONT color=#ff00ff 
    size=1>1,1<FONT 
    size=1>,1,<FONT 
    color=#ff00ff size=1>1);
    RoundLotSize = 1<FONT 
    size=1>; 
    posqty = Optimize<FONT 
    size=1>("PosQty", 
    1, <FONT 
    color=#ff00ff size=1>1, <FONT color=#ff00ff 
    size=1>20, <FONT color=#ff00ff 
    size=1>1 );
    SetOption(<FONT color=#ff00ff 
    size=1>"MaxOpenPositions", posqty);<FONT 
    color=#008000 size=1>
    // desired position size is 100% portfolio equity
    // divided by PosQty positions
    PositionSize = -100<FONT 
    size=1>/posqty; 
    // The StoRSI system ......
    //
    StoRSI = EMA<FONT 
    size=1>((scRSI<FONT 
    size=1>(C,8) - 
    LLV<FONT 
    size=1>(scRSI<FONT 
    size=1>(C,8<FONT 
    size=1>),8))/
    (HHV<FONT 
    size=1>(scRSI<FONT 
    size=1>(C,8<FONT 
    size=1>),8) - 
    LLV<FONT 
    size=1>(scRSI<FONT 
    size=1>(C,8<FONT 
    size=1>),8<FONT 
    size=1>)),3<FONT 
    size=1>)*100;
    BL=11;
    SL=89<FONT 
    size=1>;
    //Trend qualifier .....
    x=MA<FONT 
    size=1>(C,144<FONT 
    size=1>);
    MAlong=x>Ref<FONT 
    size=1>(x,-1);
    MAshort=x<Ref<FONT 
    size=1>(x,-1<FONT 
    size=1>);
    //
    Buy = Cross<FONT 
    size=1>(11,StoRSI) 
    AND MAlong;
    Sell= Cross<FONT 
    size=1>(StoRSI,89<FONT 
    size=1>);
    Short = Cross<FONT 
    size=1>(89,StoRSI) 
    AND MAshort;// AND 
    MAshort=True;
    Cover = Cross<FONT 
    size=1>(11<FONT 
    size=1>,StoRSI);
    //Plot(Equity(),"Equity",1,1);<FONT 
    color=#008000 size=1>
    // now additional score 
    // that is used to rank equities 
    // when there are more ENTRY signals than available
    // positions/cash<FONT face="Courier New" color=#008000 
size=1>
    //<FONT 
    face="Times New Roman">PositionScore = 100-RSI(); // prefer stocks that have 
    low RSI;
    //
    SetOption(<FONT color=#ff00ff 
    size=1>"WorstRankHeld",<FONT color=#ff00ff 
    size=1>10);
    numerator=(C-<FONT color=#0000ff 
    size=1>BBandBot(C,<FONT color=#ff00ff 
    size=1>21,<FONT color=#ff00ff 
    size=1>2)) ;
    denominator= <FONT color=#0000ff 
    size=1>BBandTop(C,<FONT color=#ff00ff 
    size=1>21,<FONT color=#ff00ff 
    size=1>2)-<FONT color=#0000ff 
    size=1>BBandBot(C,<FONT color=#ff00ff 
    size=1>21,<FONT color=#ff00ff 
    size=1>2) ;
    Rank= 100<FONT 
    size=1>-(100<FONT 
    size=1>*((numerator / denominator))) ;<FONT color=#008000 
    size=1>//HighpositiveScore best Long Candidates,<FONT 
    face="Courier New" color=#008000 size=1>//<FONT color=#008000 
    size=1>Lownegativescore , best Shorts
    //
    PositionScore=rank;
    <FONT 
    size=5> <FONT 
    color=#000000>*****
     I'd be interested to know how this ranking method 
    compares with the Relative Strength ones we talked about 
    recently.
     
    SetOption(<FONT color=#ff00ff 
    size=1>"WorstRankHeld",<FONT color=#ff00ff 
    size=1>10);
    numerator=(C-<FONT color=#0000ff 
    size=1>BBandBot(C,<FONT color=#ff00ff 
    size=1>21,<FONT color=#ff00ff 
    size=1>2)) ;
    denominator= <FONT color=#0000ff 
    size=1>BBandTop(C,<FONT color=#ff00ff 
    size=1>21,<FONT color=#ff00ff 
    size=1>2)-<FONT color=#0000ff 
    size=1>BBandBot(C,<FONT color=#ff00ff 
    size=1>21,<FONT color=#ff00ff 
    size=1>2) ;
    Rank= 100<FONT 
    size=1>-(100<FONT 
    size=1>*((numerator / denominator))) ;<FONT color=#008000 
    size=1>//HighpositiveScore best Long Candidates,<FONT 
    face="Courier New" color=#008000 size=1>//<FONT color=#008000 
    size=1>Lownegativescore , best Shorts
    //
    PositionScore=rank ;
    <FONT 
    color=#0000ff> <FONT 
    color=#000000>*****
     
    Bye for now,
    GregSend 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 
    
    
    Yahoo! Groups Links
    
      To visit your group on the web, go to:<A 
      href="">http://groups.yahoo.com/group/amibroker/  

      To unsubscribe from this group, send an email to:<A 
      href="">amibroker-unsubscribe@xxxxxxxxxxxxxxx  

      Your use of Yahoo! Groups is subject to the <A 
      href="">Yahoo! Terms of Service. 
    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 
  
  
  Yahoo! Groups Links
  
    To visit your group on the web, go to:<A 
    href="">http://groups.yahoo.com/group/amibroker/  

    To unsubscribe from this group, send an email to:<A 
    href="">amibroker-unsubscribe@xxxxxxxxxxxxxxx  

    Your use of Yahoo! Groups is subject to the <A 
    href="">Yahoo! Terms of Service. 
  


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 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.