rrg script in Signal Tester

Hi, when I use the below script in the Signal Tester to further filter down a signal I receive results that do not make sense. I place my signal in the signal tester and then add the “AND” followed by the below script. To my surprise, the count of signal goes up when adding the below filter instead of down. Any idea what I am doing wrong? Thank you!

r1 = JDKRS(INDEX=SPY:US, DEFAULT=Ratio);
c1 = r1.Heading < 90;
c2 = r1.Heading >270;
c1 or c2

Thanks - what’s the other part of the script? Are the universe and time period being tested the same?

I ran a test on the NASDAQ 100 list using this setup:

Optuma_t6SseI8v07

with the following results, mostly as expected. However, there are several stocks in this list whose heading is >90 or < 270

chrome_PJhfDAzBQR

This is a Daily RRG, all time frames are consistent, no overrides, but you can see several here with headings > 90

Optuma_8PflxqEZCL

Here’s another result that may be pointing to an error in the data matrix cache. I closed out other open pages and re-ran the script. Several of those that were originally showing up in the Leading quadrant are now properly filtered out. Although MAR and SWKS are still seen with headings moving lower.

Optuma_lik89rky2i

Michael:

One more thing regarding your boolean logic. You might need to add parenthesis around your “c1 or c2” so you don’t confuse the “AND” operator

For example:
c3 AND c1 OR c2

is not the same as

c3 AND (c1 OR c2)

Hope this helps