Amory,
I don't exactly what your code is: but here is some more food for thought anyway...
Many traders want to have their stock meet condition-x then some time later meet condition-y as a "confirmation" then, should it not also be the case that an entry might be signalled if condition-y happens first, then condition-x is the conformation?
(Without getting into discussions about indicators, I only want to concentrate on logic)
If so, then instead of just coding to find when condition-x is followed by condition-y:
condition-y AND Alert(condition-x, periods)
we should add the reverse to ensure we get both of the variations that might lead us to an entry:
(condition-y AND Alert(condition-x, periods)) OR
(condition-x AND Alert(condition-y, periods))
Just a thought...
wabbit
"The question of whether a computer can think is no more interesting than the question of whether a submarine can swim."
Edsgar W. Dijkstra
MS: 6.52 EOD, 7.x EOD, 8.0 PRO, 9.2 PRO w/QC, 10 PRO w/QC & MDK
For custom MetaStock programming : http://www.wabbit.com.au
My SkyPE status : 
My SkyPE account : wabbit.com.au