以下是通达信质变主图源码
A:=DRAWLINE(LOW<=LLV(LOW,120),LOW,HHV(H,6)<=HHV(H,10),LLV(LOW,6),1), COLORBLUE ,LINETHICK2;
TY:=C;
VAR0:=(MA(CLOSE,5)+MA(CLOSE,10)+MA(CLOSE,15)+MA(CLOSE,20))/4;
界点:=MA(CLOSE,43),COLORFFFFFF,LINETHICK2;
突破:REF(EMA(C,14),1),NODRAW;
积极操盘区:IF(VAR0>REF(VAR0,2),VAR0,DRAWNULL), COLORRED, LINETHICK2;
持币观望区:IF(VAR0<REF(VAR0,2),VAR0,DRAWNULL), COLORGREEN, LINETHICK2;
MA0:=MA(C,0)COLORYELLOW ,LINETHICK2;
K:=(C+H+L)/3;
D:=MA(K,4);
顶部:=HHV(H*0.98,55)COLORYELLOW,LINETHICK2;
Q:=DRAWTEXT(REF(C,1)<D AND C>D AND D<REF(D,1),L*0.98, ‘D’),COLORYELLOW,LINETHICK2 ;
{均线}
TYP:= (HIGH + LOW +2* C)/4;
均线:=EMA(TYP,3),LINETHICK2,COLORWHITE;
均线上轨:=HHV(均线,14),LINETHICK2,COLORYELLOW;
均线下轨:=LLV(均线,14),LINETHICK2,COLORGREEN;
角度:=ATAN((均线/REF(均线,1)-1)*100)*180/3.1416;
{K线优化}
STICKLINE(角度>0,O ,C ,0.5,0 ),COLORRED;
STICKLINE(角度<0,O ,C,0.5 ,0 ),COLORCYAN;
STICKLINE(角度<0,O,C,3,0),COLORFF6600;{蓝K线持币}
STICKLINE(角度<0,O,C,2,0),COLORFF9900;
STICKLINE(角度<0,O,C,1.2,0),COLORFFCC00;
STICKLINE(角度<0,O,C,0.2,0),COLORCYAN;
STICKLINE(角度>0,O,C,3,0),COLOR000099;
STICKLINE(角度>0,O,C,2,0),COLOR0000CC;{红K线持股}
STICKLINE(角度>0,O,C,1.3,0),COLOR0000FF;
STICKLINE(角度>0,O,C,0.3,0),COLORCC66FF;
X:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+
14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)
+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+
REF(A,20))/210;
MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
CB:=EMA(X,13);
买:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0);
DRAWICON(FILTER(买=1,5),L*0.97,23);
操作:=D,COLORWHITE,LINETHICK2;
买卖:=LLV(D,8),COLORYELLOW,LINETHICK2;
P:DRAWICON( 操作>买卖 AND REF(操作,1)=REF(买卖,1),L*0.95,26);
STICKLINE(ISLASTBAR,REF(EMA(C,14),1),REF(EMA(C,14),1)*0.998,5,0)COLORWHITE;
评论(0)