Hello, Simply Use DayOfWeek() function: http://www.amibroker.com/f?dayofweek
dw = DayOfWeek(); NewWeek = dw != Ref( dw, -1 ); NewYear = Year() != Ref( Year(), -1 ); WeekNumber = Sum( NewWeek, BarsSince( NewYear ) ); Best regards, Tomasz Janeczko amibroker.com ----- Original Message ----- From: "chapman49682" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Monday, October 23, 2006 12:18 AM Subject: [amibroker] WEEKLY function workaround >A suggestion I made at the AmiBroker site recently was a "WEEK" > function similar to "MONTH". I don't, however, think it will happen > any time soon. > > I used MONTH to look back over several years to find which months > each of my various systems worked the best - and worst. It was a > very valuable exercise. > > I would like to go one step further now, and break each month into > two portions: the 1st thru the 15th, and the 16th to the end of > month. > > Can any of you suggest a way I might separate the year into 24 > separate trade entry time periods and be able to Backtest without > regard to the year? What I mean is, I'd like to lump together my > System trades which are entered in the first 2 weeks of January (for > instance) over the last 5 or 10 years, and compare them to the > results for trades entered in the other 2-week periods. > > Any suggestions or thoughts would be welcome. > > > > > > > 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: > http://www.amibroker.com/devlog/ > > For other support material please check also: > http://www.amibroker.com/support.html > > Yahoo! Groups Links > > > > > > 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: http://www.amibroker.com/devlog/ 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/
