Need Help regarding coding

Hi,
I’m trying to code below logic and scanner is throwing me error.

SET A = EMA(RSI(close,20),5)
SET B = ABS(REF(A,1)-A)

What I want over here is B should be set of values which is abs diff between the current value of set A and 1 value back of same Set A.

@AlgoGeek can you help me

SET functions won’t work in scanner, so you can give conditions without SET function