Help with hedge

I’m trying to create a rule that is TRUE if 2 of the three parameters are TRUE.

So, I thought of making it in the style (1 and 2) or (1 and 3) or (2 and 3)

Next part I cannot get to work is unemployment. There is a variable #unemp but is there a way to offset and test the values? For example that unemployment is greater than unemployment 1 month ago?

Last question, how do I get the sma of spy? I tried sma(100, spy) to no success. :frowning: