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

Re: EasyLanguage to Metastock conversion



PureBytes Links

Trading Reference Links


Dave,
I'm running MS 6.52, and I don't see a double() function.
There is a PREC() function that deals with precision,
but it looks like it truncates decimal points rather than
expand (but I'll experiment a bit).

But, I think I found the real problem for the disagreement...
I was translating V1[6] from Easylanguage (which means
the value of V1 6 bars ago) to Ref(PREV,-6), but
it should be Ref(PREV,-5) since PREV references the
previous bar.  When Corey supplied his solution, I tried
it out and got much closer agreement.

Thanks to all you folks (Dave, Corey, Brooke, any I missed?)
for all the help.

Jeff

Dave Nadeau wrote:
>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
>
>