PureBytes Links
Trading Reference Links
|
Adam,
I haven't confirmed the effect on computation speed, but this post from
SI addressed a similar question last year. Preassigning variables
directly within a formula would seem to be the most efficient method.
Craig
=============
Talk : Market Trends : Metastock 6.0 for Window
To: Craig DeHaan (1795 )
From: Paul Beattie
Sunday, Mar 29 1998 3:40PM ET
Reply # of 2856
Craig,
MSWIN6.5 precompiles its formulas, in indicators, experts and
explorations as far as I can tell. MSWIN6 did not do that. On my
machine, the time it takes to run an exploration with:
A:=Fml("Insynch Index");
A>Ref(A,-1)
is significantly less than it takes with:
Fml("Insynch Index")>Ref(Fml("Insynch Index"),-1)
In the first case, Insynch is only calculated once. It's harder to
notice
when you're pulling up a chart with indicators, but I think it makes a
difference.
Try it and see.
Paul
========
Adam Hefner wrote:
>
> I am writing a formula, lets call it "Code B" which will use the result (or
> a value of a variable)
> from lets call it "Code A" multiple times.....now, is it more / less
> efficient to "call" the value
> from "A" each time I need it, or would it be better to assign this value to
> a variable in "B" and
> use this "B variable" for all the calculations?
>
> Best wishes,
> Adam Hefner.
> VonHef@xxxxxxxxxxxxx
>
> ---------------------------------------
|