ZF0:=MAX(HIGH,REF(HIGH,1))-MIN(LOW,REF(LOW,1));
ZF:=MA(ZF0,3)*0.8;
QSK:=ABS(CLOSE-REF(OPEN,1))/ZF0>0.50;
SZ1:=HIGH>REF(HIGH,2)ANDCLOSE>REF(OPEN,1)ANDQSK;
XD1:=LOW
SZT:=BARSLAST(SZ1);
XDT:=BARSLAST(XD1);
DT:=SZT
KT:=XDT
STICKLINE(DT,OPEN,CLOSE,9,0),colorred;
STICKLINE(KT,OPEN,CLOSE,9,0),colorgreen;