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

Re: [EquisMetaStock Group] Re:Creating a Date function



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=6183
------------------------------------------------------------------------

Gordon

I believe I've found the logic mistake. Introducing LastValue() makes sure
that the check for a match is confined to the last 65 bars. I think the
likely hood of the "single digit precision" error cropping up again is
unlikely as long as you stick with the 2 digit year. I'm not saying this
code is perfect for what you need but it is after all only an attempt to
point you in the right direction. There aren't too many people around that
can even get their own code working properly first time, so regard this as
an improved prototype rather than the production model.

Don't attempt to use this code in the system tester - LastValue() has very
few applications when back-testing system code, and this isn't one of them.

D:=ValueWhen(1,LastValue(LLV(C,65))=C, DayOfMonth());
M:=ValueWhen(1,LastValue(LLV(C,65))=C,Month());
Y:=ValueWhen(1,LastValue(LLV(C,65))=C,Year());
D*10000+M*100+Int(Frac(Y/100)*100.01);

Roy



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/