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

[EquisMetaStock Group] RE:Re: Bar Count since certain date


  • To: <equismetastock@xxxxxxxxxxxxxxx>
  • Subject: [EquisMetaStock Group] RE:Re: Bar Count since certain date
  • From: "SR" <raftsp@xxxxxxxxx>
  • Date: Sat, 4 Jan 2003 05:01:14 -0800
  • In-reply-to: <1041679602.1129.25266.m12@xxxxxxxxxxxxxxx>

PureBytes Links

Trading Reference Links

------------------------------------------------------------------------
You cannot reply to this message via email because you have chosen not
to disclose your email address to the group.

To reply:  http://groups.yahoo.com/group/equismetastock/post?act=reply&messageNum=5955
------------------------------------------------------------------------

Ok I saw a failure in 1998. You are right.
You don't need to send me any dates.
And sorry about the "separate" day -month - year. I was refering to
lhgoh99's compact date format.
Your solution is fine.


Message: 9
   Date: Fri, 03 Jan 2003 17:15:29 -0000
   From: "bruneski <iniciante_2000@xxxxxxxxxxx>"
<iniciante_2000@xxxxxxxxxxx>
Subject: Re: Bar Count since certain date

Hi Spyros! Back again!

Well your new formulation seems to work fine for most dates, but
fails for each day of December of each year up until 2001 (I didn't
really check why!).

Now ... I do have a suggestion that might do the trick:

build numbers that represent complete dates 'positionally' (that is,
transforms, say, Nov 25, 2001 into 20011125).

There it goes:
d:=Input("Day",1,31,1);
m:=Input("Month",1,12,1);
y:=Input("Year",1920,2030,2002);
mydate:= 10000*y + 100*m + d;
date:= 10000*Year() + 100*Month() + DayOfMonth();
count:=BarsSince(mydate<=date); {use '<' if first day is not to be
counted}
count:=count + Cum(If(count=0,1,0));
count

Looks nice, doesn't it? Better yet, seems to work! :-D

Would you care to verify it?

Thanks for your enlightening insights!!! Take it easy.

count










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/