The reason is here not a too selective filter, but just wrong code. Look at the original system:

if(numLong(0) == 0 && ....

Your version is missing the (0). In C, a function without argument list is a function pointer, and can never be zero. So your system can never execute any trade.

Anyway better use the trade statistics variables, such as NumOpenLong and NumOpenShort. The old numLong() function is depreciated.