
OSC:=100*(C-MA(C,20));
MAOSC:=EXPMEMA(OSC,6);
BIAS:=(C-MA(C,20))/MA(C,20)*100;
BIASMA:=MA(BIAS,6);
F:=100*(C-REF(C,1))/REF(C,1);
P1:=IF(C<REF(O,1) AND F<0,1,0);
P2:=IF(C<REF(O,2) AND F<0,1,0);
LIN:=IF(P1=0 AND REF(P1,1)=1 AND P2=0 AND REF(P2,1)=1,1,0);
E:=-100*(HHV(H,84)-C)/(HHV(H,84)-LLV(LOW,84));
DJ1:=CROSS(OSC,MAOSC) AND LIN AND REF(EVERY(C<O,3),1) AND REF((E<-98)*50,1);
RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
X:=LLV(J,2)=LLV(J,8);
DJ2:=CROSS(J,REF(J+0.01,1)) AND X AND J<20 AND REF((E<-98)*50,1) AND REF(EVERY(C<O,3),1);
F1:=100*(C-REF(C,1))/REF(C,1);
KX:=IF(C<REF(O,1) AND F1<0,1,0);
LH:=IF(C<REF(O,2) AND F1<0,1,0);
BE:=KX=0 AND REF(KX,1)=1 AND LH=0 AND REF(LH,1)=1;
VAR1:=REF(C,1);
VAR2:=SMA(MAX(C-VAR1,0),7,1)/SMA(ABS(C-VAR1),7,1)*100;
VAR3:=FILTER(REF(VAR2,1)<20 AND VAR2>REF(VAR2,1),5);
VAR4:=MA((2*C+H+L)/4,5);
VAR5:=VAR4*(200-102)/100;
VAR6:=(1-7/100)*DMA(C,ABS((2*C+H+L)/4-MA(C,20))/MA(C,20));
VAR7:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
SM05:=3*SMA(VAR7,3,1)-2*SMA(SMA(VAR7,3,1),3,1);
SM06:=((H+L+C)/3-MA((H+L+C)/3,14))/(0.015*AVEDEV((H+L+C)/3,14));
DRAWTEXT_FIX(1,0,1,0,'公众号:股市K线指标源码'),COLORMAGENTA;
SM07:=VAR5<VAR6 AND SM05>REF(SM05,1) AND REF(SM05,1)<REF(SM05,2) AND SM06<-100
AND SM06>REF(SM06,1);
BZ:=VAR3 AND SM07;
CC1:=ABS((2*C+H+LOW)/4-MA(C,20))/MA(C,20);
DD1:=DMA(C,CC1);
EE:=(1-14/100)*DD1;
DI:=BETWEEN(C,EE*0.98,EE*1.01);
WZ:=(C-MA(C,34))/MA(C,34)*100;
WZBP:=CROSS(-27,WZ) AND COUNT(H=L,5)<1;
QSX:=(C-MA(C,40))/MA(C,40)*100;
KJ:=CROSS(-20,QSX);
起航:=(BE AND BZ AND DI) OR WZBP OR KJ OR DJ1 OR DJ2 ;
STICKLINE(起航,-8,15,1,0),COLORRED,LINETHICK2;
STICKLINE(起航,1,6,1,0),COLOR00FFFF,LINETHICK2;
DRAWICON(起航,13,13);
DRAWTEXT(起航,10,'起航'),COLORYELLOW;