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

Re: [EquisMetaStock Group] Slooow code problem..



PureBytes Links

Trading Reference Links

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 Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/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/