MetaStock -> Tools -> Indicator Builder -> New Copy and paste formula below. ===================== Calendar Week of Year ===================== ---8<--------------------------- { Calendar Week of year counter v2.1 } { count is independent of any missing chart data } { ©Copyright 2003 Jose Silva } { http://www.metastocktools.com } leap:=Frac(Year()/4)=0 AND Frac(Year()/100)<>0 OR Frac(Year()/400)=0; y:=Year()*365-715870 {count from 1960} +Int(Year()/4)-Int(Year()/100)+Int(Year()/400); m:=leap+ If(Month()=2,31-leap, If(Month()=3,59, If(Month()=4,90, If(Month()=5,120, If(Month()=6,151, If(Month()=7,181, If(Month()=8,212, If(Month()=9,243, If(Month()=10,273, If(Month()=11,304, If(Month()=12,334, -leap))))))))))); d:=m+DayOfMonth(); {1st day of week in year} fdy:=Int(Frac((y+.5-leap)/7)*7)+1; {offset necessary for week start sync} offset:=If(fdy=3,2,If(fdy=4,3,If(fdy=5,-3, If(fdy=6,-2,If(fdy=7,-1,1))))); Week:=Int(Frac((d+.5+offset)/(374+offset)) *(374+offset)/7)+1; Week ---8<--------------------------- http://www.metastocktools.com