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=5954
------------------------------------------------------------------------
Fails on each day of December of each year up to 2001???!!
Strange! I tried many times with the data I have (Greek stocks) and I didn't
see any failure!
Do you mind telling me the exact dates of the failures?
What I need is the available dates on each side of the missing ones.
For example if there is a failure in December 2000, then tell me:
On 12/28/2000 it was OK
Between 12/29/2000 and 1/3/2001 it disappeared.
Finally on 1/4/2001 it appeared again.
Would you mind sending me this information please?
I like the short versions posted, but I prefer to have separate inputs for
Day, Month and Year.
So I want to try to correct this, but if I don't see it then I can't.
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.
=====================================================================
--- In equismetastock@xxxxxxxxxxxxxxx, "SR" <raftsp@xxxx> wrote:
> There are times (like this) when I feel like a beginner, too.
>
> I hope that the newer version fixes the bug.
> If you see anything else please tell me. Here is the code:
> -----------------------------
>
> {BarsSinceDate}
>
> d:=Input("Day",1,31,1);
> m:=Input("Month",1,12,1);
> y:=Input("Year",1920,2030,2002);
>
> cond1:= d<DayOfMonth() AND m=Month() AND y=Year();{normal situation}
> cond2:= d>DayOfMonth() AND m+1 =Month() AND y=Year();{change of
month}
> cond3:= d>DayOfMonth() AND m=12 AND y+1=Year();{change of year}
>
> count:=BarsSince(cond1 OR cond2 OR cond3);
> count:=count + Cum(If(count=0,1,0));
> 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/
|