PureBytes Links
Trading Reference Links
|
Hi Roy
MS 9.0. I was coding a TradeSim exploration. There is one existing formula
call in the code. I originally wrote this as another formula call, but then
decided to hard code it for the reason you mention.
Since my earlier email the program crashed completely and I had to reinstall
with the help of Equis support. That particular Exploration was lost
entirely. This is now the second time I've had a program crash with MS9.0
that has lost data - last time it was all my Favorites.
So now I'll just spend a few unhappy hours trying to reconstruct it - maybe
it'll be faster next time....
Best
Andrew
-----Original Message-----
From: Roy Larsen [mailto:rlarsen@xxxxxxxxxxxxxx]
Sent: Tuesday, August 31, 2004 3:19 PM
To: equismetastock@xxxxxxxxxxxxxxx
Subject: Re: [EquisMetaStock Group] Slooow code problem..
Andrew
> As part of a developing system, I have an exit when a prior gap is
> closed (a gap is one of the entry conditions). I have used the
> following code, but it seems very slow to run (almost like a couple of
> PREV statements). Does anyone have any ideas what the problem is and
> how it could be coded to run faster?
This piece of code doesn't look at all capable of slowing things down.
Things will start to slow if you have several Fml() calls. You don't mention
what version you're using, or whether it's the System Tester or the Explorer
that's causing the problem. The 8.01/9.0 System Tester defaults to high
priority so that shouldn't be the problem. The Pre 8.0 Explorer may run slow
if set to low execution priority. This caught me out the other day after I
had changed it from medium for some reason.
> {for long exit}
> C< ValueWhen(1,GapUp(),Ref(H,-1))
> {i.e. gives signal when today's close falls below the high that
> preceded the gap up. Gapup() is one of the entry conditions, so I'm
> not worried about prior gap closes}
>
> Is ValueWhen as bad as PREV?
Not in my experience. The only problem with ValueWhen() is that it may need
a lot of data to guarantee a "trigger" (and avoid an N/A result), but the
slowing factor then is the amount of data, not the ValueWhen() function.
Have you tried changing pieces of code as an exercise to see when the
problem goes away? There will be a valid reason for the slowness, but I
can't think of a reason for the problem that relates to the code shown.
Roy
Yahoo! Groups Links
------------------------ Yahoo! Groups Sponsor --------------------~-->
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/BefplB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> 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/
|