X_1:=15;
X_2:=25;
X_3:=32;
X_4:=REF(CLOSE,1);
X_5:=SMA(MAX(CLOSE-X_4,0),7,1)/SMA(ABS(CLOSE-X_4),7,1)*100;
X_6:=SMA(MAX(CLOSE-X_4,0),14,1)/SMA(ABS(CLOSE-X_4),14,1)*100;
X_7:=SMA(MAX(CLOSE-X_4,0),21,1)/SMA(ABS(CLOSE-X_4),21,1)*100;
X_8:=X_5<X_1 AND X_6<X_2 AND X_7<X_3;
X_8=0 AND REF(X_8,1)=1,COLORRED;