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. Please use this
page to reply.
<SPAN
class=200272522-30012003>Roy,
<SPAN
class=200272522-30012003>
<SPAN
class=200272522-30012003>Running your revised code on EOD data for Jan 30th,
2003 the revisions have certainly helped so far as the correct year is concerned
so thanks for that. But as Richard Dale kindly reinforced on your thoughts, the
inherent engine within Metastock seems flawed using single (32 bit)
precision and presumably why it still gives the wrong day and/or month
sometimes. I tried adding the following filter:
<SPAN
class=200272522-30012003>
<SPAN
class=200272522-30012003>Mov(C*V,65,S) > 60000 AND Sum(If(V=0,1,0),65) <
1
and I
was loading and applying 600 days data. Apart from removing a few stocks, the
filter did not affect the accuracy of the date. I will ask Equis the
question to see if there is an official work-around (the more people that point
out such niggles with the program the more chance of action in a future updated
version - maybe!). FYI, I enclose my gif file for my current exploration
results.
<SPAN
class=200272522-30012003>
If I
get any positive feedback from Equis I will keep the Group informed. In the
meantime, thank you and other contributors for your assistance and
time.
<SPAN
class=200272522-30012003>
Good
hunting -------------->
<FONT face="Kunstler Script" color=#008000
size=5>Regards,
<FONT face="Kunstler Script" color=#008000
size=5>
Gordon
Sutherland
<FONT
face=Tahoma size=2>-----Original Message-----From:
gosuth@xxxxxxxxxxxx [mailto:gosuth@xxxxxxxxxxxx] Sent: Thursday, 30
January 2003 8:05 p.m.To:
equismetastock@xxxxxxxxxxxxxxxSubject: RE: [EquisMetaStock Group]
Re:Creating a Date function
<SPAN
class=327540207-30012003>Thanks Roy for the clarifications and tweaked code, I
will check out your "antidote" tomorrow morning. Appreciate you
assistance.
<FONT face="Kunstler Script" color=#008000
size=5>Regards,
<FONT face="Kunstler Script" color=#008000
size=5>
Gordon
Sutherland
<FONT
face=Tahoma size=2>-----Original Message-----From: Roy Larsen
[mailto:rlarsen@xxxxxxxxxxxxxx] Sent: Thursday, 30 January 2003
7:58 p.m.To: equismetastock@xxxxxxxxxxxxxxxSubject:
Re: [EquisMetaStock Group] Re:Creating a Date
functionHi Gordon> Thanks to you both
for responding to my request for help on creating a> Date for an
expression in the Explorer.> This certainly gets me along the right
path - thank you - but from the> Gif file attached you will see that
when I ran an Explorer for your> joint responses I get the correct
date sometimes (within the last 65> days) and sometimes a date which
is outside the 65 days and indeed> sometimes into 2004! The Date
Column on the attached gif is from Roy's> code and the Month and Day
are from Joe J.'s - they both agree thank> goodness!There are
at least two causes for your problem, and there may be others thatI
haven't thought of.I think the first and biggest problem relates to
the method MS uses to storenumbers. When the day is multiplied by
1,000,000 we are just asking fortrouble. I think what is happening (I
can't prove but I'm sure I'm right) isthat the addition process is
introducing some fraction which is gettingrounded up to create a year
that is 1 higher than it should be. Thisaccounts for the 2004 for some
issues, and some will no doubt return 2003instead of 2002 for a few
others. Even after my fix you will need to bealert for this.One
solution that appears at first glance to be successful is to truncatethe
year down to two digits. This allows both multipliers to be reduced by
afactor of 100 thus greatly reducing the chance of an error. This
solutionhas problems of its own in that it requires the use of Frac()
which can alsocause tiny errors - the very problem we are trying to get
rid of. I thinkI've got that covered by using Int() after Frac() (inner
functions areprocessed first), and then creating a deliberate error so
that the 2 digityear will have a surplus rather than missing fraction.
Int() will restorethe year to the correct 2 digit value (I think). Just
how you expand thisback to 4 digits I'm not sure but it will depend on
what software you usefor further processing.I found that a
number of thinly traded issues reported years of 1999 andeven further
back. In most cases I'm sure that this applies to issues thatare only
traded once a month or so. If I was you I would use a cutoff datein the
filter so that any issue with less bars than a specified number sincea
specified date would be excluded. This should be quite simple
toconstruct.Make sure your exploration covers more periods than
your lookback period.Using LLV(C,65) should ensure that you have no
problems but it doesn't hurtto stipulate 100, 200 or whatever. I seldom
use less than 400 for anything,and even this is marginal (as far as
accuracy is concerned) for some signalsusing exponential moving
averages.Here is the modified code for the data
column.D:=ValueWhen(1,LLV(C,65)=C,DayOfMonth());M:=ValueWhen(1,LLV(C,65)=C,Month());Y:=ValueWhen(1,LLV(C,65)=C,Year());D*10000+M*100+Int(Frac(Y/100)*100.01);>
I recall there was some discussion on locking into the correct dates
in> the dim and murky past. Do you guys have any further idea why I
am> getting erratic dates. I use the dd/mm/yyyy date inversion and
my> database is Australasian.That will have to suffice until
you come up with further problems. Checkyour results
carefully.RegardsRoyTo
unsubscribe from this group, send an email
to:equismetastock-unsubscribe@xxxxxxxxxxxxxxxYour
use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
To
unsubscribe from this group, send an email
to:equismetastock-unsubscribe@xxxxxxxxxxxxxxxYour
use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
Yahoo! Groups Sponsor
ADVERTISEMENT
To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Attachment:
DateFnct3.gif
Attachment:
Description: "Description: GIF image"
|