PureBytes Links
Trading Reference Links
|
Dear Jon,
Foreign() and RelStrength functions are indeed much
slower than
the rest because these function must matchthe
dates from one
stock to another to generate price arrays
that are "compatible" with currently
selected stock.
For example currently selected stock may have
2-year history only and
the index you are comparing to can
have 20-year history.
Foreign() and RelStrength() functions during
generation of price arrays
must find bars in index arrays that match the
dates of the currently selected stock.
What is even worse, selected stock ,
may be not traded everyday and these functions
must be aware of this fact. This makes them
slow.
To overcome
this issue use Foreign() or Relstrength() call only ONCE in your
formula, assign it to the variable and then use the
variable instead of calling Foreign multiple times,
as shown below:
fclose = Foreign("^DJI", "C" );
fchange = fclose - ref( fclose, -5 );
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
<BLOCKQUOTE
>
<DIV
>From:
jonf
To: <A title=amibroker@xxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: 11 September, 2001 00:43
Subject: [amibroker] foreigh
Tomatz,
Is it normal that the speed is decreasing dramatically when
we use the foreign() and/or RelStrength()AFL
function !
The speed is decreasing even more than if we write
Jscript/VBscript inside AFL !
Also, are you recalculate the AFL of an indicator each
time we use the scroll bar ? is it possible to calculate everything when
we change the current symbol and do only a redraw when we scroll
?
Thanks for you reply !
Jon.
Your
use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
|