
N:=5;
RSV:=(C-LLV(LOW,9))/(HHV(H,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
ZBVAR1S:=(((C - MA(C,6)) / MA(C,6)) * 100);
ZBVAR2S:=(((C - MA(C,12)) / MA(C,12)) * 100);
ZBVAR3S:=(((C - MA(C,24)) / MA(C,24)) * 100);
ZBVAR4S:=(((ZBVAR1S + (2 * ZBVAR2S)) + (3 * ZBVAR3S)) / 6);
ZBVAR5S:=MA(ZBVAR4S,3);
DB:=IF(ZBVAR5S,20,0);
HDY:=EMA(100*(C-LLV(LOW,34))/(HHV(H,34)-LLV(LOW,34)),3);
FX:=HDY<=10;
中短通吃:=CROSS(J,K) AND (DB >= 20) AND FX;
STICKLINE(中短通吃,0,1,3,1),COLORYELLOW;
DRAWTEXT(中短通吃,0.9.6,' 中短通吃'),COLORYELLOW;
行业:=(HY_INDEXC/REF(HY_INDEXC,1)-1)*100;
大盘:=(INDEXC/REF(INDEXC,1)-1)*100;
个股:=(C/REF(C,1)-1)*100;
VAR_1:=EMA(个股-大盘,12*N)-EMA(个股-大盘,26*N);
VAR_2:=EMA(VAR_1,9*N);
VAR_3:=2*(VAR_1-VAR_2);
VAR_4:=EMA(行业-大盘,12*N)-EMA(行业-大盘,26*N);
VAR_5:=EMA(VAR_4,9*N),COLORYELLOW,LINETHICK2;
VAR_6:=2*(VAR_4-VAR_5);
VAR_7:=EMA(大盘,12*N)-EMA(大盘,26*N);
STICKLINE(VAR_6>0,0,VAR_6,2,1),COLORLIGRAY;
STICKLINE(VAR_6<0,0,VAR_6,2,1),COLORBLUE;
STICKLINE(VAR_3>0,0,VAR_3,0,1),COLORYELLOW;
STICKLINE(VAR_3<0,0,VAR_3,0,0),COLORMAGENTA;
★个股指数:EMA(VAR_1,N)*5,COLORGREEN;
★大盘指数:EMA(VAR_7,N)*5,COLORMAGENTA,LINETHICK2;
Z5:=STRCAT('今日大盘上涨家数:',CON2STR(INDEXADV,0));
Z6:=STRCAT(' 下跌家数:',CON2STR(INDEXDEC,0));
DRAWTEXT_FIX(1,0,0.1,0,STRCAT(Z5,Z6)),COLORWHITE;
STICKLINE(MA(INDEXC,5)>MA(INDEXC,10),0,0,5,0),COLORRED;
STICKLINE(MA(INDEXC,5)<MA(INDEXC,10),0,MINDIFF,5,0),COLORGREEN;