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

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



PureBytes Links

Trading Reference Links

I believe the SetOption("WorstRankHeld",xx) function only operates in 
ROTATIONAL mode.
dale B
--- In amibroker@xxxxxxxxxxxxxxx, "Greg" <gregbean@xxxx> wrote:
> 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
>   ----- Original Message ----- 
>   From: Greg 
>   To: 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("InitialEquity", 10000 );
> 
>   SetTradeDelays(1,1,1,1);
> 
>   RoundLotSize = 1; 
> 
>   posqty = Optimize("PosQty", 1, 1, 20, 1 );
> 
>   SetOption("MaxOpenPositions", posqty);
> 
>   // desired position size is 100% portfolio equity
> 
>   // divided by PosQty positions
> 
>   PositionSize = -100/posqty; 
> 
>   // The StoRSI system ......
> 
>   //
> 
>   StoRSI = EMA((scRSI(C,8) - LLV(scRSI(C,8),8))/
> 
>   (HHV(scRSI(C,8),8) - LLV(scRSI(C,8),8)),3)*100;
> 
>   BL=11;
> 
>   SL=89;
> 
>   //Trend qualifier .....
> 
>   x=MA(C,144);
> 
>   MAlong=x>Ref(x,-1);
> 
>   MAshort=x<Ref(x,-1);
> 
>   //
> 
>   Buy = Cross(11,StoRSI) AND MAlong;
> 
>   Sell= Cross(StoRSI,89);
> 
>   Short = Cross(89,StoRSI) AND MAshort;// AND MAshort=True;
> 
>   Cover = Cross(11,StoRSI);
> 
>   //Plot(Equity(),"Equity",1,1);
> 
>   // now additional score 
> 
>   // that is used to rank equities 
> 
>   // when there are more ENTRY signals than available
> 
>   // positions/cash
> 
>   //PositionScore = 100-RSI(); // prefer stocks that have low RSI;
> 
>   //
> 
>   SetOption("WorstRankHeld",10);
> 
>   numerator=(C-BBandBot(C,21,2)) ;
> 
>   denominator= BBandTop(C,21,2)-BBandBot(C,21,2) ;
> 
>   Rank= 100-(100*((numerator / denominator))) ;//HighpositiveScore 
best Long Candidates,//Lownegativescore , best Shorts
> 
>   //
> 
>   PositionScore=rank;
> 
>    *****
> 
>    I'd be interested to know how this ranking method compares with 
the Relative Strength ones we talked about recently.
> 
>   SetOption("WorstRankHeld",10);
>   numerator=(C-BBandBot(C,21,2)) ;
> 
>   denominator= BBandTop(C,21,2)-BBandBot(C,21,2) ;
> 
>   Rank= 100-(100*((numerator / denominator))) ;//HighpositiveScore 
best Long Candidates,//Lownegativescore , best Shorts
> 
>   //
> 
>   PositionScore=rank ;
> 
>    *****
> 
> 
> 
>   Bye for now,
> 
>   Greg
> 
> 
> 
>   Send BUG REPORTS to bugs@xxxx
>   Send SUGGESTIONS to suggest@xxxx
>   -----------------------------------------
>   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
>              
>        
>        
> 
> 
> --------------------------------------------------------------------
----------
>   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.


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

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/