以下是通达信自用主图源码分享 主图指标(无源码的请下载附件导入)
止损:=REF(HHV(H,5),3)*0.925,COLORGRAY,DOTLINE;
STICKLINE(CURRBARSCOUNT=1,止损,止损,80,-1),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0.80,0,1,'止损:'),COLORGREEN;
DRAWNUMBER_FIX(ISLASTBAR,0.805,0,0,REF(HHV(H,5),3)*0.925)COLORGREEN;
DRAWTEXT_FIX(ISLASTBAR,0.80,0.1,1,'加仓:'),COLORRED;
DRAWNUMBER_FIX(ISLASTBAR,0.805,0.1,0,REF(C,1)*1.043)COLORRED;
N:=20;
CC:=ZIG(3,N);
GT1:=PEAKBARS(1,N,1),NODRAW;
DT1:=TROUGHBARS(2,N,1);
H1:=DRAWLINE(CURRBARSCOUNT=CONST(GT1)+1,H,ISLASTBAR,REF(H,CONST(GT1)),0),DOTLINE,LINETHICK1,COLORWHITE;
L1:=DRAWLINE(CURRBARSCOUNT=CONST(DT1)+1,L,ISLASTBAR,REF(L,CONST(DT1)),0),DOTLINE,LINETHICK1,COLORCYAN;
HX0:=IF(H/L>1.04 AND V>=HHV(V,BARSLAST(CURRBARSCOUNT=CONST(GT1)+1)+1) AND LLV(L,N)=L,L,99);
HXW:=CONST(LLV(L1,N))=L AND NOT(ISLASTBAR);
BW:=CURRBARSCOUNT=CONST(BARSLAST(HXW))+1;
突破:REF(H,BARSLAST(BW)),DOTLINE,COLORGREEN;
中轴:REF((H+L)/2,BARSLAST(BW)),DOTLINE,COLORYELLOW;
破线:REF(L,BARSLAST(BW)),DOTLINE,COLORRED;
十日涨跌%: (C-REF(CLOSE,10))/REF(CLOSE,10)*100,COLORGREEN,NODRAW;
A:=(LOW+HIGH+CLOSE+OPEN)/4.2;
操盘线:HHV((MA(A,6)),15),COLORMAGENTA,LINETHICK2;
{---------------------}
STICKLINE(ISLASTBAR,REF(EMA(C,14),1),REF(EMA(C,14),1)*0.998,5,0)COLORGREEN;
{---------------------};
VAR93:=CLOSE=LLV(C,4) AND (REF(C,1)<REF(C,2) OR REF(C,1)<REF(C,3)) OR REF(C,1)=LLV(C,4) AND C<REF(C,2) OR REF(C,2)=LLV(C,4) AND REF(C,1)=HHV(C,4) AND C<REF(C,1) OR REF(C,3)=LLV(C,4) AND C<REF(C,1) AND C<REF(C,2);
VAR94:=REF(C,1)=LLV(C,4) AND C>=REF(C,2) OR REF(C,2)=LLV(C,4) AND REF(C,1)<=REF(C,3) AND REF(C,2)<REF(C,4) AND C>=REF(C,1);
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,3,0),COLORFF7700;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,2.2,0),COLORFF9900;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,1.5,0),COLORFFBB00;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0),COLOR000099;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.2,0),COLOR0000CC;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.5,0),COLOR0000FF;
STICKLINE(VAR93,OPEN,(OPEN+CLOSE)/2,3,0),COLOR009900;
STICKLINE(VAR93,OPEN,(OPEN+CLOSE)/2,2.2,0),COLOR00BB00;
STICKLINE(VAR94,OPEN,(OPEN+CLOSE)/2,3,0),COLORWHITE;
STICKLINE(VAR94,OPEN,(OPEN+CLOSE)/2,2.2,0),COLORLIGRAY;
{-10战法}
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D,NODRAW,COLORGREEN;
J值:3*K-2*D,NODRAW,COLORGREEN;DRAWICON(J<=-10,L*0.98,41);
DRAWICON((J<=-7 AND J>-10),L*0.98,40);DRAWICON((J<=-5 AND J>-7),L*0.98,22);
DRAWICON((J>100),H*1.02,41);
642399837.jpg
|