N1:=6;
LC:=REF(C,1);
LO:=REF(O,1);
LH:=REF(H,1);
LL:=REF(L,1);
D1:=SMA(maX(C-LC,0),N1,1)/SMA(Abs(C-LC),N1,1)*100;
D2:=SMA(MAX(O-LO,0),N1,1)/SMA(ABS(O-LO),N1,1)*100;
D3:=SMA(MAX(H-LH,0),N1,1)/SMA(ABS(H-LH),N1,1)*100;
D4:=SMA(MAX(L-LL,0),N1,1)/SMA(ABS(L-LL),N1,1)*100;
抄底:IF(crOSS(D3,EMA((((2*C+H+L)/4)-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100,8)) AND SMA(MAX(H-LH,0),N1,1)/SMA(ABS(H-LH),N1,1)*100<53,20,1),COLORFFB97A;