k1:=l>ref(h,1);
k2:=barslast(k1);
k4:=h<REF(L,1);
k5:=barslast(k4);
k7:=k2<K5;
k3:=backset(BARSTATUS=2 and k7,k2+1);
k6:=backset(BARSTATUS=2 and not(k7),k5+1);
k8:=filter(backset(BARSTATUS=2 ,if(k7,k2+1,k5+1)),1000);
STICKLINE((k3 and (llv(l,k2)>ref(h,k2+1) or k1)) or (BARSTATUS=2 and k1),ref(h,k2+1),ref(l,k2),15,0),LAYER7,color999999;
STICKLINE((k6 and (hhv(h,k5)<REF(L,K5+1) k4),ref(l,k5+1),ref(h,k5),15,0),LAYER7,color999999;
IF k1=1 THEN BEGIN
DRAWTEXT(k8,if(k7,l,h),' 上缺口:'+l+'~'+ref(h,1)),coloryellow;
END
ELSE
IF k4=1 THEN BEGIN
DRAWTEXT(k8,if(k7,l,h),' 下缺口:'+ref(l,1)+'~'+h),VALIGN1,colorgreen;
END; |