PureBytes Links
Trading Reference Links
|
l1ntt
An indicator as simple as that below will count the total number of bars in
a chart, and therefore allow you to easily calculate the difference between
two bars. This will not count missing bars or weekends. This simple concept
can be enhanced by adding a bar count to a date filter as demonstrated in
the second indicator. If neither of these methods is appropriate the you
should investigate the work of Jose Silva at StockCentral.
Hope this helps.
Roy
{Bar Count}
Cum(1);
{Date Filter Count}
Sd:=Input("Start day" ,1,31,1);
Sm:=Input("Start month",1,12,1);
Sy:=Input("Start year" ,1980,2003,2000);
Ed:=Input("End day" ,1,31,20);
Em:=Input("End month" ,1,12,6);
Ey:=Input("End year" ,1980,2003,2003);
Df:=((DayOfMonth() >= Sd AND Month() = Sm AND
Year()=Sy) OR Year() > Sy OR (Year() = Sy AND
Month() > Sm))
AND
((DayOfMonth() <= Ed AND Month()=Em AND
Year() = Ey) OR Year() < Ey OR (Year() = Ey AND
Month() < Em));
If(Df,Cum(Df),0);
----- Original Message -----
From: "l1ntt" <l1ntt@xxxxxxxxx>
To: <equismetastock@xxxxxxxxxxxxxxx>
Sent: Friday, May 09, 2003 9:13 AM
Subject: [EquisMetaStock Group] count number of day between dates
> Hello Everyone,
>
> I would like to know that there may be such a program in Metastock I
> can use to count number of day between two dates. For example,I do
> reverse count from 4/30/2003 to 4/2/2003 that is 20-day including
> Holiday. it is not an easy task to count hundreds days manually. I
> appreciate anyone can help me with this or point me towards a right
> direction.
>
> Thank You
>
>
>
> To unsubscribe from this group, send an email to:
> equismetastock-unsubscribe@xxxxxxxxxxxxxxx
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs Online - Over 14,500 titles.
No Late Fees & Free Shipping.
Try Netflix for FREE!
http://us.click.yahoo.com/YoVfrB/XP.FAA/uetFAA/BefplB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|