PureBytes Links
Trading Reference Links
|
Jeff,
As I remember it, all variables are set at Single Precision by default to conserve resources.
When performing these recursive multiplications over the total bars in a chart, the error
compounds.
It would be interesting if you plotted the difference (I'm assuming your C++ coding was in a
.dll??) and see whether that difference increases as you move from right to left across your data.
I'm not near MetaStock right now either, but I think you will use the function Double()on all of
your variables. I'd check on that though.
Dave
--- Jeff Haferman <haferman@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> Dave Nadeau wrote:
> >Jeff,
> >
> >Could this be a case of single precision mangling? I know there was a
> > discussion on this list
> >several months ago about how Metastock handles precision in calculations. By
> > using PREV we are
> >compounding the issue every time we multiply it. Perhaps changing every
> > variable to double
> >precision just for comparison's sake will produce a closer number.
> >
> >Dave
>
> You might be right... I'll browse through the archives, but
> do you remember the crux of the issue?
>
> I am not near Metastock at the moment, are you saying that I
> should make variables in Metastock double precision? If so,
> how is that done?
>
> Jeff
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
|