资源描述:
《通达信精准的背离主图指标公式》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、通达信精准的背离主图指标公式高:=CONST(REF(HHV(H,150),3));低:=CONST(REF(LLV(L,150),3));NN:=100;N:=9;LC:=REF(C,1);QC:=REF(C,2);AA:=REF(H,N)=HHV(H,2*N+1);AA1:=REF(L,N)=LLV(L,2*N+1);QY:=BACKSET(AA,N+1);QY1:=BACKSET(AA1,N+1);CC:=FILTER(QY,N)ANDH=HHV(H,N+1);CC1:=FILTER(QY1,N)ANDL
2、=LLV(L,N+1);DDD:=BARSLAST(CC);DD1:=BARSLAST(CC1);GDTS:=IF(CC,CURRBARSCOUNT,0);DDTS:=IF(CC1,CURRBARSCOUNT,0);UTS:=IF(DDD,REF(GDTS,DDD),GDTS);DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);GDCS1:=CONST(UTS);DDCS1:=CONST(DDTS1);GDCS13:=CONST(REF(H,GDCS1-1));DDCS13:=CONST(RE
3、F(L,DDCS1-1));SS1:=REF(UTS,DDD+1);TS2:=REF(DDTS1,DD1+1);GDCS2:=CONST(SS1);DDCS2:=CONST(TS2);M:=INTPART(3*N/5);AAA:=REF(H,M)=HHV(H,2*M+1);QYY:=BACKSET(AAA,M+1);CCC:=FILTER(QYY,M)ANDH=HHV(H,M+1);DDDD:=BARSLAST(CCC),NODRAW;GDTSS:=IF(CCC,CURRBARSCOUNT,0);TSS:=IF
4、(DDDD,REF(GDTSS,DDDD),GDTSS);GDCS11:=CONST(TSS);TS11:=REF(TSS,DDDD+1);GDCS22:=CONST(TS11);AA11:=REF(L,M)=LLV(L,2*M+1);QY11:=BACKSET(AA11,M+1);CC11:=FILTER(QY11,M)ANDL=LLV(L,M+1);DD11:=BARSLAST(CC11);DDTSS:=IF(CC11,CURRBARSCOUNT,0);DDTS11:=IF(DD11,REF(DDTSS,D
5、D11),DDTSS);DDCS11:=CONST(DDTS11);DDTS22:=REF(DDTS11,DD11+1);DDCS22:=CONST(DDTS22);ZGD:=HHV(H,60)*1.01.00;ZGD2:=CONST(ZGD);高压M:=DRAWLINE(CURRBARSCOUNT=GDCS22,H,CURRBARSCOUNT=GDCS11,H,1),COLORRED,LINETHICK1;低撑M:=DRAWLINE(CURRBARSCOUNT=DDCS22,L,CURRBARSCOUNT=D
6、DCS11,L,1)COLORRED,LINETHICK1;高压1:=DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1),COLORBLUE,LINETHICK1;低撑1:=DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1),COLORBLUE,LINETHICK1;高点:=CONST(HHV(H,NN));低点:=CONST(LLV(L,NN));{背景变色}R1:=C>LCANDC>QC;
7、R2:=REF(R1,1)ANDC=QC;R3:=REF(R2,1)ANDC>=LCANDCR4:=REF(R3,1)ANDC=QC;R5:=REF(R4,1)ANDC>=LCANDCR6:=REF(R5,1)ANDC=QC;R7:=REF(R6,1)ANDC>=LCANDCR8:=REF(R7,1)ANDC=QC;R9:=REF(R8,1)ANDC>=LCANDCRA:=REF(R9,1)ANDC=QC;RB:=REF(RA,1)ANDC>=LCANDCRC:=REF(RB,1)ANDC=QC;RD:=CRE
8、:=REF(RD,1)ANDC>=LCANDCRF:=REF(RE,1)ANDC=QC;R10:=REF(RF,1)ANDC>=LCANDCR11:=REF(R10,1)ANDC=QC;R12:=REF(R11,1)ANDC>=LCANDCR13:=REF(R12,1)ANDC=QC;R14:=REF(R13,1)ANDC>=LCANDCR15:=REF(R14,1)ANDC=QC;R