以下是通达信三色线源码副图

三色线源码

X_1:=EMA(CLOSE,3);
 X_2:=EMA(CLOSE,5);
 X_3:=EMA(CLOSE,10);
 X_4:=MA(CLOSE,20);
 X_5:=(2*CLOSE+HIGH+LOW)/4;
 X_6:=IF(YEAR>=2099 AND MONTH>2,0,1);
 X_7:=LLV(LOW,5);
 X_8:=HHV(HIGH,4);
 X_9:=EMA((X_5-X_7)/(X_8-X_7)*100,4)*X_6;
 X_10:=EMA(0.667*REF(X_9,1)+0.333*X_9,2)*X_6;
 DRAWTEXT(CROSS(X_9,X_10) AND X_9<3,LOW-0.05,1),COLORLIRED;
 DRAWTEXT(CROSS(X_10,X_9) AND X_9>5,HIGH+0.05,2),COLORGREEN;
 DRAWICON(CROSS(X_9,X_10) AND X_9<10,LOW-0.05,1);
 DRAWICON(CROSS(X_10,X_9) AND X_9>20,HIGH+0.05,2);
 X_11:=CLOSE-REF(CLOSE,5);
 X_12:=EMA(EMA(X_11,5),5)/EMA(EMA(ABS(X_11),5),5);
 X_13:=EMA(EMA(X_11,10),10)/EMA(EMA(ABS(X_11),20),20);
 X_14:=IF(X_12>0 AND CROSS(X_13,X_12),90,100);
 DRAWICON(X_14<0,HIGH+0.05,2);
 X_15:=EMA(CLOSE,2);
 X_16:=EMA(SLOPE(CLOSE,11)*10+CLOSE,22);
 B1:IF(CROSS(X_15,X_16),LOW-0.05,DRAWNULL),CROSSDOT,COLORMAGENTA,LINETHICK3;
 S1:IF(CROSS(20,RSI.RSI1)*10,HIGH+0.05,DRAWNULL),CROSSDOT,COLORYELLOW,LINETHICK3;
 X_17:=((CLOSE-MA(CLOSE,5))/MA(CLOSE,5)*100+(CLOSE-MA(CLOSE,20))/MA(CLOSE,20)*100+(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100)/3;
 X_18:=IF(X_17>20 AND FILTER(X_17<REF(X_17,1),5),HIGH+0.05,DRAWNULL);
 X_19:=(LOW+HIGH+CLOSE*2)/4;
 A1:EMA(X_19,5),COLORBLUE,LINETHICK2;
 X_20:=EMA(X_19,10);
 X_21:=(A1-REF(A1,1))/REF(A1,1)*100;
 X_22:=(X_20-REF(X_20,1))/REF(X_20,1)*100;
看多:IF(X_21>=0 AND BARSLAST(CROSS(X_21,0))>0,REF((CLOSE+OPEN)/2,BARSLAST(CROSS(X_21,0))),DRAWNULL),COLORMAGENTA;
逃顶:IF(X_21<0 AND BARSLAST(CROSS(0,X_21))>0,REF((CLOSE+OPEN)/2,BARSLAST(CROSS(0,X_21))),DRAWNULL),COLORCYAN;
买入持股:IF(X_21>=0,A1,DRAWNULL),COLORRED,LINETHICK3;
卖出空仓:IF(X_21<0 AND X_22<0,A1,DRAWNULL),COLORGREEN,LINETHICK3;
 STICKLINE(CROSS(X_21,0),HIGH,LOW,0,0),COLOR9933FF;
 STICKLINE(CROSS(X_21,0),CLOSE,OPEN,3,0),COLOR0000CC;
 STICKLINE(CROSS(X_21,0),CLOSE,OPEN,1,0),COLOR0033FF;
 STICKLINE(CROSS(0,X_21),LOW,HIGH,0,0),COLOR66CC33;
 X_23:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
 X_24:=SMA(X_23,3,1);
 X_25:=SMA(X_24,3,1);
 X_26:=X_25>X_24;
 X_27:=X_24>=X_25 AND CROSS(X_15,X_16) AND REF(X_26,1);
 DRAWICON(X_27,LOW,9);
 DRAWTEXT_FIX(1,0.88,5,0,10),COLORRED;
 DRAWTEXT(FILTER(CROSS(CLOSE,MA(CLOSE,7)),1),LOW*0.99,4),COLORRED;
 X_28:=MA(CLOSE,5);
 X_29:=MA(CLOSE,13);
 X_30:=CROSS(X_28,X_29) OR X_28>X_29 AND OPEN<X_29 AND CLOSE>X_28 AND MA(CLOSE,13)>MA(CLOSE,30);
 DRAWICON(X_30,LOW*0.99,27);
 

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。