You could do something like SLR equals Close + R1 but not what you want to do.
Can't easily explain but the = can not go with a > this way.
ps: you can put your code in code blocks. Makes your question more readable. Maybe someone will come along to point you to the "how to ask a good question" thread... I have no idea where it is but you can find it probably.
@Sam1 , Do you have SLR declared or set earlier in the code? If it is just part of the "if" processing, it may not be defined, and therefore when "if" not processed the SLR value is undefined when you try to reference it.
Additionally, your "if" processing makes no logical sense (to me).
You set R1 to be Close Plus Something.
Then you TEST if Close is Greater than R1.
From my understanding, Close will NEVER be greater than Close (plus something - even if H=L, you are still testing Close > Close).