It was actually taken from a code that you shared sometime ago:
TIMEFRAME(daily)
CloseVal = Close
//
EQUITYFRAME(“Shares – US (NYSE”, “SPY”)
CloseInd = Close
EQUITYFRAME(default)
Ratio = (CloseVal / CloseInd) *100
TIMEFRAME(default)
RelativeStrength = (Ratio – Ratio[1]) *100
MyAvg = average[20,0](RelativeStrength) //Media Semplice a 20 periodi
Cond = 0
IF RelativeStrength CROSSES OVER MyAvg AND (close > 150) THEN
cond = 1
ELSIF RelativeStrength CROSSES UNDER MyAvg AND (close > 150) THEN
cond = 2
ENDIF
SCREENER [Cond](Cond AS “1=↑,2=↓”)//(RelativeStrength AS “RelativeStrength”)