通达信指标公式源码-结合二位大师的作品-加上本人的优化趋势很明确。

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

N:=120;下降压力线:DRAWLINE(HIGH=HHV(HIGH,10),HIGH,LOW=LLV(LOW,3),HHV(HIGH,3),1),COLORYELLOW;上涨支撑线:DRAWLINE(LOW=LLV(LOW,10),LOW,HIGH=HHV(HIGH,3),LLV(LOW,3),1),COLORRED;HIGHN:=10;LOWN:=10;HIGHDISPLAY:=0;LOWDISPLAY:=0;ZGDISPLAY:=0;MADISPLAY:=0;AAB:=REF(H,HIGHN)=HHV(H,2*HIGHN+1);QY:=BACKSET(AAB,HIGHN+1);CC:=FILTER(QY,HIGHN)ANDH=HHV(H,HIGHN+1);DRAWICON(CC,H*1.02,2);DDD:=BARSLAST(CC);GDTS:=IF(CC,CURRBARSCOUNT,0);DINGBU:=IF(DDD,REF(H,DDD),H);DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);DINGBU1:=REF(DINGBU,DDD+1);GDCS1:=CONST(DINGBUTS);DINGBUTS1:=REF(DINGBUTS,DDD+1);GDCS2:=CONST(DINGBUTS1);DINGBU2:=REF(DINGBU1,DDD+1);MMM:=IF(CURRBARSCOUNTGDCS2,0,1);高点压力:DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1)COLORGREEN,DOTLINE;压力A:DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H,GDCS2-1),1),COLOR0055FF,DOTLINE;压力B:DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COLORYELLOW,DOTLINE;AA1:=REF(L,LOWN)=LLV(L,2*LOWN+1);QY1:=BACKSET(AA1,LOWN+1);CC1:=FILTER(QY1,LOWN)ANDL=LLV(L,LOWN+1);DD1:=BARSLAST(CC1);DDTS:=IF(CC1,CURRBARSCOUNT,0);YDB:=IF(DD1,REF(L,DD1),L);DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);DDCS1:=CONST(DDTS1);ZDB:=REF(YDB,DD1+1);DDTS2:=REF(DDTS1,DD1+1);DDCS2:=CONST(DDTS2);低点支撑:DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1)COLORRED,DOTLINE;ZGSTAR:=(高点压力+低点支撑)/2;ZGEND:=CONST((高点压力+低点支撑)/2);STARDAY:=IF(DDCS2GDCS2,DDCS2,GDCS2);中轨:DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR,ZGEND,1),POINTDOT,COLORFFBBFF,LINETHICK1;TTT:=6;A1:=REF(HIGH,6)=HHV(HIGH,2*TTT+1);B1:=FILTER(A1,TTT);C1:=BACKSET(B1,TTT+1);D1:=FILTER(C1,TTT);A2:=REF(LOW,TTT)=LLV(LOW,2*TTT+1);B2:=FILTER(A2,TTT);C2:=BACKSET(B2,TTT+1);D2:=FILTER(C2,TTT);E1:=(REF(LLV(LOW,2*TTT),1)+REF(HHV(HIGH,2*TTT),1))/2;E2:=(HIGH+LOW)/2;H1:=(D1ANDNOT(D2ANDE1=E2))ORBARSTATUSORBARSCOUNT(CLOSE)=1;L1:=(D2ANDNOT(D1ANDE1E2));H2:=D1ANDNOT(D2ANDE1=E2);X1:=REF(BARSLAST(H1),1)+1;F1:=BACKSET(H1ANDCOUNT(L1,X1)0,LLVBARS(IF(L1,LOW,10000),X1));G1:=F1REF(F1,1);I1:=BACKSET(G1,2);LD:=I1REF(I1,1);L2:=LDORBARSTATUSORBARSCOUNT(CLOSE)=1;X2:=REF(BARSLAST(L2),1)+1;F2:=BACKSET(L2ANDCOUNT(H2,X2)0,HHVBARS(IF(H2,HIGH,0),X2));G2:=F2REF(F2,1);I2:=BACKSET(G2,2);HD:=I2REF(I2,1);UU:=BACKSET(BARSTATUS,BARSLAST(LD)+1);VV:=UUREF(UU,1);WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2);XX:=WWREF(WW,1);UU2:=BACKSET(BARSTATUS,BARSLAST(HD)+1);VV2:=UU2REF(UU2,1);WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);XX2:=WW2REF(WW2,1);近低A:REF(L,BARSLAST(VV)),COLORWHITE,LINETHICK1,DOTLINE;近低B:REF(L,BARSLAST(XX)),COLORMAGENTA,DOTLINE;DRAWTEXT(CURRBARSCOUNT=2,高点压力,STRCAT('压力延伸:',CON2STR(高点压力,2))),COLORYELLOW;DRAWTEXT(CURRBARSCOUNT=2,低点支撑,STRCAT('支撑延伸:',CON2STR(低点支撑,2))),COLORYELLOW;DRAWTEXT(CURRBARSCOUNT=2,中轨,STRCAT('中轨:',CON2STR(中轨,2))),COLORYELLOW;DRAWTEXT(CURRBARSCOUNT=2,压力A,STRCAT('压力A:',CON2STR(压力A,2))),COLORYELLOW;DRAWTEXT(CURRBARSCOUNT=2,压力B,STRCAT('压力B:',CON2STR(压力B,2))),COLORYELLOW;DRAWTEXT(CURRBARSCOUNT=2,近低A,STRCAT('←近低A:',CON2STR(近低A,2))),COLORWHITE;DRAWTEXT(CURRBARSCOUNT=2,近低B,STRCAT('←近低B:',CON2STR(近低B,2))),COLORMAGENTA;TS:=BARSLAST(L=LLV(L,N));开始信号:=FILTERX(TS=0,BARSSINCE(C));开始天数:=BARSLAST(开始信号);天数横线:=CONST(开始天数);低点:DRAWLINE(L=LLV(L,N),L,ISLASTBAR,REF(L,TS),1),COLORGRAY;高点:DRAWLINE(L=LLV(L,N),CONST(HHV(H,天数横线)),ISLASTBAR,REF(CONST(HHV(H,天数横线)),TS),1),COLORGRAY;STICKLINE(开始信号,L,CONST(HHV(H,天数横线)),0,0),COLORGRAY;STICKLINE(ISLASTBAR,低点,高点,0,0),COLORGRAY;DRAWKLINE(HIGH,OPEN,LOW,CLOSE);C2A:=REF(C,1),NODRAW;涨停:=REF(C,1)*1.1-C0.01ANDH=C,NODRAW;STICKLINE(涨停,OPEN,CLOSE,1,0),COLORRED;STICKLINE(涨停,H,L,0,0),COLORRED;跌停:=IF((C2A-C)*100/C2A=(10-0.01*100/C2A)ANDL=C,1,0),NODRAW;STICKLINE(跌停,OPEN,CLOSE,1,0),COLORGREEN;STICKLINE(跌停,H,L,0,1),COLORGREEN;

1 / 4
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功