主图
X_1:=(3*CLOSE+LOW+OPEN+HIGH)/6;
X_2:=EMA(X_1,13);
X_3:=EMA(X_2,3);
X_4:=EMA(X_3,3);
X_5:=EMA(X_4,3);
X_6:=EMA(X_5,3);
X_7:=EMA(X_6,3);
DRAWBAND(X_2,RGB(150,50,20),X_7,RGB(36,150,40));
NOTEXTMB101:IF(X_2>X_3,X_2,DRAWNULL),DOTLINE,COLORMAGENTA;
NOTEXTMB102:IF(X_2<X_3,X_2,DRAWNULL),DOTLINE,COLORGREEN;
NOTEXTMB201:IF(X_3>X_4,X_3,DRAWNULL),DOTLINE,COLORMAGENTA;
NOTEXTMB202:IF(X_3<X_4,X_3,DRAWNULL),DOTLINE,COLORGREEN;
NOTEXTMB301:IF(X_4>X_5,X_4,DRAWNULL),DOTLINE,COLORMAGENTA;
NOTEXTMB302:IF(X_4<X_5,X_4,DRAWNULL),DOTLINE,COLORGREEN;
NOTEXTMB401:IF(X_5>X_6,X_5,DRAWNULL),DOTLINE,COLORMAGENTA;
NOTEXTMB402:IF(X_5<X_6,X_5,DRAWNULL),DOTLINE,COLORGREEN;
NOTEXTMB501:IF(X_6>X_7,X_6,DRAWNULL),DOTLINE,COLORMAGENTA;
NOTEXTMB502:IF(X_6<X_7,X_6,DRAWNULL),DOTLINE,COLORGREEN;
NOTEXTMB601:IF(X_7>REF(X_7,1),X_7,DRAWNULL),DOTLINE,COLORMAGENTA;
NOTEXTMB602:IF(X_7<REF(X_7,1),X_7,DRAWNULL),DOTLINE,COLORGREEN;
X_8:=(20*X_1+19*REF(X_1,1)+18*REF(X_1,2)+17*REF(X_1,3)+16*REF(X_1,4)+15*REF(X_1,5)+14*REF(X_1,6)+13*REF(X_1,7)+12*REF(X_1,8)+11*REF(X_1,9)+10*REF(X_1,10)+9*REF(X_1,11)+8*REF(X_1,12)+7*REF(X_1,13)+6*REF(X_1,14)+5*REF(X_1,15)+4*REF(X_1,16)+3*REF(X_1,17)+2*REF(X_1,18)+REF(X_1,20))/210;
X_9:=MA(X_8,20);
X_10:=MA(X_9,2);
DRAWBAND(X_9,RGB(250,0,0),X_10,RGB(250,250,0));
NOTEXTDTTJ:CONST(CLOSE),DOTLINE,COLORGRAY;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
STICKLINE(CLOSE>OPEN,HIGH,LOW,0,0),COLOR7D7DFF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0,0),COLOR7D7DFF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3.1,0),COLOR1313FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.4,0),COLOR2424FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0),COLOR2D2DFF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.6,0),COLOR4444FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.2,0),COLOR5757FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.6,0),COLOR6666FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.1,0),COLOR7D7DFF;
STICKLINE(CLOSE<OPEN,HIGH,LOW,0,0),COLORAA9900;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,0,0),COLORAA5500;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,3.1,0),COLORAA6600;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,2.4,0),COLORAA7700;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,2,0),COLORAA8800;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,1.6,0),COLORAA9900;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,1.2,0),COLORAAAA00;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,0.6,0),COLORAACC00;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,0.1,0),COLORAADD00;
副图1
X_1:=OPEN<MIN(REF(CLOSE,1),REF(OPEN,1))*0.98 AND (CLOSE-OPEN)/OPEN*100>2 AND REF(CLOSE,1)>MA(CLOSE,20) AND OPEN>MA(CLOSE,60) AND KDJ.D<80 AND KDJ.D>REF(KDJ.D,1) AND KDJ.J>REF(KDJ.J,1);
选:FILTER(X_1,10),COLORYELLOW,LINETHICK2;
DRAWICON(选,1.1,34);
副图2
N1:=3;N2:=5;N3:=8;N4:=13;
DIFF:=EMA(CLOSE,N3)-EMA(CLOSE,N4);
DEA:=EMA(DIFF,N2);
STICKLINE(CLOSE,0,1,4,1),COLORBLUE;
DRAWICON(DIFF>DEA,0.5,41);
A1:=DIFF>DEA;
RSV1:=(CLOSE-LLV(LOW,N3))/(HHV(HIGH,N3)-LLV(LOW,N3))*100;
K:=SMA(RSV1,N1,1);
D:=SMA(K,N1,1);
STICKLINE(CLOSE,1,2,4,1),COLORBLUE;
DRAWICON(K>D,1.5,41);
A2:=K>D;
LC:=REF(CLOSE,1);
RSI1:=(SMA(MAX(CLOSE-LC,0),N2,1))/(SMA(ABS(CLOSE-LC),N2,1))*100;
RSI2:=(SMA(MAX(CLOSE-LC,0),N4,1))/(SMA(ABS(CLOSE-LC),N4,1))*100;
STICKLINE(CLOSE,2,3,4,1),COLORBLUE;
DRAWICON(RSI1>RSI2,2.5,41);
A3:=RSI1>RSI2;
RSV:=-(HHV(HIGH,N4)-CLOSE)/(HHV(HIGH,N4)-LLV(LOW,N4))*100;
LWR1:=SMA(RSV,N1,1);
LWR2:=SMA(LWR1,N1,1);
STICKLINE(CLOSE,3,4,4,1),COLORBLUE;
DRAWICON(LWR1>LWR2,3.5,41);
A4:=LWR1>LWR2;
BBI:=(MA(CLOSE,N1)+MA(CLOSE,N2)+MA(CLOSE,N3)+MA(CLOSE,N4))/4;
STICKLINE(CLOSE,4,5,4,1),COLORBLUE;
DRAWICON(CLOSE>BBI,4.5,41);
A5:=CLOSE>BBI;
MTM:=CLOSE-REF(CLOSE,1);
MMS:=100*EMA(EMA(MTM,N2),N1)/EMA(EMA(ABS(MTM),N2),N1);
MMM:=100*EMA(EMA(MTM,N4),N3)/EMA(EMA(ABS(MTM),N4),N3);
STICKLINE(CLOSE,5,6,4,1),COLORBLUE;
DRAWICON(MMS>MMM,5.5,41);
A6:=MMS>MMM;
买入:=A1 AND A2 AND A3 AND A4 AND A5 AND A6 =1
AND REF(A1 AND A2 AND A3 AND A4 AND A5 AND A6 ,1)=0,COLORYELLOW;
持有:=(A1 AND A2 AND A3 AND A4 AND A5 AND A6),COLORMAGENTA,LINETHICK2;
STICKLINE(CLOSE,6,7,4,1),COLORBLUE;
DRAWICON(持有,6.5,30);
DRAWICON(买入,6.5,28);