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

[Metastockusers] Re: CALENDER OF WEEK



PureBytes Links

Trading Reference Links

>From http://metastocktools.com/#metastock :

MetaStock -> Tools -> Indicator Builder -> New
-> Copy and paste formula below.

=====================
Calendar Week counter
=====================
---8<---------------------------

{ Week counter v2.0, Gregorian calendar }
{ Count is independent of any missing chart data }
{ (c) Copyright 2003-2004 Jose Silva }
{ http://www.metastocktools.com }

limit:=2000;  {do not change limit year}
LimLeap:=Frac(limit/4)=0 AND Frac(limit/100)<>0
 OR Frac(limit/400)=0;
NoCount:=limit*365+Int(limit/4)
 -Int(limit/100)+Int(limit/400)-LimLeap;
leap:=Frac(Year()/4)=0 AND Frac(Year()/100)<>0
 OR Frac(Year()/400)=0;
y:=Year()*365+Int(Year()/4)
 -Int(Year()/100)+Int(Year()/400)-NoCount;
m:=
 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)))))))))));
DayNr:=y+m+DayOfMonth();
WkCount:=Int((DayNr-1)/7)+(Year()>=limit);

WkCount

---8<---------------------------


jose '-)
http://www.metastocktools.com




--- In Metastockusers@xxxxxxxxxxxxxxx, "serkan serbest" 
<agozgen@xxxx> wrote:
> could someone copy the formula of ("Calendar Week counter") ?
> thanks






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/DldnlA/9M2KAA/U1CZAA/zMEolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Metastockusers/

<*> To unsubscribe from this group, send an email to:
    Metastockusers-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/