There may be an easier way, but it nothing else come to mind you could manually put the worst 5 stocks into watchlist with names like 1999sep, 2000sep, etc. This manual method would require you to rerun your selection formula as an exploration for each september.
Then you could run ATC on each watchlist if you want to see the behavior of the group of 5 as a vector. Good luck. --- In [email protected], "supistarde" <[EMAIL PROTECTED]> wrote: > > Hello, > > I have the following formula problem: > The strategy should always filter the 5 worsest stocks in the > beginning of september. This stocks should be saved and a buy rule > sarts for this five stocks until next september. > How do I save this 5 stocks? How do I add the buy rule? > > Here is the game plan: > PosQty = Param ( "PosQty", 5, 1, 10, 1); // You can define here how > many open > SetOption("MaxOpenPositions", posqty ); > PositionSize = -100/PosQty; // invest 100% of portfolio equity divided > by max. > shortMA=20//Optimize("MAlong",5,1,20,1) > ; > longma=50//Optimize("MAlong",20,20,50,5) > ; > Buy = Month()>=9 AND Cross(MA(C,kurzma),MA(C,Langma)) > ; > Sell = Month()==8 > ; > YearRoc = ROC(Close, 252); > PositionScore = 100-YearRoc; > > Regrds, > supistarde > ------------------------ Yahoo! Groups Sponsor --------------------~--> Something is new at Yahoo! Groups. Check out the enhanced email design. http://us.click.yahoo.com/TktRrD/gOaOAA/yQLSAA/GHeqlB/TM --------------------------------------------------------------------~-> Please note that this group is for discussion between users only. To get support from AmiBroker please send an e-mail directly to SUPPORT {at} amibroker.com For other support material please check also: http://www.amibroker.com/support.html Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/amibroker/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/amibroker/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
