KPD1:=EMA(EMA(CLOSE,9),9);
KPD2:=100*WINNER(CLOSE*0.95);
L1:=(EMA(CLOSE,3) - EMA(CLOSE,13));
L2:=EMA(L1,9);
L3:=BARSLAST(CROSS(L1,L2));
L4:=REF(L3,L3+1);
L5:=L2;
ROC:=(CLOSE-REF(CLOSE,21))/REF(CLOSE,21)*100;
AC:=AMOUNT/(VOL);
YY:=MA(AC,13);
LLL:=(C-YY)/YY*100;
MIDC:=MA(CLOSE,22);
UPPERC:=MIDC+2*STD(C,22);
LOWERC:=MIDC-2*STD(C,22);
BBA:=(C-LOWERC)/(UPPERC-LOWERC);
LIFENGCYC:=(REF(LLL,1)<-15 AND REF(BBA,1)<0 AND LLL>REF(LLL,1));
控盘:=(KPD1-REF(KPD1,1))/REF(KPD1,1)*1000;
启动:STICKLINE(IF(CROSS(控盘,0),10,0),O,C,3,0),COLOR00FFFF;
拐点:STICKLINE(FILTER(CROSS(ROC,0),6),O,C,3,0),COLORFF8080;
变盘:STICKLINE(CROSS(L1,L2) AND L5,O,C,3,0),COLOR0080FF;
买入:STICKLINE(LIFENGCYC,O,C,3,0),COLOR0000FF,LINETHICK3;
趋势:MA(C,3),COLORFFFFFF,LINETHICK2;
IF(控盘>REF(控盘,1) AND 控盘>0,MA(C,3),DRAWNULL),COLOR0000FF,LINETHICK3;
IF(KPD2>50 AND COST(85)<CLOSE AND 控盘>0,MA(C,3),DRAWNULL),COLORFF00FF,LINETHICK3;
IF(控盘<REF(控盘,1) AND 控盘>0,MA(C,3),DRAWNULL),COLOR00FF00,LINETHICK3;
正DDX:STICKLINE(DDX>0,L*0.99,L*0.995,5,0),COLOR0000FF;
负DDX:STICKLINE(DDX<0,L*0.99,L*0.995,5,0),COLOR00FF00;
DRAWTEXT_FIX(1,0,0,0,'趋势线颜色:黄-启动 红-庄控 紫-高控 绿-出货'),COLOR00FFFF;
DRAWTEXT_FIX(1,0.35,0,0,'K线颜色:黄-启动 桔黄-变盘 紫兰-拐点 红-买点'),COLOR00FFFF;
DRAWTEXT_FIX(1,0.7,0,0,'K线下划线颜色:红-DDX>0 绿-DDX<0'),COLOR00FFFF;
DRAWTEXT_FIX(1,0.45,8,0,'『潇逸制作』'),COLOR4B4B4B;