ASDF主图 通达信主图指标 源码 贴图
N:=150;M:=3;高:=CONST(REF(HHV(H,N),M));
低:=CONST(REF(LLV(L,N),M));
色彩峰:=高-低;
STICKLINE(色彩峰 0,低,低+色彩峰*1.05,10,0),COLORFF0000;
STICKLINE(色彩峰 0,低,低+色彩峰*0.9,10,0),COLORFF1111;
STICKLINE(色彩峰 0,低,低+色彩峰*0.85,10,0),COLORFF2222;
STICKLINE(色彩峰 0,低,低+色彩峰*0.8,10,0),COLORFF3333;
STICKLINE(色彩峰 0,低,低+色彩峰*0.75,10,0),COLORFF4444;
STICKLINE(色彩峰 0,低,低+色彩峰*0.7,10,0),COLORFF5555;
STICKLINE(色彩峰 0,低,低+色彩峰*0.65,10,0),COLORFF6666;
STICKLINE(色彩峰 0,低,低+色彩峰*0.6,10,0),COLORFF7777;
STICKLINE(色彩峰 0,低,低+色彩峰*0.55,10,0),COLORFF8888;
STICKLINE(色彩峰 0,低,低+色彩峰*0.5,10,0),COLORFF9999;
STICKLINE(色彩峰 0,低,低+色彩峰*0.45,10,0),COLORFFAAAA;
STICKLINE(色彩峰 0,低,低+色彩峰*0.4,10,0),COLORFFBBBB;
STICKLINE(色彩峰 0,低,低+色彩峰*0.35,10,0),COLORFFCCCC;
STICKLINE(色彩峰 0,低,低+色彩峰*0.3,10,0),COLORFFDDDD;
STICKLINE(色彩峰 0,低,低+色彩峰*0.25,10,0),COLORFFEEEE;
高1:=REF(HHV(H,120),3);
低1:=REF(LLV(L,120),3);
H1:=高1-(高1-低1)*0.191;
H2:=高1-(高1-低1)*0.382;
H3:=高1-(高1-低1)*0.5;
H4:=高1-(高1-低1)*0.618;
H5:=高1-(高1-低1)*0.809;
突破:=REF(EMA(C,14),1);
A1X:=(EMA(C,10)-突破)/突破*100;
基准:=IF(A1X =0,REF(EMA(C,10),BARSLAST(CROSS(A1X,0))+1),REF(EMA(C,10),BARSLAST(CROSS(0,A1X))+1));
STICKLINE(A1X =0,基准,突破,10,0),COLOR000099;
STICKLINE(A1X 0,基准,突破,10,0),COLOR320000;
西:=(3*CLOSE+OPEN+LOW+HIGH)/6;
电:(20*西+19*REF(西,1)+18*REF(西,2)+17*REF
(西,3)+16*REF(西,4)+15*REF(西,5)+14*REF(西,6)
+13*REF(西,7)+12*REF(西,8)+11*REF(西,9)+10*REF
(西,10)+9*REF(西,11)+8*REF(西,12)
+7*REF(西,13)+6*REF(西,14)+5*REF(西,15)+4*REF
(西,16)+3*REF(西,17)+2*REF(西,18)+
REF(西,20))/210,COLORYELLOW;
点:MA(电,5),COLORRED;
DRAWBAND(电,RGB(223,0,41),点,RGB(91,189,43));DRAWKLINE(H,O,L,C);
ZKP:=IF(C REF(C,1),REF(C,1),DRAWNULL);
ZSP:=IF(C REF(C,1),C,DRAWNULL);
DKP:=IF(C =REF(C,1),REF(C,1),DRAWNULL);
DSP:=IF(C =REF(C,1),C,DRAWNULL);
DRAWKLINE(H,DKP,L,DSP);
STICKLINE(C =REF(C,1),DKP,DSP,3.05,0),COLORBLUE;
STICKLINE(C =REF(C,1),DKP,DSP,2.2,0),COLORFF7700;
STICKLINE(C =REF(C,1),DKP,DSP,1.5,0),COLORFF9900;
STICKLINE(C =REF(C,1),DKP,DSP,0.5,0),COLORFFBB00;
DRAWKLINE(H,ZKP,L,ZSP);
STICKLINE(C REF(C,1),ZKP,ZSP,3.05,0),COLOR000099;
STICKLINE(C REF(C,1),ZKP,ZSP,2.2,0),COLOR0000CC;
STICKLINE(C REF(C,1),ZKP,ZSP,1.5,0),COLOR0000FF;
STICKLINE(C REF(C,1),ZKP,ZSP,0.5,0),COLORCC66FF;
STICKLINE(V/REF(V,1) 2 AND CLOSE =OPEN,ZKP,ZSP,3,0),COLOR0055FF;
STICKLINE((C-REF(C,1))*100/REF(C,1) =(10-0.01*100/REF(C,1)),OPEN,CLOSE,3,0),COLORYELLOW;
STICKLINE((REF(C,1)-C)*100/REF(C,1) =(10-0.01*100/REF(C,1)),OPEN,CLOSE,3,0),COLORGREEN;
G:=IF(HIGH=HHV(HIGH,3),1,0);
D:=IF(LOW=LLV(LOW,3),1,0);
S:=IF(REF(G,2)=1 AND REF(G,1)=0 AND G=0,REF(HIGH,2),REF(HIGH,2+BARSLAST(REF(G,2)=1 AND REF(G,1)=0 AND G=0)));
X:=IF(REF(D,2)=1 AND REF(D,1)=0 AND D=0,REF(LOW,2),REF(LOW,2+BARSLAST(REF(D,2)=1 AND REF(D,1)=0 AND D=0)));
K1:=IF(HIGH =MA(CLOSE,1),S,REF(S,BARSLAST(HIGH MA(CLOSE,1))));
K2:=IF(LOW =MA(CLOSE,1),X,REF(X,BARSLAST(LOW =MA(CLOSE,1))));
C1:=REF(CLOSE,1) =K1 AND CLOSE
C2:=REF(CLOSE,1) =K2 AND CLOSE
K3:=BARSLAST(C1);
K4:=BARSLAST(C2);
高点:IF(K3 K4,K1,DRAWNULL),LINETHICK2,COLORYELLOW;
升高点:=HIGH REF(HIGH,1) AND REF(HIGH,1) REF(HIGH,2);
KK:=BARSLAST(升高点);
升高:REF(HIGH,KK+1),LINETHICK0;
IF(CLOSE,升高,DRAWNULL),,COLORRED;
末升低点:=CROSS(CLOSE,升高) AND (CLOSE-REF(升高,0))/REF(升高,0) =0.03 OR VOL REF(VOL,1) AND CLOSE OPEN AND CLOSE 1*REF((CLOSE+OPEN)/2,1) AND LOW REF(LOW,1) AND REF(LOW,1) REF(LOW,2) OR REF(VOL,1) REF(VOL,2) AND CLOSE OPEN AND CLOSE REF(CLOSE,1)*1.04 AND (REF(CLOSE,1)-REF(CLOSE,2))/REF(CLOSE,2) =0.03;
TY:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1) =0.095 OR 末升低点;
SJ:=BARSLAST(TY);{www.9m8.cn 九毛八公式指标网}
TJ1:=VOL REF(VOL,1) AND REF(VOL,1) REF(VOL,2) OR CLOSE REF(CLOSE,1) AND REF(CLOSE,1) REF(CLOSE,2) AND REF(CLOSE,2) REF(CLOSE,3);
SJ1:=BARSLAST(TJ1);
XDJL:=SJ;
PPPP:=BARSLAST(XDJL);
止损:REF(LOW,SJ1+1),COLORGREEN;
止盈:REF(LOW,SJ+1),COLORYELLOW;
IF(CLOSE =止损,止损,DRAWNULL),LINETHICK2,COLORGREEN;
IF(CLOSE REF(止损,1) AND CLOSE =止损,止损,DRAWNULL),LINETHICK2,COLORGREEN;
线:=MA(C,160);
割肉线:REFDATE(线,DATE),COLOR5C3317,LINETHICK1,POINTDOT;
DRAWTEXT(ISLASTBAR,割肉线,'割肉线'),COLOR5C3317;
A:=SUMBARS(V,CAPITAL*1);{累计换手=100%的周期}
A1:=SUM(COST(10),A)/A;{在A周期里获利10%的平均价}
A2:=SUM(COST(20),A)/A;{在A周期里获利20%的平均价}
A3:=SUM(COST(30),A)/A;{在A周期里获利30%的平均价}
A4:=SUM(COST(40),A)/A;{在A周期里获利40%的平均价}
A5:=SUM(COST(50),A)/A;{在A周期里获利50%的平均价}
成本线:(5*A1+4*A2+3*A3+2*A4+A5)/15,NODRAW,COLOR0055FF;
STICKLINE(ISLASTBAR ,成本线,成本线,30,0),LINETHICK2,COLOR0055FF;
DRAWTEXT(ISLASTBAR,成本线,' 成本线'),COLOR0055FF;
DRAWICON(A1X =0 AND REF(A1X,1) 0,L*0.96,1);
DRAWICON(A1X 0 AND REF(A1X,1) =0,H*1.02,2);
DRAWTEXT_FIX(ISLASTBAR,0.00,0.30,0,'★www.9m8.cn 九毛八公式指标网★'),COLORRED;