缠论分型通达信指标公式源码.doc

合集下载

通达信指标公式源码缠论主神优化主图指标

通达信指标公式源码缠论主神优化主图指标

NAA:=10;{源码120.调整时间长短。

最底10、21;}TA:=MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-L OW));ATR:=EMA(TA,5);{筹码峰高度调整线,源码181。

参数最低21.如果抓大牛把参数加大。

}VAR81:=REF(CLOSE,NAA)-REF(ATR,1);仙界线:=HHV(VAR81,5),COLORYELLOW;{筹码峰高度调整线,最低21.源码181}上:=(1+1/100)*仙界线;下:=(1-1/100)*仙界线;{上:=(1+7/100)*仙界线;下:=(1-7/100)*仙界线;中:=(上+下)/2;}XGD:DRAWBAND(上,RGB(258,88,0),下,RGB(258,88,0));{颜色亮度};{箱体}TC1S:=IF(H=HHV(H,48),H,DRAWNULL);TC2S:=CONST(BARSLAST(TC1S=H))+1;UPPERS:=CONST(IF(TC2S=1,H,REF(H,TC2S-1)));BC1S:=IF(L=LLV(L,48),L,DRAWNULL);BC2S:=CONST(BARSLAST(BC1S=L))+1;LOWERS:=CONST(IF(BC2S=1,L,REF(L,BC2S-1)));LPS:=CURRBARSCOUNT<=BC2S AND L=LOWERS;HPS:=CURRBARSCOUNT<=TC2S AND H=UPPERS;AB1S:=EMA(((2*C+H+L)/4-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100,8);BA1S:=EMA(AB1S,5);上轨:=REFDATE(REF(HHV(MAX(C,O),96),5),DATE);下轨:=REFDATE(REF(LLV(MIN(C,O),96),5),DATE);中轨:=((上轨)+(下轨))/2;YXHX:=DATE>=REF(DATE,BARSLAST(IF(BC2S>TC2S,LPS,HPS)));上沿:IF(AB1S>0 AND AB1S-BA1S<=0 AND YXHX,上轨,上轨),COLOR555555,LINETHICK2;中枢:IF(AB1S>0 AND AB1S-BA1S<=0 AND YXHX,中轨,中轨),COLOR555555,LINETHICK2;下沿:IF(AB1S>0 AND AB1S-BA1S<=0 AND YXHX,下轨,下轨),COLOR555555,LINETHICK2;{三K线}三K线:=IF(三K线,1,DRAWNULL);DG:=MAX(MAX(REFX(L,1),REFX(L,2)),REFX(L,3));GD:=MIN(MIN(REFX(H,1),REFX(H,2)),REFX(H,3));AA11:=(DG+GD)/2;A11:=AA11>REFX(L,3) AND REFX(L,2)< AA11 AND REFX(L,1) <AA11 ;A21:=FILTER(A11,BARSLAST(A11)+2);A41:=A11 AND A21;A51:=IF(REF(A41,1),H,0),NODRAW;STICKLINE(三K线=1 &&REF(A41,2),REF(GD,2),REF(DG,2),13,-1),COLORMAGENTA; DRAWKLINE(H,O,L,C);{峰谷}峰谷:=IF(峰谷,1,DRAWNULL);PA:=10;PB:=REF(HIGH,PA)=HHV(HIGH,2*PA+1);PC:=FILTER(PB,PA);PD:=BACKSET(PC,PA+1);PE:=FILTER(PD,PA);{高点}峰线:(REF(HIGH,BARSLAST(PE)))*峰谷,COLORRED,POINTDOT,LINETHICK2; AA21:=REF(LOW,PA)=LLV(LOW,2*PA+1);BB21:=FILTER(AA21,PA);CC21:=BACKSET(BB21,PA+1);DD21:=FILTER(CC21,PA);{低点}谷线:(REF(LOW,BARSLAST(DD21)))*峰谷,COLORGREEN,POINTDOT,LINETHICK2;{三角形中枢}时间:=4;A:=H=HHV(H,时间*5) AND HHV(H,时间*5)>REF(HHV(H,时间*5),1);B:=L=LLV(L,时间*5) AND LLV(L,时间*5)<REF(LLV(L,时间*5),1);CCA:DRAWLINE(A,H,B,L,0),COLORGREEN,LINETHICK2;CCB:DRAWLINE(B,L,A,H,0),COLORRED,LINETHICK2;N:=(0,1,1);{缠论高低点}局部低点预选A:=BACKSET(LLV(L,5)<REF(LLV(L,4),1),4);局部低点预选B:=BACKSET(局部低点预选A=0 AND REF(局部低点预选A,1)=1,2);局部低点预选C:=IF(局部低点预选B=1 AND REF(局部低点预选B,1)=0,-1,0); 局部高点预选A:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4);局部高点预选B:=BACKSET(局部高点预选A=0 AND REF(局部高点预选A,1)=1,2);局部高点预选C:=IF(局部高点预选B=1 AND REF(局部高点预选B,1)=0,1,0); 缺口判断:=IF(L>REF(H,1),1,IF(H<REF(L,1),-1,0));距前高天:=BARSLAST(局部高点预选C=1);距前低天:=BARSLAST(局部低点预选C=-1);小值周期:=LOWRANGE(L);大值周期:=TOPRANGE(H);低保留AA:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);低保留AB:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR LLV(L,距前低天+2)<REF(LLV(L,距前低天+1),1)),-1,0);低保留S:=IF((低保留AA=-1 OR 低保留AB=-1) AND L<REF(H,距前高天+1),-1,0);预判:=IF((距前低天<4 AND HHV(缺口判断,距前低天)!=1) OR REF(低保留S,距前低天)=0,1,0);判断:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND 预判=1 AND 大值周期>REF(小值周期,距前低天+1) AND 大值周期>REF(小值周期,距前低天) AND 大值周期>REF(大值周期,距前高天),1,0);高保留A:=IF(局部高点预选C=1 AND REF(距前低天,1)>REF(距前高天,1) AND HHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0);高保留B:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND REF(低保留S,距前低天)=-1 AND (距前低天>=4 OR HHV(缺口判断,距前低天)=1),1,0);高保留:=IF((高保留A=1 OR 高保留B=1 OR 判断=1) AND H>REF(L,距前低天+1),1,0);预判A:=IF((距前高天<4 AND HHV(缺口判断,距前高天)!=1) OR REF(高保留,距前高天)=0,1,0);判断A:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND 预判A=1 AND 小值周期>REF(大值周期,距前高天+1) AND 小值周期>REF(大值周期,距前高天) AND 小值周期>REF(小值周期,距前低天),-1,0);低保留A:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);低保留B:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR 判断A=-1),-1,0);低保留:=IF((低保留A=-1 OR 低保留B=-1) AND L<REF(H,距前高天+1),-1,0); 距前高天A:=BARSLAST(高保留=1);距前低天A:=BARSLAST(低保留=-1);预判X:=IF((距前低天A<4 AND HHV(缺口判断,距前低天A)!=1) OR REF(低保留,距前低天A)=0,1,0);判断X:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND 预判X=1 AND 大值周期>REF(小值周期,距前低天A+1) AND 大值周期>REF(小值周期,距前低天A) AND 大值周期>REF(大值周期,距前高天A),1,0); 高保留XA:=IF(局部高点预选C=1 AND REF(距前低天A,1)>REF(距前高天A,1) AND HHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0);高保留XB:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND REF(低保留,距前低天A)=-1 AND (距前低天A>=4 OR HHV(缺口判断,距前低天A)=1),1,0);高保留X:=IF((高保留XA=1 OR 高保留XB=1 OR 判断X=1) AND H>REF(L,距前低天A+1),1,0);预判XA:=IF((距前高天A<4 AND HHV(缺口判断,距前高天A)!=1) OR REF(高保留XA,距前高天A)=0,1,0);判断XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND 预判XA=1 AND 小值周期>REF(大值周期,距前高天A+1) AND 小值周期>REF(大值周期,距前高天A) AND 小值周期>REF(小值周期,距前低天A),-1,0); 低保留XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)>REF(距前低天A,1) AND LLV(L,距前高天A+1)<REF(LLV(L,距前高天A+1),1),-1,0);低保留XB:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND (距前高天A>=4 OR LLV(缺口判断,距前高天A)=-1 OR 判断XA=-1),-1,0);低保留X:=IF((低保留XA=-1 OR 低保留XB=-1) AND L<REF(H,距前高天A+1),-1,0);距前高天YA:=BARSLAST(高保留X=1);距前低天YA:=BARSLAST(低保留X=-1);预判YX:=IF((距前低天YA<4 AND HHV(缺口判断,距前低天YA)!=1) OR REF(低保留X,距前低天YA)=0,1,0);判断YX:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND 预判YX=1 AND 大值周期>REF(小值周期,距前低天YA+1) AND 大值周期>REF(小值周期,距前低天YA) AND 大值周期>REF(大值周期,距前高天YA),1,0);高保留YXA:=IF(局部高点预选C=1 AND REF(距前低天YA,1)>REF(距前高天YA,1) AND HHV(H,距前低天YA+1)>REF(HHV(H,距前低天YA+1),1),1,0);高保留YXB:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND REF(低保留X,距前低天YA)=-1 AND (距前低天YA>=4 OR HHV(缺口判断,距前低天YA)=1),1,0);高保留YX:=IF((高保留YXA=1 OR 高保留YXB=1 OR 判断YX=1) ANDH>REF(L,距前低天YA+1),1,0);预判YXA:=IF((距前高天YA<4 AND HHV(缺口判断,距前高天YA)!=1) ORREF(高保留YXA,距前高天YA)=0,1,0);判断YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND 预判YXA=1 AND 小值周期>REF(大值周期,距前高天YA+1) AND小值周期>REF(大值周期,距前高天YA) AND 小值周期>REF(小值周期,距前低天YA),-1,0);低保留YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)>REF(距前低天YA,1) AND LLV(L,距前高天YA+1)<REF(LLV(L,距前高天YA+1),1),-1,0);低保留YXB:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND (距前高天YA>=4 OR LLV(缺口判断,距前高天YA)=-1 OR 判断YXA=-1),-1,0);低保留YX:=IF((低保留YXA=-1 OR 低保留YXB=-1) AND L<REF(H,距前高天YA+1),-1,0);AAAD:=IF(高保留YX=1 AND 低保留YX=-1 AND H>REF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1 AND 低保留YX=-1 AND L<REF(L,REF(距前低天YA,1)+2),-1,0));极点保留:=IF(AAAD=0,高保留YX+低保留YX,AAAD);局部极点:=IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL)),CIRCLEDOT,COLORLIMAGENTA;C1:DRAWLINE(极点保留=-1,局部极点,极点保留=1,局部极点,0),COLORMAGENTA;C2:DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0),COLORWHITE;DRAWTEXT(极点保留=1,局部极点,'卖'),COLORGREEN;DRAWTEXT(极点保留=-1,局部极点,'买'),LINETHICK2,COLORRED;{均线}{MA1:EMA(C,M1),LINETHICK2,COLORWHITE;MA2:EMA(C,M2),LINETHICK2,COLORYELLOW;MA3:EMA(C,M3),LINETHICK2,COLORRED;}MC:=100;NN:=0.4;MIDZ:MA(CLOSE,MC),COLORWHITE,LINETHICK3;AN:=EMA((EMA(C,29)+EMA(C,31)+EMA(C,33))/3,3);A1:=EMA((EMA(C,1)+EMA(C,3)+EMA(C,5))/3,3),COLOR1010FF;A15D:IF(K2!=2, AN-(A1-AN*0.977),DRAWNULL),COLORBLUE,LINETHICK3; M5:=MA(C,3),COLORRED,LINETHICK3;{11、变色下插线}B55:=ATAN((A15D/REF(A15D,1)-1)*100)*180/3.1416;IF(55>30 AND A15D>REF(A15D,1),A15D,DRAWNULL),COLORCYAN,LINETHICK3;B100:=ATAN((M5/REF(M5,1)-1)*100)*180/3.1416;IF(B55<0 AND A15D<REF(A15D,1),A15D,DRAWNULL),COLORRED,LINETHICK3;{12、黄色起飞跑道};{13、飓风眼启爆,K线下方蓝色柱,股价启动信号,无函数}AHC1:=CLOSE*VOL;AHC2:=EMA((EXPMA(AHC1,2)/EXPMA(VOL,2)+EXPMA(AHC1,5)/EXPMA(VOL,5 )+EXPMA(AHC1,10)/EXPMA(VOL,10)+EXPMA(AHC1,20)/EXPMA(VOL,20))/4,10),COLOR YELLOW;风向R:=1.06*AHC2,LINETHICK2,COLORWHITE;吹:=1.13*AHC2,LINETHICK2,COLORWHITE;ZT:=REF(C,1)*1.1-C<0.01 AND H=C;飓风:=CROSS(C,风向R) AND ZT;STICKLINE(飓风,L*0.98,L*0.80,2,0),COLORBLUE;OUT1:=CROSS(M5,A15D);DRAWICON(OUT1,L*1.02,13);{红球};。

目前最准确的通达信缠论分笔公式

目前最准确的通达信缠论分笔公式

目前最准确的通达信缠论分笔公式-CAL-FENGHAI.-(YICAI)-Company One1目前见到的最准确的通达信缠论分笔公式参数:老笔=1,使用老笔定义,默认为0,使用新笔定义G:=MA(C,5);D:=MA(C,10);HH:=REF(H,5)=HHV(H,11);LL:=REF(L,5)=LLV(L,11);FG01:=BACKSET(HH,6)>BACKSET(HH,5) ;FD01:=BACKSET(LL,6)>BACKSET(LL,5) ;FG02:=IF(BARSLAST(FG01)=BARSLAST(FD01) AND G>D,FG01, IF(BARSLAST(FD01)>BARSLAST(FG01),FG01,0));FD02:=IF(BARSLAST(FG01)=BARSLAST(FD01) AND D>G,FD01, IF(BARSLAST(FG01)>BARSLAST(FD01),FD01,0));FG0:=FG02 AND H=HHV(H,BARSLAST(FD02));FD0:=FD02 AND L=LLV(L,BARSLAST(FG02));GP:IF(FG0,H,DRAWNULL),CIRCLEDOT,COLORCYAN;DP:IF(FD0,L,DRAWNULL),CIRCLEDOT,COLORCYAN;GQ:=L>REF(H,1) AND DAY!=REF(DAY,1);DQ:=H<REF(L,1) AND DAY!=REF(DAY,1);GQL:=REF(L,BARSLAST(GQ));DQH:=REF(H,BARSLAST(DQ));FGH:=REF(H,BARSLAST(FG0));FGL:=REF(L,BARSLAST(FG0));FGH1:=REF(H,BARSLAST(FG0)+1);FGL1:=REF(L,BARSLAST(FG0)+1);FGH2:=REF(H,BARSLAST(FG0)+2);FGL2:=REF(L,BARSLAST(FG0)+2);FDH:=REF(H,BARSLAST(FD0));FDL:=REF(L,BARSLAST(FD0));FDH1:=REF(H,BARSLAST(FD0)+1);FDL1:=REF(L,BARSLAST(FD0)+1);FDH2:=REF(H,BARSLAST(FD0)+2);FDL2:=REF(L,BARSLAST(FD0)+2);FGZH:=IF(FGL<=FGL1,FGH2,FGH1);FGZL:=IF(FGH1<FGL,FGL,IF(FGL<=FGL1,FGL2,FGL1));FDZH:=IF(FDL1>FDH,FDH,IF(FDH>=FDH1,FDH2,FDH1));FDZL:=IF(FDH>=FDH1,FDL2,FDL1);FG1:=FGH>FDZH AND FG0;FD1:=FDL<FGZL AND FD0;FG:=FG1 AND FGH>FDH AND FGL>FDL AND FGL1>FDL;FD:=FD1 AND FDL<FGL AND FDH<FGH AND FDH1<FGH;BH0:=(H<=REF(H,1) AND L>=REF(L,1)) OR (H>=REF(H,1) AND L<=REF(L,1)); BHG:=COUNT(BH0,BARSLAST(FD0));BHD:=COUNT(BH0,BARSLAST(FG0));BGQ:=COUNT(GQ,BARSLAST(FD0));BDQ:=COUNT(DQ,BARSLAST(FG0));BK0:=IF(BHG>0,BHG+2+老笔,IF(BHD,BHD+2+老笔,3));BK:=IF(BGQ,BK0-BGQ,IF(BDQ,BK0-BDQ,BK0));G1X:=(FG AND BARSLAST(FD)>BK);D1X:=(FD AND BARSLAST(FG)>BK);G1:=(FG0 AND REF(H,BARSLAST(FG0))>=REF(H,BARSLAST(G1X)) AND BARSLAST(D1X)>BARSLAST(G1X))OR (FG1 AND COUNT(GQ,BARSLAST(FD1))>0 ANDREF(H,BARSLAST(FG1))>REF(H,BARSLAST(G1X)));D1:=(FD0 AND REF(L,BARSLAST(FD0))<=REF(L,BARSLAST(D1X)) AND BARSLAST(G1X)>BARSLAST(D1X))OR (FD1 AND COUNT(DQ,BARSLAST(FG1))>0 ANDREF(L,BARSLAST(FD1))<REF(H,BARSLAST(D1X)));G1H:=IF(BARSLAST(D1)>BARSLAST(G1),REF(H,BARSLAST(G1)),REF(H,BARSLAST(D 1))),;D1L:=IF(BARSLAST(G1)>BARSLAST(D1),REF(L,BARSLAST(D1)),REF(L,BARSLAST(G1) ));G2:=G1 AND H=HHV(G1H,BARSLAST(D1)+1) AND H>REF(H,1) AND BARSLAST(D1)>BARSLAST(G1);D2:=D1 AND L=LLV(D1L,BARSLAST(G1)+1) AND L<REF(L,1) ANDBARSLAST(G1)>BARSLAST(D1);G3:=G2 OR (FG0 AND REF(H,BARSLAST(FG0))>REF(H,BARSLAST(G2)) AND BARSLAST(D2)>BARSLAST(G2));D3:=D2 OR (FD0 AND REF(L,BARSLAST(FD0))<REF(L,BARSLAST(D2)) AND BARSLAST(G2)>BARSLAST(D2));GPB:IF(G1X,H,DRAWNULL),CIRCLEDOT,COLORYELLOW;DPB:IF(D1X,L,DRAWNULL),CIRCLEDOT,COLORYELLOW;{画线}NN:=G3;UU:=D3;L1:DRAWLINE(UU,L,NN, H,0),COLORLIGREEN;L2:DRAWLINE(NN,H,UU,L,0),COLORLIGREEN;{标示端点数值}{DRAWNUMBER(L1 AND L2 AND NN ,H,H),COLORLIRED;DRAWNUMBER(L1 AND L2 AND UU ,L,L),COLORLIMAGENTA;};。

通达信公式指标源码

通达信公式指标源码

通达信公式指标源码S:=REF(CLOSE,1);。

MA6:MA(CLOSE,6);。

MA12:MA(CLOSE,12);。

MA20:MA(CLOSE,20);。

MA60:MA(CLOSE,60);。

MA120:MA(CLOSE,120);。

DIF:EMA(CLOSE,12)-EMA(CLOSE,26);。

DEA:EMA(DIF,9);。

MACD:2*(DIF-DEA),COLORFF00FF;。

IF(MA6>MA12ANDMA12>MA20ANDMA20>MA60ANDMA60>MA120ANDC>O,1,0)A ND(C>REF(C,1)ANDC>REF(C,2)ANDC>REF(C,3))AND(CROSS(DIF,DEA)OR(DIF >=DEAANDDIF>0))THEN。

收盘价高于昨日收盘价,且周期长短均有上涨趋势,并且DIF大于DEA且DIF高于零,以及DIF和DEA发生金叉,可判断出多头排列,此时可以进行多头开仓,获取股票中期涨价的潜力。

}。

ELSEIF(MA6<MA12ANDMA12<MA20ANDMA20<MA60ANDMA60<MA120ANDC<O,1 ,0)AND(C<REF(C,1)ANDC<REF(C,2)ANDC<REF(C,3))AND(CROSS(DEA,DIF)OR (DIF<=DEAANDDIF<0))THEN。

收盘价低于昨日收盘价,且各周期均呈下跌趋势,并且DIF小于DEA 且DIF低于零,以及DEA和DIF发生死叉,可判断出空头排列,此时可以进行空头开仓,获取股票中期跌价的潜力。

}。

ELSE。

此时股票走势无法判断,不建议进行交易。

通达信缠论中枢指标公式、分型选股指标公式,纯经验分享!

通达信缠论中枢指标公式、分型选股指标公式,纯经验分享!

第一、通达信缠论中枢指标公式这个是格力电器的周线走势图,里面的中枢走势图都是画好的,很明显可以看出是那个级别,至于操作的话还是要根据自身的操作理念去使用了,我自己做三买的位置,出中枢一笔吧。

局部低点预选A:=BACKSET(LLV(L,5)局部低点预选B:=BACKSET(局部低点预选A=0 AND REF(局部低点预选A,1)=1,2); 局部低点预选C:=IF(局部低点预选B=1 AND REF(局部低点预选B,1)=0,-1,0);局部高点预选A:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4);局部高点预选B:=BACKSET(局部高点预选A=0 AND REF(局部高点预选A,1)=1,2);局部高点预选C:=IF(局部高点预选B=1 AND REF(局部高点预选B,1)=0,1,0);缺口判断:=IF(L>REF(H,1),1,IF(H距前高天:=BARSLAST(局部高点预选C=1);距前低天:=BARSLAST(局部低点预选C=-1);小值周期:=LOWRANGE(L);大值周期:=TOPRANGE(H);低保留AA:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)低保留AB:=IF(局部低点预选C=-1 AND REF(距前高天,1)=4 ORLLV(缺口判断,距前高天)=-1 OR LLV(L,距前低天+2)低保留S:=IF((低保留AA=-1 OR 低保留AB=-1) AND L预判:=IF((距前低天判断:=IF(局部高点预选C=1 AND REF(距前低天,1)REF(小值周期,距前低天+1) AND 大值周期>REF(小值周期,距前低天) AND 大值周期>REF(大值周期,距前高天),1,0);高保留A:=IF(局部高点预选C=1 AND REF(距前低天,1)>REF(距前高天,1) ANDHHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0);高保留B:=IF(局部高点预选C=1 AND REF(距前低天,1)=4 ORHHV(缺口判断,距前低天)=1),1,0);高保留:=IF((高保留A=1 OR 高保留B=1 OR 判断=1) AND H>REF(L,距前低天+1),1,0); 预判A:=IF((距前高天判断A:=IF(局部低点预选C=-1 AND REF(距前高天,1)REF(大值周期,距前高天+1) AND 小值周期>REF(大值周期,距前高天) AND 小值周期>REF(小值周期,距前低天),-1,0);低保留A:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)低保留B:=IF(局部低点预选C=-1 AND REF(距前高天,1)=4 ORLLV(缺口判断,距前高天)=-1 OR 判断A=-1),-1,0);低保留:=IF((低保留A=-1 OR 低保留B=-1) AND L距前高天A:=BARSLAST(高保留=1);距前低天A:=BARSLAST(低保留=-1);预判X:=IF((距前低天A判断X:=IF(局部高点预选C=1 AND REF(距前低天A,1)REF(小值周期,距前低天A+1) AND 大值周期>REF(小值周期,距前低天A) AND大值周期>REF(大值周期,距前高天A),1,0);高保留XA:=IF(局部高点预选C=1 AND REF(距前低天A,1)>REF(距前高天A,1) AND HHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0);高保留XB:=IF(局部高点预选C=1 AND REF(距前低天A,1)=4 ORHHV(缺口判断,距前低天A)=1),1,0);高保留X:=IF((高保留XA=1 OR 高保留XB=1 OR 判断X=1) ANDH>REF(L,距前低天A+1),1,0);预判XA:=IF((距前高天A判断XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)REF(大值周期,距前高天A+1) AND 小值周期>REF(大值周期,距前高天A) AND小值周期>REF(小值周期,距前低天A),-1,0);低保留XB:=IF(局部低点预选C=-1 AND REF(距前高天A,1)=4 ORLLV(缺口判断,距前高天A)=-1 OR 判断XA=-1),-1,0);低保留X:=IF((低保留XA=-1 OR 低保留XB=-1) AND L距前高天YA:=BARSLAST(高保留X=1);距前低天YA:=BARSLAST(低保留X=-1);预判YX:=IF((距前低天YA判断YX:=IF(局部高点预选C=1 ANDREF(距前低天YA,1)REF(小值周期,距前低天YA+1) AND大值周期>REF(小值周期,距前低天YA) AND大值周期>REF(大值周期,距前高天YA),1,0);高保留YXA:=IF(局部高点预选C=1 AND REF(距前低天YA,1)>REF(距前高天YA,1) AND HHV(H,距前低天YA+1)>REF(HHV(H,距前低天YA+1),1),1,0);高保留YXB:=IF(局部高点预选C=1 AND REF(距前低天YA,1)=4 ORHHV(缺口判断,距前低天YA)=1),1,0);高保留YX:=IF((高保留YXA=1 OR 高保留YXB=1 OR 判断YX=1) ANDH>REF(L,距前低天YA+1),1,0);预判YXA:=IF((距前高天YA判断YXA:=IF(局部低点预选C=-1 ANDREF(距前高天YA,1)REF(大值周期,距前高天YA+1) AND小值周期>REF(大值周期,距前高天YA) AND小值周期>REF(小值周期,距前低天YA),-1,0);低保留YXB:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)=4 ORLLV(缺口判断,距前高天YA)=-1 OR 判断YXA=-1),-1,0);低保留YX:=IF((低保留YXA=-1 OR 低保留YXB=-1) AND LAAAD:=IF(高保留YX=1 AND 低保留YX=-1 ANDH>REF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1 AND 低保留YX=-1 AND L 极点保留:=IF(AAAD=0,高保留YX+低保留YX,AAAD);局部极点:IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL)) CIRCLEDOT COLORYELLOW;DRAWLINE(极点保留=-1,局部极点,极点保留=1,局部极点,0)COLORBLUE; DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0)COLORBLUE; DRAWICON(极点保留=-1,L-0.03,1);DRAWICON(极点保留=1,H+0.03,2);HH0:=CONST(HHV(H,120))*1;LL0:=CONST(LLV(L,120))*1;MM0:=CONST((HH0+LL0)/2);HH1:=IF(CONST(C)LL1:=LL0;HLMAX:=MAX(HH1,LL1);HLMIN:=MIN(HH1,LL1);HLMN1:=(HLMAX+HLMIN)/2;HLMN2:=(HLMAX-HLMIN);HLMN3:=HHV(V,250)/2;HLMN4:=HHV(V,250);VZ:=(V-HLMN3)*HLMN2/HLMN4+HLMN1;预测量:IF(CURRBARSCOUNT=1 ANDPERIOD=5,VOL*240/FROMOPEN,VOL),COLOR990000,NODRAW;STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,(0-HLMN3)*HLMN2/HLMN4+H LMN1,(预测量-HLMN3)*HLMN2/HLMN4+HLMN1,2,-1),COLORLIGRAY;STICKLINE(C>=O,VZ,(0-HLMN3)*HLMN2/HLMN4+HLMN1,1,1),COLOR000099;STICKLINE(C{(MA(V,5)-HLMN3)*HLMN2/HLMN4+HLMN1,COLORFFFFFF;(MA(V,10)-HLMN3)*HLMN2/HLMN4+HLMN1,COLOR00FFFF;};第二、通达信缠论分型选股指标公式缠论中很重要的也就是顶底分型了,这个很清楚的能标记出顶底分型的位置,方便大家参考。

缠论主图通达信指标公式源码.doc

缠论主图通达信指标公式源码.doc

选股指标一缠论主图(指标选股/通达信贴图)我把主图里的黄金分割位换成半对数,这在投资领域里最擅长用的,比黄金分割在投资领域里更合理。

是上班族和平时没空看盘投资者最佳的指标{智能版:=“核心指标.VAR100#DAY”;}智能版:=“指标.核心#DAY“;MA1:MA(CLOSE,M1),COLORWHITE;MA2:MA(CLOSE,M2),COLORYELLOW;MA3:MA(CLOSE,M3),COLORCYAN;MA4:MA(CLOSE,M4),COLORCYAN;日线:=IF(PERIOD=5,1,0);CA3: = REF(C,1)* 日线;A1:=REF(HIGH,3)=HHV(HIGH,笔周期*3+1)* 智能版;B1:=FILTER(A1,3); C1:=BACKSET(B1,3+1);D1: = FILTER(C1,3);{高点}A2:=REF( LOW, 3)=LLV( LOW,笔周期*3+1)* 智能版;B2:=FILTER(A2,3); C2:=BACKSET(B2,3+1);D2:=FILTER(C2,3);{低点}E1:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2;E2:=(HIGH+LOW)/2;{高低点出现在同一K线上时可作取舍}H1:=(D1 AND NOT(D2 AND E1>=E2)) OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;H2: = D1 AND NOT(D2 AND E1>=E2);L1:=D2 AND NOT(D1 AND E1=E2);X1: = REF(BARSLAST(H1),1)+1;F1:=BACKSET(H1 AND COUNT(L1Z X1)>0/LLVBARS(IF(L1,LOW,10000),X1));G1:=F1>REF(F1,1);I1:=BACKSET(G1,2);LD:=I1>REF(I14);{过滤后低点}L2:=LD OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;X2:=REF(BARSLAST(L2),1)+1;F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,HIGH,0),X2));G2:=F2>REF(F2,1);I2:=BACKSET(G2Z2);HD:=I2>REF(I2,1);{过滤后高点}DRAWLINE(LD Z L,HD Z H,O),COLORYELLOW,LINETHICK1;DRAWLINE(HD,H,LD,L,O),COLORYELLOW,LINETHICK1;A3:=H;B3:=REF(H,REF(BARSLAST(HD),l)+l)>REF(H z REF(BARSLAST(HD),l)+2+REF(BARSLAST (HD),REF(BARSLAST(HD),l)+2));D3:=A3 AND B3 AND HD;E3: = BACKSET(D3z REF(BARSLAST(HD),l)+2);HH:=E3>REF(E3,1);{找出全部长期高点}A4:=L>REF(L,REF(BARSLAST(LD),1)+1);B4:=REF(L,REF(BARSLAST(LD),1)+1);D4:=A4 AND B4 AND LD;E4: = BACKSET(D4,REF(BARSLAST(LD),l)+2);LL:=E4>REF(E4,1);{找出全部长期低点}H3:=HH OR BARSTATUS=2 OR BARSCOUNT(C)=1; (后面进行过滤,方法同前。

通达信缠论中枢指标公式源码

通达信缠论中枢指标公式源码

通达信缠论中枢指标公式源码1什么是通达信缠论中枢指标?通达信缠论中枢指标是技术分析工具箱中的一种重要分析指标,在常规技术分析工具(如MACD、KDJ示、CCI等)的基础上,以缠论中枢指标作为分析依据来判断行情的有效性,根据缠论中枢指标的枢纽(也称中枢)进行买卖操作。

缠论中枢指标最早出现在纽约股票交易所(NYSE),并由美国投资者克鲁格曼(Richard Demille Wyckoff)创造,其目的是帮助投资者进行股票市场操作,如同今天的技术分析一样。

2缠论中枢指标元素缠论中枢指标包括九个元素,分别是:标准长短期变化率指标、中间位置指标、50日指标、150日指标、长短期变化率指标、100日指标、150日指标长期变化率指标、50日趋势系数指标、100日趋势系数指标。

3缠论中枢指标的计算以上面的九大元素为基础,通达信缠论中枢指标的计算方式可以分为两种:第一种计算方式采用实际价格;第二种计算方式采用上市公司或基金等市场行情因素计算出来的变量,如最高价、最低价、均价等。

根据计算结果,结合市场走势和影响行情的因素,就可以判断出枢纽的出现和转向点的位置,进而把握行情走势,作出有效的交易。

4利用缠论中枢指标来分析行情利用缠论中枢指标进行分析行情时,有一系列的步骤:1、首先应对行情走势作出预测,根据预测结果做出买卖决策;2、然后搜集数据、定量分析,统计此前枢纽的出现情况、和转向点的位置,确定枢纽变化的模式;3、根据枢纽的变化模式,来决定买入或者卖出的时机;4、根据50日、150日以及长期变化率指标,来决定卖出的时机;5、根据50日趋势系数指标和100日趋势系数指标,确定行情走势是否向极大方向发展;6、最后根据实际买入和卖出的时机,将当时买入或卖出的价格和数量记录下来,根据收益率来确定自己的交易策略的优劣。

总的来说,要是把握股票市场的走势,利用通达信缠论中枢指标,将会大大提高投资的成功率,减少投资的风险。

缠中说禅中枢和笔公式通达信版

缠中说禅中枢和笔公式通达信版

{通达信MA+中枢+分笔公式} {M1,M2 参数自己定,可选5,10} MA1:MA(CLOSE,5); MA2:MA(CLOSE,10); {N1:1,100,10;N2:1,100,10;DISP:=1,3,2};N1:=10;N2:=10;DISP:=2; K:=IF(PERIOD=5,1,{日} IF(PERIOD=6,1,{周} IF(PERIOD=7,1,{月} IF(PERIOD=8,1,{多分钟} IF(PERIOD=9,1,{多日} IF(PERIOD=10,1,{季} IF(PERIOD=11,2,{年} IF(PERIOD=4,1,{60F} IF(PERIOD=3,1,{30F} IF(PERIOD=2,1,{15F}IF(PERIOD=1,1{5F},1{1F})))))))))))/10;P1:=PEAK(1,K*N1,1); P2:=PEAK(1,K*N1,2); WP1:=PEAKBARS(1,K*N1,1); WP2:=PEAKBARS(1,K*N1,2); T1:=TROUGH(2,K*N2,1); T2:=TROUGH(2,K*N2,2); WT1:=TROUGHBARS(2,K*N2,1);WT2:=TROUGHBARS(2,K*N2,2); TJ1:=P1>T1 AND P2>T2 ; ZD:=MAX(T1,T2); ZG:=MIN(P1,P2); LL:=MIN(T1,T2); HH:=MAX(P1,P2); TJ2:=FILTER(ZG>ZD,2); TJ3:=ZG=REF(ZG,BARSLAST(TJ2)) OR ZD=REF(ZD,BARSLAST(TJ2));TJ4:=TJ1&&TJ2&&NOT(TJ3);TJ5:=BETWEEN(ZD,REF(ZD,REF(BARSLAST(TJ4),1)),REF (ZG,REF(BARSLAST(TJ4),1)));TJ6:=BETWEEN(ZG,REF(ZD,REF(BARSLAST(TJ4),1)),REF( ZG,REF(BARSLAST(TJ4),1)));TJ7:=ZG>REF(ZG,REF(BARSLAST(TJ4),1))&&ZDREF(HHV (H,4),1),4); 局部高点预选B:=BACKSET(局部高点预选A=0 AND REF(局部高点预选A,1)=1,2); 局部高点预选C:=IF(局部高点预选B=1 AND REF(局部高点预选B,1)=0,1,0); 缺口判断:=IF(L>REF(H,1),1,IF(HREF(距前低天,1) AND LLV(L,距前高天+1)=4 OR LLV(缺口判断,距前高天)=-1 OR LLV(L,距前低天+2)REF(小值周期,距前低天+1) AND 大值周期>REF(小值周期,距前低天) AND 大值周期>REF(大值周期, 距前高天),1,0); 高保留A:=IF(局部高点预选C=1 AND REF(距前低天,1)>REF(距前高天,1) AND HHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0); 高保留B:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND REF(低保留S,距前低天)=-1 AND (距前低天>=4 OR HHV(缺口判断,距前低天)=1),1,0); 高保留:=IF((高保留A=1 OR 高保留B=1 OR 判断=1) AND H>REF(L,距前低天+1),1,0); 预判A:=IF((距前高天<4 AND HHV(缺口判断,距前高天)!=1) OR REF(高保留,距前高天)=0,1,0); 判断A:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND 预判A=1 AND 小值周期>REF(大值周期,距前高天+1) AND 小值周期>REF(大值周期,距前高天) AND 小值周期>REF(小值周期, 距前低天),-1,0); 低保留A:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)=4 OR LLV(缺口判断,距前高天)=-1 OR 判断A=-1),-1,0); 低保留:=IF((低保留A=-1 OR 低保留B=-1) AND LREF(小值周期,距前低天A+1) AND 大值周期>REF(小值周期,距前低天A) AND 大值周期>REF(大值周期,距前高天A),1,0); 高保留XA:=IF(局部高点预选C=1 AND REF(距前低天A,1)>REF(距前高天A,1) AND HHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0); 高保留XB:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND REF(低保留,距前低天A)=-1 AND (距前低天A>=4 OR HHV(缺口判断,距前低天A)=1),1,0); 高保留X:=IF((高保留XA=1 OR 高保留XB=1 OR 判断X=1) AND H>REF(L,距前低天A+1),1,0); 预判XA:=IF((距前高天A<4 AND HHV(缺口判断,距前高天A)!=1) OR REF(高保留XA,距前高天A)=0,1,0); 判断XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND 预判XA=1 AND 小值周期>REF(大值周期,距前高天A+1) AND 小值周期>REF(大值周期,距前高天A) AND 小值周期>REF(小值周期,距前低天A),-1,0); 低保留XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)>REF(距前低天A,1) AND LLV(L,距前高天A+1)=4 ORLLV(缺口判断,距前高天A)=-1 OR 判断XA=-1),-1,0); 低保留X:=IF((低保留XA=-1 OR 低保留XB=-1) AND LREF(小值周期,距前低天YA+1) AND 大值周期>REF(小值周期,距前低天YA) AND 大值周期>REF(大值周期,距前高天YA),1,0); 高保留YXA:=IF(局部高点预选C=1 AND REF(距前低天YA,1)>REF(距前高天YA,1) AND HHV(H,距前低天YA+1)>REF(HHV(H,距前低天YA+1),1),1,0); 高保留YXB:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND REF(低保留X,距前低天YA)=-1 AND (距前低天YA>=4 OR HHV(缺口判断,距前低天YA)=1),1,0); 高保留YX:=IF((高保留YXA=1 OR 高保留YXB=1 OR 判断YX=1) AND H>REF(L,距前低天YA+1),1,0); 预判YXA:=IF((距前高天YA<4 AND HHV(缺口判断,距前高天YA)!=1) OR REF(高保留YXA,距前高天YA)=0,1,0); 判断YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND 预判YXA=1 AND 小值周期>REF(大值周期,距前高天YA+1) AND 小值周期>REF(大值周期,距前高天YA) AND 小值周期>REF(小值周期,距前低天YA),-1,0); 低保留YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)>REF(距前低天YA,1) AND LLV(L,距前高天YA+1)=4 OR LLV(缺口判断,距前高天YA)=-1 OR 判断YXA=-1),-1,0); 低保留YX:=IF((低保留YXA=-1 OR 低保留YXB=-1) AND LREF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1 AND 低保留YX=-1 AND L。

【通达信】原创通达信版-缠论分笔分段公式(附:缠论公式编写教程,打造自己的缠论体系)

【通达信】原创通达信版-缠论分笔分段公式(附:缠论公式编写教程,打造自己的缠论体系)

【通达信】原创通达信版-缠论分笔分段公式(附:缠论公式编写教程,打造自己的缠论体系)一切有为法,如梦幻泡影,如露亦如电,应作如是观。

本文开篇就以《金刚经》的偈语作序吧。

缠论大师很多,在下才疏学浅,不到之处敬请点拔。

另外声明一下,世间没有包赚钱的公式,只有适合的工具。

想通过一个什么包赚钱的价格几万的公式来稳赚不赔,那股市就没有输家了。

如果有缘份的话,本文最后将推出缠师最终没有告知大家的力度公式部分。

真正得缠者,为见相非相,即见如来。

通达信版公式,因为定义不了全局变量、数组,以及没有循环语句等功能,相比大智慧在公式编程方面差了不少。

但通达信的优势还是有的,在此推出一个通达信非DLL 版本的缠论分笔公式,并在后续的文章中逐步讲解如何通过程序,将缠论转化公式。

如果缠友仅想得到一公式而已,那就也无所谓细读本文。

但凡得道,靠的是觉悟和缘份,在此也就不细说了。

初学缠论的朋友也可以参考一些网站或专门的书籍,对阅读本文会有较大的帮助。

一、分形。

缠论集道氏、波浪、江恩学派于一体,结合浑沌理论,将K线形态以分形的方式进行规划,并以一套规则定义波浪起始点,以中枢的形式表达三角形调整(旗形、契形、钻石等形态,均是三角形形态的变种),以背驰的理论表述力度的衰竭。

理论指导实战,行之有效。

分形分二种,一是顶分型,另一是底分型。

分型也可以看成是酒田的三山形态,即中间K线高低点均高于二侧的,为顶分型,均低于二侧的,为底分形。

当一根K线高低点均在前一根K线价格之类,或者前一根K线高低点均在本根K线价格之类,称为包含关系。

在程序处理上,被前一根K线包含的,因为不可能作为分形的顶、底点,所以我们可以不进行处理。

如果是后一种包含关系,则观察前一根K线处于什么分形关态,如果前一根是顶分形,则本根向上取值,作为顶分形处理,反之则向下处理为底分形。

但这里有一个特殊情况,在不成笔的情况下,如果这根K线的前一分形状态为低分形,但本K线高点却已经超出了前一个顶分形的顶点,应将这根K线作为顶分形处理,反之亦然。

【炒股必下载的公式】通达信顶底分型线段缠论主图指标公式

【炒股必下载的公式】通达信顶底分型线段缠论主图指标公式

通达信顶底分型线段缠论主图指标公式局部低点预选A:=BACKSET(LLV(L,5)<REF(LLV(L,4),1),4);局部低点预选B:=BACKSET(局部低点预选A=0 AND REF(局部低点预选A,1)=1,2);局部低点预选C:=IF(局部低点预选B=1 AND REF(局部低点预选B,1)=0,-1,0);局部高点预选A:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4);局部高点预选B:=BACKSET(局部高点预选A=0 AND REF(局部高点预选A,1)=1,2);局部高点预选C:=IF(局部高点预选B=1 AND REF(局部高点预选B,1)=0,1,0);缺口判断:=IF(L>REF(H,1),1,IF(H<REF(L,1),-1,0));距前高天:=BARSLAST(局部高点预选C=1);距前低天:=BARSLAST(局部低点预选C=-1);小值周期:=LOWRANGE(L);大值周期:=TOPRANGE(H);低保留AA:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);低保留AB:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR LLV(L,距前低天+2)<REF(LLV(L,距前低天+1),1)),-1,0);低保留S:=IF((低保留AA=-1 OR 低保留AB=-1) AND L<REF(H,距前高天+1),-1,0);预判:=IF((距前低天<4 AND HHV(缺口判断,距前低天)!=1) OR REF(低保留S,距前低天)=0,1,0);判断:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND 预判=1 AND 大值周期>REF(小值周期,距前低天+1) AND 大值周期>REF(小值周期,距前低天) AND 大值周期>REF(大值周期,距前高天),1,0);高保留A:=IF(局部高点预选C=1 AND REF(距前低天,1)>REF(距前高天,1) AND HHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0);高保留B:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND REF(低保留S,距前低天)=-1 AND (距前低天>=4 OR HHV(缺口判断,距前低天)=1),1,0);高保留:=IF((高保留A=1 OR 高保留B=1 OR 判断=1) AND H>REF(L,距前低天+1),1,0);预判A:=IF((距前高天<4 AND HHV(缺口判断,距前高天)!=1) OR REF(高保留,距前高天)=0,1,0);判断A:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND 预判A=1 AND 小值周期>REF(大值周期,距前高天+1) AND 小值周期>REF(大值周期,距前高天) AND 小值周期>REF(小值周期,距前低天),-1,0);低保留A:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);低保留B:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR 判断A=-1),-1,0);低保留:=IF((低保留A=-1 OR 低保留B=-1) AND L<REF(H,距前高天+1),-1,0);距前高天A:=BARSLAST(高保留=1);距前低天A:=BARSLAST(低保留=-1);预判X:=IF((距前低天A<4 AND HHV(缺口判断,距前低天A)!=1) OR REF(低保留,距前低天A)=0,1,0);判断X:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND 预判X=1 AND 大值周期>REF(小值周期,距前低天A+1) AND 大值周期>REF(小值周期,距前低天A) AND 大值周期>REF(大值周期,距前高天A),1,0);高保留XA:=IF(局部高点预选C=1 AND REF(距前低天A,1)>REF(距前高天A,1) AND HHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0);高保留XB:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND REF(低保留,距前低天A)=-1 AND (距前低天A>=4 OR HHV(缺口判断,距前低天A)=1),1,0); 高保留X:=IF((高保留XA=1 OR 高保留XB=1 OR 判断X=1) AND H>REF(L,距前低天A+1),1,0);预判XA:=IF((距前高天A<4 AND HHV(缺口判断,距前高天A)!=1) OR REF(高保留XA,距前高天A)=0,1,0);判断XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND 预判XA=1 AND 小值周期>REF(大值周期,距前高天A+1) AND 小值周期>REF(大值周期,距前高天A) AND 小值周期>REF(小值周期,距前低天A),-1,0);低保留XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)>REF(距前低天A,1) AND LLV(L,距前高天A+1)<REF(LLV(L,距前高天A+1),1),-1,0);低保留XB:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND (距前高天A>=4 OR LLV(缺口判断,距前高天A)=-1 OR 判断XA=-1),-1,0);低保留X:=IF((低保留XA=-1 OR 低保留XB=-1) AND L<REF(H,距前高天A+1),-1,0);距前高天YA:=BARSLAST(高保留X=1);距前低天YA:=BARSLAST(低保留X=-1);预判YX:=IF((距前低天YA<4 AND HHV(缺口判断,距前低天YA)!=1) OR REF(低保留X,距前低天YA)=0,1,0);判断YX:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND 预判YX=1 AND 大值周期>REF(小值周期,距前低天YA+1) AND 大值周期>REF(小值周期,距前低天YA) AND 大值周期>REF(大值周期,距前高天YA),1,0);高保留YXA:=IF(局部高点预选C=1 AND REF(距前低天YA,1)>REF(距前高天YA,1) AND HHV(H,距前低天YA+1)>REF(HHV(H,距前低天YA+1),1),1,0);高保留YXB:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND REF(低保留X,距前低天YA)=-1 AND (距前低天YA>=4 OR HHV(缺口判断,距前低天YA)=1),1,0);高保留YX:=IF((高保留YXA=1 OR 高保留YXB=1 OR 判断YX=1) AND H>REF(L,距前低天YA+1),1,0);预判YXA:=IF((距前高天YA<4 AND HHV(缺口判断,距前高天YA)!=1) OR REF(高保留YXA,距前高天YA)=0,1,0);判断YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND 预判YXA=1 AND 小值周期>REF(大值周期,距前高天YA+1) AND 小值周期>REF(大值周期,距前高天YA) AND 小值周期>REF(小值周期,距前低天YA),-1,0);低保留YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)>REF(距前低天YA,1) AND LLV(L,距前高天YA+1)<REF(LLV(L,距前高天YA+1),1),-1,0);低保留YXB:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND (距前高天YA>=4 OR LLV(缺口判断,距前高天YA)=-1 OR 判断YXA=-1),-1,0);低保留YX:=IF((低保留YXA=-1 OR 低保留YXB=-1) AND L<REF(H,距前高天YA+1),-1,0); AAAD:=IF(高保留YX=1 AND 低保留YX=-1 AND H>REF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1 AND 低保留YX=-1 AND L<REF(L,REF(距前低天YA,1)+2),-1,0));极点保留:=IF(AAAD=0,高保留YX+低保留YX,AAAD);局部极点:IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL)) CIRCLEDOT COLORYELLOW;DRAWLINE(极点保留=-1,局部极点,极点保留=1,局部极点,0)COLORBLUE;DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0)COLORBLUE;DRAWICON(极点保留=-1,L-0.03,1);DRAWICON(极点保留=1,H+0.03,2);。

通达信缠论自动划线指标源码

通达信缠论自动划线指标源码

通达信缠论自动划线指标源码```python#导入需要的库import numpy as np#定义缠论指标类class ChandelierIndicator:def __init__(self, highs, lows):self.highs = highsself.lows = lowsself.trend_lines = []#判断一个线段是否有效def is_valid_trend_line(self, line):if line[0] == line[1] == line[2] or line[0] == line[1] or line[1] == line[2]:return Falsereturn True#判断一个线段和笔的关系,用于判断是否需要连接线段def is_reversal(self, line, pen):if pen[0] < line[0] and pen[-1] > line[-1]: # 线段下降,笔上升return Trueelif pen[0] > line[0] and pen[-1] < line[-1]: # 线段上升,笔下降return Trueelse:return False#获取最近的一个线段和笔def get_last_trend_line_and_pen(self):if len(self.trend_lines) < 1:return None, Nonelast_trend_line = self.trend_lines[-1]last_pen = last_trend_line[-3:]return last_trend_line, last_pen#判断当前的最后一个线段是否有效def is_last_trend_line_valid(self):last_trend_line, last_pen = self.get_last_trend_line_and_pen if last_trend_line is None:return Falseif not self.is_valid_trend_line(last_trend_line) or not self.is_valid_trend_line(last_pen):return Falsereturn True#获得当前的趋势线def get_current_trend_line(self):last_trend_line, last_pen = self.get_last_trend_line_and_pen if not self.is_last_trend_line_valid(:return Noneif self.is_reversal(last_trend_line, last_pen):return Nonecurrent_trend_line = np.concatenate((last_trend_line[:-1], last_pen))return current_trend_line#更新缠论指标def update(self, high, low):if len(self.trend_lines) < 1:self.trend_lines.append([high, low, low])returncurrent_trend_line = self.get_current_trend_lineif current_trend_line is None:self.trend_lines.append([high, low, low])else:current_trend_line[2] = low```上述代码只是一个简单的示例,实际使用时可能还需要进行更多的优化和完善。

通达信缠论看盘指标代码完整版(主图叠加)

通达信缠论看盘指标代码完整版(主图叠加)

{缠论看盘指标}MA5:MA(CLOSE5) COLORWHITELINETHICK2;MA10:MA(CLOSE10) COLORMAGENTALINETHICK1;MA20:MA(CLOSE20) COLORBLUELINETHICK1;MA60:MA(CLOSE60) COLORYELLOWLINETHICK2;MA250:MA(CLOSE250) COLORREDLINETHICK1;老笔:=0;G:=MA(C5);D:=MA(C10);HH:=REF(H5)=HHV(H11);LL:=REF(L5)=LLV(L11);FG01:=BACKSET(HH6)>BACKSET(HH5) ;FD01:=BACKSET(LL6)>BACKSET(LL5) ;FG02:=IF(BARSLAST(FG01)=BARSLAST(FD01) AND G>DFG01IF(BARSLAST(FD01)>BARSLAST(FG01)FG010));FD02:=IF(BARSLAST(FG01)=BARSLAST(FD01) AND D>GFD01IF(BARSLAST(FG01)>BARSLAST(FD01)FD010));FG0:=FG02 AND H=HHV(HBARSLAST(FD02));FD0:=FD02 AND L=LLV(LBARSLAST(FG02));GP:IF(FG0HDRAWNULL)CIRCLEDOTCOLORCYAN;DP:IF(FD0LDRAWNULL)CIRCLEDOTCOLORCYAN;GQ:=L>REF(H1) AND DAY!=REF(DAY1);DQ:=H<REF(L1) AND DAY!=REF(DAY1);GQL:=REF(LBARSLAST(GQ));DQH:=REF(HBARSLAST(DQ));FGH:=REF(HBARSLAST(FG0));FGL:=REF(LBARSLAST(FG0));FGH1:=REF(HBARSLAST(FG0)+1);FGL1:=REF(LBARSLAST(FG0)+1);FGH2:=REF(HBARSLAST(FG0)+2);FGL2:=REF(LBARSLAST(FG0)+2);FDH:=REF(HBARSLAST(FD0));FDL:=REF(LBARSLAST(FD0));FDH1:=REF(HBARSLAST(FD0)+1);FDL1:=REF(LBARSLAST(FD0)+1);FDH2:=REF(HBARSLAST(FD0)+2);FDL2:=REF(LBARSLAST(FD0)+2);FGZH:=IF(FGL<=FGL1FGH2FGH1);FGZL:=IF(FGH1<FGLFGLIF(FGL<=FGL1FGL2FGL1));FDZH:=IF(FDL1>FDHFDHIF(FDH>=FDH1FDH2FDH1));FDZL:=IF(FDH>=FDH1FDL2FDL1);FG1:=FGH>FDZH AND FG0;FD1:=FDL<FGZL AND FD0;FG:=FG1 AND FGH>FDH AND FGL>FDL AND FGL1>FDL;FD:=FD1 AND FDL<FGL AND FDH<FGH AND FDH1<FGH;BH0:=(H<=REF(H1) AND L>=REF(L1)) OR (H>=REF(H1) AND L<=REF(L1)); BHG:=COUNT(BH0BARSLAST(FD0));BHD:=COUNT(BH0BARSLAST(FG0));BGQ:=COUNT(GQBARSLAST(FD0));BDQ:=COUNT(DQBARSLAST(FG0));BK0:=IF(BHG>0BHG+2+老笔IF(BHDBHD+2+老笔3));BK:=IF(BGQBK0-BGQIF(BDQBK0-BDQBK0));G1X:=(FG AND BARSLAST(FD)>BK);D1X:=(FD AND BARSLAST(FG)>BK);G1:=(FG0 AND REF(HBARSLAST(FG0))>=REF(HBARSLAST(G1X)) ANDBARSLAST(D1X)>BARSLAST(G1X))OR (FG1 AND COUNT(GQBARSLAST(FD1))>0 ANDREF(HBARSLAST(FG1))>REF(HBARSLAST(G1X)));D1:=(FD0 AND REF(LBARSLAST(FD0))<=REF(LBARSLAST(D1X)) ANDBARSLAST(G1X)>BARSLAST(D1X))OR (FD1 AND COUNT(DQBARSLAST(FG1))>0 ANDREF(LBARSLAST(FD1))<REF(HBARSLAST(D1X)));G1H:=IF(BARSLAST(D1)>BARSLAST(G1)REF(HBARSLAST(G1))REF(HBARSLAST(D1)));D1L:=IF(BARSLAST(G1)>BARSLAST(D1)REF(LBARSLAST(D1))REF(LBARSLAST(G1)));G2:=G1 AND H=HHV(G1HBARSLAST(D1)+1) AND H>REF(H1) ANDBARSLAST(D1)>BARSLAST(G1);D2:=D1 AND L=LLV(D1LBARSLAST(G1)+1) AND L<REF(L1) ANDBARSLAST(G1)>BARSLAST(D1);G3:=G2 OR (FG0 AND REF(HBARSLAST(FG0))>REF(HBARSLAST(G2)) ANDBARSLAST(D2)>BARSLAST(G2));D3:=D2 OR (FD0 AND REF(LBARSLAST(FD0))<REF(LBARSLAST(D2)) ANDBARSLAST(G2)>BARSLAST(D2));GPB:IF(G1XHDRAWNULL)CIRCLEDOTCOLORYELLOW;DPB:IF(D1XLDRAWNULL)CIRCLEDOTCOLORYELLOW;DRAWICON(CROSS(MA20MA60)MA60*0.989);DIF:=MA(CLOSE5)-MA(CLOSE89);DIFMA:=MA(DIF36);XG:=CROSS(DIFDIFMA) AND DIF<3;{DRAWICON(XGH*1.0323);}{画线}NN:=G3;UU:=D3;L1:DRAWLINE(UULNN H0)COLORLIGREEN;L2:DRAWLINE(NNHUU L0)COLORLIGREEN; {标示端点数值}DRAWNUMBER(L1 AND L2 AND NN HH)COLORLIRED;DRAWNUMBER(L1 AND L2 AND UU LL)COLORLIMAGENTA;{折扣价}{DRAWICON(CURRBARSCOUNT=6LOW*0.9824);}DRAWNUMBER(CURRBARSCOUNT=6LOW*0.96C);{DRAWICON(CURRBARSCOUNT=11LOW*0.9825);}DRAWNUMBER(CURRBARSCOUNT=11LOW*0.96C);{DRAWICON(CURRBARSCOUNT=21LOW*0.9826);}DRAWNUMBER(CURRBARSCOUNT=21LOW*0.96C);{DRAWICON(CURRBARSCOUNT=61LOW*0.9827);}DRAWNUMBER(CURRBARSCOUNT=61LOW*0.96C);{DRAWICON(CURRBARSCOUNT=121LOW*0.9818);}DRAWNUMBER(CURRBARSCOUNT=121LOW*0.96C);{量能平台}N250:=250;PT250:=CONST(HHVBARS(VN250));{T250:IF(CURRBARSCOUNT<=N250CONST(IF(PT250=0CREF(CPT250)))DRAWNULL)COL OR990000;}{IF(CURRBARSCOUNT=PT250+1T250DRAWNULL)CIRCLEDOTCOLORFF0000LINETHICK 2;}{DRAWTEXT(CURRBARSCOUNT=N250T250'250')COLOR990000;}N120:=120;PT120:=CONST(HHVBARS(VN120));{T120:IF(CURRBARSCOUNT<=N120CONST(IF(PT120=0CREF(CPT120)))DRAWNULL)COL ORAAAA00;}{IF(CURRBARSCOUNT=PT120+1T120DRAWNULL)CIRCLEDOTCOLORFFFF00LINETHIC K2;}{DRAWTEXT(CURRBARSCOUNT=N120T120'120')COLORAAAA00;}N60:=60;PT60:=CONST(HHVBARS(VN60));{T60:IF(CURRBARSCOUNT<=N60CONST(IF(PT60=0CREF(CPT60)))DRAWNULL)COLOR00 BB00;}{IF(CURRBARSCOUNT=PT60+1T60DRAWNULL)CIRCLEDOTCOLOR00FF00LINETHICK2;} {DRAWTEXT(CURRBARSCOUNT=N60T60'60')COLOR00BB00;}N30:=30;PT30:=CONST(HHVBARS(VN30));{T30:IF(CURRBARSCOUNT<=N30CONST(IF(PT30=0CREF(CPT30)))DRAWNULL)COLOR00 00CC;}{IF(CURRBARSCOUNT=PT30+1T30DRAWNULL)CIRCLEDOTCOLOR0000FFLINETHICK2;} {DRAWTEXT(CURRBARSCOUNT=N30T30'30')COLOR0000CC;}N20:=20;PT20:=CONST(HHVBARS(VN20));{T20:IF(CURRBARSCOUNT<=N20CONST(IF(PT20=0CREF(CPT20)))DRAWNULL)COLORD D00DD;}{IF(CURRBARSCOUNT=PT20+1T20DRAWNULL)CIRCLEDOTCOLORFF00FFLINETHICK2;} {DRAWTEXT(CURRBARSCOUNT=N20T20'20')COLORDD00DD;}N10:=10;PT10:=CONST(HHVBARS(VN10));{T10:IF(CURRBARSCOUNT<=N10CONST(IF(PT10=0CREF(CPT10)))DRAWNULL)COLOR00 EEEE;}{IF(CURRBARSCOUNT=PT10+1T10DRAWNULL)CIRCLEDOTCOLOR00FFFFLINETHICK2;} {DRAWTEXT(CURRBARSCOUNT=N10T10'10')COLOR00EEEE;}N5:=5;PT5:=CONST(HHVBARS(VN5));{T5:IF(CURRBARSCOUNT<=N5CONST(IF(PT5=0CREF(CPT5)))DRAWNULL)COLORFFFFF F;}{IF(CURRBARSCOUNT=PT5+1T5DRAWNULL)CIRCLEDOTCOLORFFFFFFLINETHICK2;} {DRAWTEXT(CURRBARSCOUNT=N5T5'5')COLORFFFFFF;}ND:=10;PTD:=CONST(LLVBARS(VND));TDPX:IF(CURRBARSCOUNT<=NDCONST(IF(PTD=0OREF(OPTD)))DRAWNULL) COLOR9370DB;IF(CURRBARSCOUNT=PTD+1TDPXDRAWNULL)CIRCLEDOTCOLOR9370DBLINETHICK2;。

通达信缠论中枢指标公式、分型选股指标公式,纯经验分享!

通达信缠论中枢指标公式、分型选股指标公式,纯经验分享!

通达信缠论中枢指标公式、分型选股指标公式,纯经验分享!第一、通达信缠论中枢指标公式这个是格力电器的周线走势图,里面的中枢走势图都是画好的,很明显可以看出是那个级别,至于操作的话还是要根据自身的操作理念去使用了,我自己做三买的位置,出中枢一笔吧。

局部低点预选A:=BACKSET(LLV(L,5)<>局部低点预选B:=BACKSET(局部低点预选A=0 AND REF(局部低点预选A,1)=1,2);局部低点预选C:=IF(局部低点预选B=1 AND REF(局部低点预选B,1)=0,-1,0);局部高点预选A:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4);局部高点预选B:=BACKSET(局部高点预选A=0 AND REF(局部高点预选A,1)=1,2);局部高点预选C:=IF(局部高点预选B=1 AND REF(局部高点预选B,1)=0,1,0);缺口判断:=IF(L>REF(H,1),1,IF(H<>距前高天:=BARSLAST(局部高点预选C=1);距前低天:=BARSLAST(局部低点预选C=-1);小值周期:=LOWRANGE(L);大值周期:=TOPRANGE(H);低保留AA:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<>低保留AB:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=ref(距前低天,1) and="" (距前高天="">=4 OR LLV(缺口判断,距前高天)=-1 OR LLV(L,距前低天+2)<>低保留S:=IF((低保留AA=-1 OR 低保留AB=-1) AND L<>预判:=IF((距前低天<4 and="" hhv(缺口判断,距前低天)!="1)" or="" ref(低保留s,距前低天)="">4>判断:=IF(局部高点预选C=1 AND REF(距前低天,1)<=ref(距前高天,1) and="" 预判="1" and="" 大值周期="">REF(小值周期,距前低天+1) AND 大值周期>REF(小值周期,距前低天) AND 大值周期>REF(大值周期,距前高天),1,0);高保留A:=IF(局部高点预选C=1 AND REF(距前低天,1)>REF(距前高天,1) AND HHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0);高保留B:=IF(局部高点预选C=1 AND REF(距前低天,1)<=ref(距前高天,1) and="" ref(低保留s,距前低天)="-1" and="" (距前低天="">=4 OR HHV(缺口判断,距前低天)=1),1,0);高保留:=IF((高保留A=1 OR 高保留B=1 OR 判断=1) AND H>REF(L,距前低天+1),1,0);预判A:=IF((距前高天<4 and="" hhv(缺口判断,距前高天)!="1)" or="" ref(高保留,距前高天)="">4>判断A:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=ref(距前低天,1) and="" 预判a="1"and="" 小值周期="">REF(大值周期,距前高天+1) AND 小值周期>REF(大值周期,距前高天) AND小值周期>REF(小值周期,距前低天),-1,0);低保留A:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<>低保留B:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=ref(距前低天,1) and="" (距前高天="">=4 OR LLV(缺口判断,距前高天)=-1 OR 判断A=-1),-1,0);低保留:=IF((低保留A=-1 OR 低保留B=-1) AND L<>距前高天A:=BARSLAST(高保留=1);距前低天A:=BARSLAST(低保留=-1);预判X:=IF((距前低天A<4 and="" hhv(缺口判断,距前低天a)!="1)" or="" ref(低保留,距前低天a)="">4>判断X:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=ref(距前高天a,1) and="" 预判x="1"and="" 大值周期="">REF(小值周期,距前低天A+1) AND 大值周期>REF(小值周期,距前低天A) AND 大值周期>REF(大值周期,距前高天A),1,0);高保留XA:=IF(局部高点预选C=1 AND REF(距前低天A,1)>REF(距前高天A,1) AND HHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0);高保留XB:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=ref(距前高天a,1) and="" ref(低保留,距前低天a)="-1" and="" (距前低天a="">=4 OR HHV(缺口判断,距前低天A)=1),1,0);高保留X:=IF((高保留XA=1 OR 高保留XB=1 OR 判断X=1) AND H>REF(L,距前低天A+1),1,0);预判XA:=IF((距前高天A<4 and="" hhv(缺口判断,距前高天a)!="1)" or="" ref(高保留xa,距前高天a)="">4>判断XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=ref(距前低天a,1) and="" 预判xa="1" and="" 小值周期="">REF(大值周期,距前高天A+1) AND 小值周期>REF(大值周期,距前高天A) AND 小值周期>REF(小值周期,距前低天A),-1,0);低保留XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)>REF(距前低天A,1) AND LLV(L,距前高天A+1)<>低保留XB:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=ref(距前低天a,1) and="" (距前高天a="">=4 OR LLV(缺口判断,距前高天A)=-1 OR 判断XA=-1),-1,0);低保留X:=IF((低保留XA=-1 OR 低保留XB=-1) AND L<>距前高天YA:=BARSLAST(高保留X=1);距前低天YA:=BARSLAST(低保留X=-1);预判YX:=IF((距前低天YA<4 and="" hhv(缺口判断,距前低天ya)!="1)" or="" ref(低保留x,距前低天ya)="">4>判断YX:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=ref(距前高天ya,1) and="" 预判yx="1" and="" 大值周期="">REF(小值周期,距前低天YA+1) AND 大值周期>REF(小值周期,距前低天YA) AND 大值周期>REF(大值周期,距前高天YA),1,0);高保留YXA:=IF(局部高点预选C=1 AND REF(距前低天YA,1)>REF(距前高天YA,1) AND HHV(H,距前低天YA+1)>REF(HHV(H,距前低天YA+1),1),1,0);高保留YXB:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=ref(距前高天ya,1) and="" ref(低保留x,距前低天ya)="-1" and="" (距前低天ya="">=4 OR HHV(缺口判断,距前低天YA)=1),1,0);高保留YX:=IF((高保留YXA=1 OR 高保留YXB=1 OR 判断YX=1) AND H>REF(L,距前低天YA+1),1,0);预判YXA:=IF((距前高天YA<4 and="" hhv(缺口判断,距前高天ya)!="1)" or="" ref(高保留yxa,距前高天ya)="">4>判断YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=ref(距前低天ya,1) and="" 预判yxa="1" and="" 小值周期="">REF(大值周期,距前高天YA+1) AND 小值周期>REF(大值周期,距前高天YA) AND 小值周期>REF(小值周期,距前低天YA),-1,0);低保留YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)>REF(距前低天YA,1) AND LLV(L,距前高天YA+1)<>低保留YXB:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=ref(距前低天ya,1) and="" (距前高天ya="">=4 OR LLV(缺口判断,距前高天YA)=-1 OR 判断YXA=-1),-1,0);低保留YX:=IF((低保留YXA=-1 OR 低保留YXB=-1) AND L<>AAAD:=IF(高保留YX=1 AND 低保留YX=-1 AND H>REF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1 AND 低保留YX=-1 AND L<>极点保留:=IF(AAAD=0,高保留YX+低保留YX,AAAD);局部极点:IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL)) CIRCLEDOT COLORYELLOW;DRAWLINE(极点保留=-1,局部极点,极点保留=1,局部极点,0)COLORBLUE;DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0)COLORBLUE;DRAWICON(极点保留=-1,L-0.03,1);DRAWICON(极点保留=1,H+0.03,2);HH0:=CONST(HHV(H,120))*1;LL0:=CONST(LLV(L,120))*1;MM0:=CONST((HH0+LL0)/2);HH1:=IF(CONST(C)<>LL1:=LL0;HLMAX:=MAX(HH1,LL1);HLMIN:=MIN(HH1,LL1);HLMN1:=(HLMAX+HLMIN)/2;HLMN2:=(HLMAX-HLMIN);HLMN3:=HHV(V,250)/2;HLMN4:=HHV(V,250);VZ:=(V-HLMN3)*HLMN2/HLMN4+HLMN1;预测量:IF(CURRBARSCOUNT=1 ANDPERIOD=5,VOL*240/FROMOPEN,VOL),COLOR990000,NODRAW;STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,(0-HLMN3)*HLMN2/HLMN4+HLMN1,(预测量-HLMN3)*HLMN2/HLMN4+HLMN1,2,-1),COLORLIGRAY;STICKLINE(C>=O,VZ,(0-HLMN3)*HLMN2/HLMN4+HLMN1,1,1),COLOR000099;STICKLINE(C{(MA(V,5)-HLMN3)*HLMN2/HLMN4+HLMN1,COLORFFFFFF;(MA(V,10)-HLMN3)*HLMN2/HLMN4+HLMN1,COLOR00FFFF;};第二、通达信缠论分型选股指标公式缠论中很重要的也就是顶底分型了,这个很清楚的能标记出顶底分型的位置,方便大家参考。

缠论中枢通达信指标公式源码.doc

缠论中枢通达信指标公式源码.doc

缠论中枢通达信指标公式源码.doc缠论中枢通达信指标公式源码局部低点预选A:=BACKSET(LLV(L,5)REF(HHV(H,4),1),4);局部高点预选B:=BACKSET(局部高点预选A=0ANDREF(局部高点预选A,1)=1,2);局部高点预选C:=IF(局部高点预选B=1ANDREF(局部高点预选B,1)=0,1,0);缺口判断:=IF(L>REF(H,1),1,IF(HREF(距前低天,1)ANDLLV(L,距前高天+1)REF(小值周期,距前低天)AND大值周期>REF(大值周期,距前高天),1,0);高保留A:=IF(局部高点预选C=1ANDREF(距前低天,1)>REF(距前高天,1)ANDHHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0);高保留B:=IF(局部高点预选C=1ANDREF(距前低天,1)=4ORHHV(缺口判断,距前低天)=1),1,0);高保留:=IF((高保留A=1OR高保留B=1OR判断=1)ANDH>REF(L,距前低天+1),1,0);预判A:=IF((距前高天REF(大值周期,距前高天)AND小值周期>REF(小值周期,距前低天),-1,0);低保留A:=IF(局部低点预选C=-1ANDREF(距前高天,1)>REF(距前低天,1)ANDLLV(L,距前高天+1)REF(小值周期,距前低天A)AND大值周期>REF(大值周期,距前高天A),1,0);高保留XA:=IF(局部高点预选C=1ANDREF(距前低天A,1)>REF(距前高天A,1)ANDHHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0);高保留XB:=IF(局部高点预选C=1ANDREF(距前低天A,1)=4ORHHV(缺口判断,距前低天A)=1),1,0);高保留X:=IF((高保留XA=1OR高保留XB=1OR判断X=1)ANDH>REF(L,距前低天A+1),1,0);预判。

通达信缠论、笔、分型指标公式

通达信缠论、笔、分型指标公式

通达信缠论、笔、分型指标公式KX:='CHANLUN@KXIAN';KXG:='CHANLUN@KXG';KXD:='CHANLUN@KXD';KXFX:='CHANLUN@KXFX';笔:='CHANLUN@BI';BILAST:='CHANLUN@BILAST';段:='CHANLUN@DUAN';DUANLAST:='CHANLUN@DUANLAST';中枢:='CHANLUN@ZS';ZSZG:='CHANLUN@ZSZG';ZSZD:='CHANLUN@ZSZD';ZSGG:='CHANLUN@ZSGG';ZSDD:='CHANLUN@ZSDD';ZSZZ:='CHANLUN@ZSZZ';ZSKS:='CHANLUN@ZSKSLAST';ZSJS:='CHANLUN@ZSJSLAST';BIFX:=-REF(笔,BILAST);DUANFX:=-REF(段,DUANLAST);KXQJ:='CHANLUN@KXQJ';STICKLINE(ZSZG>ZSZD AND DUANFX=1, ZSZG, ZSZD, 10, 1),COLOR8E236B;STICKLINE(ZSZG>ZSZD AND DUANFX=-1, ZSZG, ZSZD, 10, 1), COLOR007700;DRAWLINE(ZSKS=1, ZSZZ, ZSJS=1, ZSZZ, 0), COLORFFFFFF;STICKLINE(KX>0, KXG, KXD, 5, 1),COLOR007700,LINETHICK2;STICKLINE(KX<0, KXG, KXD, 5, 1),COLOR00FFFF,LINETHICK2;STICKLINE(笔=1, KXG, KXD, 5, 1), colorgreen, LINETHICK2;STICKLINE(笔=-1, KXG, KXD, 5, 1), colorred, LINETHICK2;STICKLINE(段=1, KXG, KXD, 5, 0), COLOR007700, LINETHICK2;STICKLINE(段=-1, KXG, KXD, 5, 0), COLOR0000CC, LINETHICK2;DRAWLINE(笔=1,H,笔=-1,L,0),colorblue,LINETHICK2;DRAWLINE(笔=-1,L,笔=1,H,0),COLORFF00FF ,LINETHICK2;DRAWLINE(段=1,H,段=-1,L,0),COLOR007700, LINETHICK2;DRAWLINE(段=-1,L,段=1,H,0),colorred, LINETHICK2;DRAWTEXT(笔= 1, H*1.038, ''+H+''), COLORFFFFFF;DRAWTEXT(笔=-1, L*0.96, ''+L+''), COLORFFFFFF;VAR3:=LLV(H,240);VAR4:=100*(C-VAR3)/VAR3;VAR5:=(C-LLV(L,528))/(HHV(H,528)-LLV(L,528))*100;VAR6:=(C-LLV(C,530))/(HHV(C,530)-LLV(C,530))*100;VAR7:=0;VAR8:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)*100;VAR9:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)*100;VAR10:=IF(TROUGHBARS(3,16,1)=0 AND H>L+0.04,4,0);VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);VAR12:=ZIG(3,6)<REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)>=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);VAR13:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);VAR14:=ZIG(3,22)<REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)>=REF(ZIG(3,22),2) ANDREF(ZIG(3,22),2)>=REF(ZIG(3,22),3);VAR15:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3);VAR16:=ZIG(3,51)<REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)>=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);VAR17:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);VAR18:=ZIG(3,72)<REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)>=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);VAR19:=EMA(C,2)-EMA(C,150);买1:=VAR10;买2:=(VAR11+VAR13+VAR15+VAR17);卖1:=(VAR12+VAR14+VAR16+VAR18);DRAWTEXT(买1>0 OR 买2>0,L*0.985,'买'),COLOR00FFFF;DRAWTEXT(卖1>0,H*1.01,'卖'),COLOR00FFFF;APP:=(VOL)/((H-L)*(2)-ABS(C-O));ZL:=IF((H>O),(APP)*(H-L),IF((L<O),(APP)*(H-O+C-L),(VOL)/(2)));SF:=IF((H>O),0-(APP)*(H-C+O-L),IF((L<O),0-(APP)*(H-L),0-(VOL)/(2)));库存能量:=MA(ZL+SF,2);库存平均:=MA(ZL+SF,5);GET:ZIG(3,5),coloryellow,LINETHICK3;PL5:=ZIG(3,5);EN1:=PL5>REF(PL5,1) AND REF(PL5,1)<=REF(PL5,2) AND REF(PL5,2)<=REF(PL5,3);EX1:=PL5<REF(PL5,1) AND REF(PL5,1)>=REF(PL5,2) AND REF(PL5,2)>=REF(PL5,3);PL10:=ZIG(3,10);EN2:=PL10>REF(PL10,1) AND REF(PL10,1)<=REF(PL10,2) AND REF(PL10,2)<=REF(PL10,3);EX2:=PL10<REF(PL10,1) AND REF(PL10,1)>=REF(PL10,2) AND REF(PL10,2)>=REF(PL10,3);PL20:=ZIG(3,20);EN3:=PL20>REF(PL20,1) AND REF(PL20,1)<=REF(PL20,2) AND REF(PL20,2)<=REF(PL20,3);EX3:=PL20<REF(PL20,1) AND REF(PL20,1)>=REF(PL20,2) AND REF(PL20,2)>=REF(PL20,3);走强1:=BARSLAST(PL5<REF(PL5,1));走弱1:=BARSLAST(PL5>REF(PL5,1));走强2:=BARSLAST(PL10<REF(PL10,1));走弱2:=BARSLAST(PL10>REF(PL10,1));走强3:=BARSLAST(PL20<REF(PL20,1));走弱3:=BARSLAST(PL20>REF(PL20,1));ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强2),0);ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强2),0);DTJZ5:=IF(PL10<REF(PL10,1),COUNT(EN1,走弱2),0);DTJD5:=IF(PL10<REF(PL10,1),COUNT(EX1,走弱2),0);ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走强3),0);ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强3),0);DTJZ10:=IF(PL20<REF(PL20,1),COUNT(EN2,走弱3),0);DTJD10:=IF(PL20<REF(PL20,1),COUNT(EX2,走弱3),0);DRAWTEXT(EN2 AND DTJZ10=1,L*0.93,'[类二买]'),COLORFFFFFF;DRAWTEXT(EN3 AND ZTJZ10=1,L*0.95,'[一买]'),COLORFF00FF;DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,H*1.05,'[二卖]'),LINETHICK2,COLORFFFF00;DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2,L*0.95,'[二买]'),LINETHICK2,COLORFFFF00;DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2) AND EX2,H*1.04,'[一卖]'),LINETHICK3,COLOR00FF00;MA5:MA(CLOSE,5),colorwhite,LINETHICK1;MA10:MA(CLOSE,10),colorgreen,LINETHICK1;MA24:MA(CLOSE,24),colorred,LINETHICK1;趋势:ZIG(3,5);向上:=CROSS(趋势,REF(趋势,1));向下:=CROSS(REF(趋势,1),趋势);上1周期:=SUMBARS(向上,1);上2周期:=SUMBARS(向上,2);上3周期:=SUMBARS(向上,3);下1周期:=SUMBARS(向下,1);下2周期:=SUMBARS(向下,2);下3周期:=SUMBARS(向下,3);A1:=REF(趋势,下1周期);A2:=REF(趋势,下2周期);高点重叠:=MIN(A1,A2);低点重叠:=MAX(REF(趋势,上1周期),REF(趋势,上2周期));高点:=(趋势=高点重叠);连线1:=BARSLAST(高点)>上1周期 OR BARSLAST(高点)>下1周期;连线2:=BARSLAST(高点)<上2周期 OR BARSLAST(高点)<下2周期;低点:=(趋势=低点重叠);高1:=SUMBARS(高点,1);高2:=SUMBARS(高点,2);低1:=SUMBARS(低点,1);低2:=SUMBARS(低点,2);DRAWTEXT(C,高点重叠,'_____'); DRAWTEXT(C,低点重叠,'_____');通达信缠论、笔、分型指标公式的选股公式如下:。

缠论指标可以画中枢同级别分解通达信指标公式源码

缠论指标可以画中枢同级别分解通达信指标公式源码

缠论指标~~~可以画中枢~~同级别分解kx:="chanlun@kxian";kxg:="chanlun@kxg";kxd:="chanlun@kxd";kxfx:="chanlun@kxfx";笔:="chanlun@bi";笔周期:"chanlun@bilast",linethick0, colorff00ff;bilast:="chanlun@bilast";{笔周期};段:="chanlun@duan";段周期:"chanlun@duanlast", linethick0, colorFFffFF;duanlast:="chanlun@duanlast"; {段周期};中枢:="chanlun@zs";zszg:="chanlun@zszg";zszd:="chanlun@zszd";zsgg:="chanlun@zsgg";zsdd:="chanlun@zsdd";zszz:="chanlun@zszz";zsks:="chanlun@zskslast";zsjs:="chanlun@zsjslast";bifx:=-REF(笔,bilast);duanfx:=-REF(段,duanlast);kxqj:="chanlun@kxqj";{画中枢Begin} {以背景方式画}STICKLINE(zszg>zszd AND duanfx=1, zszg, zszd, 10, 1),Color8E236B; STICKLINE(zszg>zszd AND duanfx=-1, zszg, zszd, 10, 1), Color007700; {中枢震荡监视器}DRAWLINE(zsks=1, zszz, zsjs=1, zszz, 0), colorFFFFFF;{画中枢END}{顶底分型}STICKLINE(kx>0, kxg, kxd, 5, 1),Color007700,linethick2; STICKLINE(kx<0, kxg, kxd, 5, 1),Color00ffff,linethick2;{笔段}STICKLINE(笔=1, kxg, kxd, 5, 1), colorgreen, linethick2; STICKLINE(笔=-1, kxg, kxd, 5, 1), colorred, linethick2;STICKLINE(段=1, kxg, kxd, 5, 0), color007700, linethick2; STICKLINE(段=-1, kxg, kxd, 5, 0), color0000cc, linethick2;{画K线END}{画笔段}drawline(笔=1,h,笔=-1,l,0),colorBLUE,linethick2;drawline(笔=-1,l,笔=1,h,0),ColorFF00FF ,linethick2;drawline(段=1,h,段=-1,l,0),color007700, linethick2;drawline(段=-1,l,段=1,h,0),colorRED, linethick2;{笔高低点周期力度提示}DRAWTEXT(笔= 1, h*1.038, ''+h+''), colorffffff, align1, valign1;DRAWTEXT(笔=-1, L*0.96, ''+l+''), colorFFffFF, align1, valign1;VAR3:=LLV(H,240);VAR4:=100*(C-VAR3)/VAR3;VAR5:=(C-LLV(L,528))/(HHV(H,528)-LLV(L,528))*100;VAR6:=(C-LLV(C,530))/(HHV(C,530)-LLV(C,530))*100;VAR7:=0;VAR8:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/SMA(ABS(CLOSE-REF(CLOSE ,1)),7,1)*100;VAR9:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE ,1)),13,1)*100;VAR10:=IF(TROUGHBARS(3,16,1)=0 AND H>L+0.04,4,0);VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);VAR12:=ZIG(3,6)<REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)>=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);VAR13:=ZIG(3,22)>REF(ZIG(3,22),1) ANDREF(ZIG(3,22),1)<=REF(ZIG(3,22),2) ANDREF(ZIG(3,22),2)<=REF(ZIG(3,22),3);VAR14:=ZIG(3,22)<REF(ZIG(3,22),1) ANDREF(ZIG(3,22),1)>=REF(ZIG(3,22),2) ANDREF(ZIG(3,22),2)>=REF(ZIG(3,22),3);VAR15:=ZIG(3,51)>REF(ZIG(3,51),1) ANDREF(ZIG(3,51),1)<=REF(ZIG(3,51),2) ANDREF(ZIG(3,51),2)<=REF(ZIG(3,51),3);VAR16:=ZIG(3,51)<REF(ZIG(3,51),1) ANDREF(ZIG(3,51),1)>=REF(ZIG(3,51),2) ANDREF(ZIG(3,51),2)>=REF(ZIG(3,51),3);VAR17:=ZIG(3,72)>REF(ZIG(3,72),1) ANDREF(ZIG(3,72),1)<=REF(ZIG(3,72),2) ANDREF(ZIG(3,72),2)<=REF(ZIG(3,72),3);VAR18:=ZIG(3,72)<REF(ZIG(3,72),1) ANDREF(ZIG(3,72),1)>=REF(ZIG(3,72),2) ANDREF(ZIG(3,72),2)>=REF(ZIG(3,72),3);VAR19:=EMA(C,2)-EMA(C,150);买1:=VAR10;买2:=(VAR11+VAR13+VAR15+VAR17);卖1:=(VAR12+VAR14+VAR16+VAR18);DRAWTEXT(买1>0 OR 买2>0,L*0.985,'买'),COLOR00ffff;DRAWTEXT(卖1>0,H*1.01,'卖'),COLOR00ffff;APP:=(VOL)/((H-L)*(2)-ABS(C-O));ZL:=IF((H>O),(APP)*(H-L),IF((L<O),(APP)*(H-O+C-L),(VOL)/(2)));SF:=IF((H>O),0-(APP)*(H-C+O-L),IF((L<O),0-(APP)*(H-L),0-(VOL)/(2)));库存能量:=MA(ZL+SF,2);库存平均:=MA(ZL+SF,5);GET:ZIG(3,5),COLORYELLOW,LINETHICK3;PL5:=ZIG(3,5);EN1:=PL5>REF(PL5,1) AND REF(PL5,1)<=REF(PL5,2) ANDREF(PL5,2)<=REF(PL5,3);EX1:=PL5<REF(PL5,1) AND REF(PL5,1)>=REF(PL5,2) ANDREF(PL5,2)>=REF(PL5,3);PL10:=ZIG(3,10);EN2:=PL10>REF(PL10,1) AND REF(PL10,1)<=REF(PL10,2) ANDREF(PL10,2)<=REF(PL10,3);EX2:=PL10<REF(PL10,1) AND REF(PL10,1)>=REF(PL10,2) ANDREF(PL10,2)>=REF(PL10,3);PL20:=ZIG(3,20);EN3:=PL20>REF(PL20,1) AND REF(PL20,1)<=REF(PL20,2) ANDREF(PL20,2)<=REF(PL20,3);EX3:=PL20<REF(PL20,1) AND REF(PL20,1)>=REF(PL20,2) ANDREF(PL20,2)>=REF(PL20,3);走强1:=BARSLAST(PL5<REF(PL5,1));走弱1:=BARSLAST(PL5>REF(PL5,1));走强2:=BARSLAST(PL10<REF(PL10,1));走弱2:=BARSLAST(PL10>REF(PL10,1));走强3:=BARSLAST(PL20<REF(PL20,1));走弱3:=BARSLAST(PL20>REF(PL20,1));ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强2),0);ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强2),0);DTJZ5:=IF(PL10<REF(PL10,1),COUNT(EN1,走弱2),0);DTJD5:=IF(PL10<REF(PL10,1),COUNT(EX1,走弱2),0);ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走强3),0);ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强3),0);DTJZ10:=IF(PL20<REF(PL20,1),COUNT(EN2,走弱3),0);DTJD10:=IF(PL20<REF(PL20,1),COUNT(EX2,走弱3),0);DRAWTEXT(EN2 AND DTJZ10=1,L*0.96,'[类二买]'),COLORFFffFF; DRAWTEXT(EN3 AND ZTJZ10=1,L*0.95,'[一买]'),COLORFF00ff; DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,H*1.04,'[二卖]'),LINETHICK2,COLORFFff00;DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2,L*0.94,'[二买]'),LINETHICK2,COLORFFFF00;DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2) AND EX2,H*1.03,'[一卖]'),LINETHICK3,COLOR00FF00; DRAWTEXTABS(620,-55,'历史最高价:'+HHV(HIGH,0)),Colorff00ff,LAYER0; DRAWTEXTABS(620,-37,'历史最低价:'+LLV(LOW,0)),ColorAFFF00,LAYER0; DRAWTEXTABS(750,-55,'20日最高价:'+HHV(HIGH,20)),Colorred,LAYER0;。

通达信指标公式源码缠式买卖点副图源码

通达信指标公式源码缠式买卖点副图源码

通达信指标公式源码缠式买卖点副图源码{N1:1,100,10;N2:1,100,10;DISP:=1,3,2}; N1:=10;N2:=10;DISP:=2;K:=IF(PERIOD=5,1,{⽇}IF(PERIOD=6,1,{周}IF(PERIOD=7,1,{⽉}IF(PERIOD=8,1,{多分钟}IF(PERIOD=9,1,{多⽇}IF(PERIOD=10,1,{季}IF(PERIOD=11,2,{年}IF(PERIOD=4,1,{60F}IF(PERIOD=3,1,{30F}IF(PERIOD=2,1,{15F}IF(PERIOD=1,1{5F},1{1F})))))))))))/10; P1:=PEAK(1,K*N1,1);P2:=PEAK(1,K*N1,2);WP1:=PEAKBARS(1,K*N1,1);WP2:=PEAKBARS(1,K*N1,2);T1:=TROUGH(2,K*N2,1);T2:=TROUGH(2,K*N2,2);WT1:=TROUGHBARS(2,K*N2,1);WT2:=TROUGHBARS(2,K*N2,2);TJ1:=P1>T1 AND P2>T2 ;ZD:=MAX(T1,T2);ZG:=MIN(P1,P2);LL:=MIN(T1,T2);HH:=MAX(P1,P2);TJ2:=FILTER(ZG>ZD,2);TJ3:=ZG=REF(ZG,BARSLAST(TJ2)) OR ZD=REF(ZD,BARSLAST(TJ2));TJ4:=TJ1&&TJ2&&NOT(TJ3);TJ5:=BETWEEN(ZD,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST( TJ4),1)));TJ6:=BETWEEN(ZG,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST( TJ4),1)));TJ7:=ZG>REF(ZG,REF(BARSLAST(TJ4),1))&&ZDTJ8:=TJ4&&NOT(TJ5 OR TJ6 OR TJ7);ZSD:=IF(TJ8,ZD,DRAWNULL);ZSG:=IF(TJ8,ZG,DRAWNULL);ZSH:=IF(TJ8,HH,DRAWNULL);ZSL:=IF(TJ8,LL,DRAWNULL);STICKLINE(TJ8,ZSH,ZSL,0,-1),COLORMAGENTA;STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),COLORMAGENTA;局部低点预选A:=BACKSET(LLV(L,5)局部低点预选B:=BACKSET(局部低点预选A=0 AND REF(局部低点预选A,1)=1,2);局部低点预选C:=IF(局部低点预选B=1 AND REF(局部低点预选B,1)=0,-1,0); 局部⾼点预选A:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4);局部⾼点预选B:=BACKSET(局部⾼点预选A=0 AND REF(局部⾼点预选A,1)=1,2);局部⾼点预选C:=IF(局部⾼点预选B=1 AND REF(局部⾼点预选B,1)=0,1,0); 缺⼝判断:=IF(L>REF(H,1),1,IF(H距前⾼天:=BARSLAST(局部⾼点预选C=1);距前低天:=BARSLAST(局部低点预选C=-1);⼩值周期:=LOWRANGE(L);⼤值周期:=TOPRANGE(H);低保留AA:=IF(局部低点预选C=-1 AND REF(距前⾼天,1)>REF(距前低天,1) AND LLV(L,距前⾼天+1)低保留AB:=IF(局部低点预选C=-1 AND REF(距前⾼天,1)<=REF(距前低天,1) AND (距前⾼天>=4 OR LLV(缺⼝判断,距前⾼天)=-1 OR LLV(L,距前低天+2)低保留S:=IF((低保留AA=-1 OR 低保留AB=-1) AND L+1),-1,0);预判:=IF((距前低天<4 AND HHV(缺⼝判断,距前低天)!=1) OR REF(低保留S,距前低天)=0,1,0);判断:=IF(局部⾼点预选C=1 AND REF(距前低天,1)<=REF(距前⾼天,1) AND 预判=1 AND ⼤值周期>REF(⼩值周期,距前低天+1) AND ⼤值周期>REF(⼩值周期,距前低天) AND ⼤值周期>REF(⼤值周期,距前⾼天),1,0);⾼保留A:=IF(局部⾼点预选C=1 AND REF(距前低天,1)>REF(距前⾼天,1) AND HHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0);⾼保留B:=IF(局部⾼点预选C=1 AND REF(距前低天,1)<=REF(距前⾼天,1) AND REF(低保留S,距前低天)=-1 AND (距前低天>=4 OR HHV(缺⼝判断,距前低天)=1),1,0);⾼保留:=IF((⾼保留A=1 OR ⾼保留B=1 OR 判断=1) AND H>REF(L,距前低天+1),1,0);预判A:=IF((距前⾼天<4 AND HHV(缺⼝判断,距前⾼天)!=1) OR REF(⾼保留,距前⾼天)=0,1,0);判断A:=IF(局部低点预选C=-1 AND REF(距前⾼天,1)<=REF(距前低天,1) AND 预判A=1 AND ⼩值周期>REF(⼤值周期,距前⾼天+1) AND ⼩值周期>REF(⼤值周期,距前⾼天) AND ⼩值周期>REF(⼩值周期,距前低天),-1,0);低保留A:=IF(局部低点预选C=-1 AND REF(距前⾼天,1)>REF(距前低天,1) AND LLV(L,距前⾼天+1)低保留B:=IF(局部低点预选C=-1 AND REF(距前⾼天,1)<=REF(距前低天,1) AND (距前⾼天>=4 OR LLV(缺⼝判断,距前⾼天)=-1 OR 判断A=-1),-1,0);低保留:=IF((低保留A=-1 OR 低保留B=-1) AND L距前低天A:=BARSLAST(低保留=-1);预判X:=IF((距前低天A<4 AND HHV(缺⼝判断,距前低天A)!=1) OR REF(低保留,距前低天A)=0,1,0);判断X:=IF(局部⾼点预选C=1 AND REF(距前低天A,1)<=REF(距前⾼天A,1) AND 预判X=1 AND ⼤值周期>REF(⼩值周期,距前低天A+1) AND ⼤值周期>REF(⼩值周期,距前低天A) AND ⼤值周期>REF(⼤值周期,距前⾼天A),1,0); ⾼保留XA:=IF(局部⾼点预选C=1 AND REF(距前低天A,1)>REF(距前⾼天A,1) AND HHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0);⾼保留XB:=IF(局部⾼点预选C=1 AND REF(距前低天A,1)<=REF(距前⾼天A,1) AND REF(低保留,距前低天A)=-1 AND (距前低天A>=4 OR HHV(缺⼝判断,距前低天A)=1),1,0);⾼保留X:=IF((⾼保留XA=1 OR ⾼保留XB=1 OR 判断X=1) AND H>REF(L,距前低天A+1),1,0);预判XA:=IF((距前⾼天A<4 AND HHV(缺⼝判断,距前⾼天A)!=1) OR REF(⾼保留XA,距前⾼天A)=0,1,0);判断XA:=IF(局部低点预选C=-1 AND REF(距前⾼天A,1)<=REF(距前低天A,1) AND 预判XA=1 AND ⼩值周期>REF(⼤值周期,距前⾼天A+1) AND ⼩值周期>REF(⼤值周期,距前⾼天A) AND ⼩值周期>REF(⼩值周期,距前低天A),-1,0); 低保留XA:=IF(局部低点预选C=-1 AND REF(距前⾼天A,1)>REF(距前低天A,1) AND LLV(L,距前⾼天A+1)低保留XB:=IF(局部低点预选C=-1 AND REF(距前⾼天A,1)<=REF(距前低天A,1) AND (距前⾼天A>=4 OR LLV(缺⼝判断,距前⾼天A)=-1 OR 判断XA=-1),-1,0);低保留X:=IF((低保留XA=-1 OR 低保留XB=-1) AND LA+1),-1,0);距前⾼天YA:=BARSLAST(⾼保留X=1);距前低天YA:=BARSLAST(低保留X=-1);预判YX:=IF((距前低天YA<4 AND HHV(缺⼝判断,距前低天YA)!=1) OR REF(低保留X,距前低天YA)=0,1,0);判断YX:=IF(局部⾼点预选C=1 AND REF(距前低天YA,1)<=REF(距前⾼天YA,1) AND 预判YX=1 AND ⼤值周期>REF(⼩值周期,距前低天YA+1) AND ⼤值周期>REF(⼩值周期,距前低天YA) AND ⼤值周期>REF(⼤值周期,距前⾼天YA),1,0);⾼保留YXA:=IF(局部⾼点预选C=1 AND REF(距前低天YA,1)>REF(距前⾼天YA,1) AND HHV(H,距前低天YA+1)>REF(HHV(H,距前低天YA+1),1),1,0);⾼保留YXB:=IF(局部⾼点预选C=1 AND REF(距前低天YA,1)<=REF(距前⾼天YA,1) AND REF(低保留X,距前低天YA)=-1 AND (距前低天YA>=4 OR HHV(缺⼝判断,距前低天YA)=1),1,0);⾼保留YX:=IF((⾼保留YXA=1 OR ⾼保留YXB=1 OR 判断YX=1) ANDH>REF(L,距前低天YA+1),1,0);预判YXA:=IF((距前⾼天YA<4 AND HHV(缺⼝判断,距前⾼天YA)!=1) ORREF(⾼保留YXA,距前⾼天YA)=0,1,0);判断YXA:=IF(局部低点预选C=-1 AND REF(距前⾼天YA,1)<=REF(距前低天YA,1) AND 预判YXA=1 AND ⼩值周期>REF(⼤值周期,距前⾼天YA+1) AND⼩值周期>REF(⼤值周期,距前⾼天YA) AND ⼩值周期>REF(⼩值周期,距前低天YA),-1,0);低保留YXA:=IF(局部低点预选C=-1 AND REF(距前⾼天YA,1)>REF(距前低天YA,1) AND LLV(L,距前⾼天YA+1)低保留YXB:=IF(局部低点预选C=-1 AND REF(距前⾼天YA,1)<=REF(距前低天YA,1) AND (距前⾼天YA>=4 OR LLV(缺⼝判断,距前⾼天YA)=-1 OR 判断YXA=-1),-1,0);低保留YX:=IF((低保留YXA=-1 OR 低保留YXB=-1) AND LAAAD:=IF(⾼保留YX=1 AND 低保留YX=-1 AND H>REF(H,REF(距前⾼天YA,1)+2),1,IF(⾼保留YX=1 AND 低保留YX=-1 AND L极点保留:=IF(AAAD=0,⾼保留YX+低保留YX,AAAD);局部极点:IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL)) CIRCLEDOT COLORYELLOW;DRAWLINE(极点保留=-1,局部极点,极点保留=1,局部极点,0)COLORLIRED; DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0)COLORYELLOW; DD1:=BARSLAST(ABS(极点保留)!=1);DRAWTEXT(极点保留=1,局部极点,'卖'),COLORGREEN;DRAWTEXT(极点保留=-1,局部极点,'买'),COLORRED;MA5:MA(CLOSE,5),COLORFF00FF,LINETHICK2;判:IF(MA5。

通达信缠论筹码主图指标公式

通达信缠论筹码主图指标公式

通达信缠论筹码主图指标公式JJ:AMOUNT/VOL/100;MA144:MA(JJ,144);G:=MA(C,5);D:=MA(C,10);HH:=REF(H,5)=HHV(H,11);LL:=REF(L,5)=LLV(L,11);FG01:=BACKSET(HH,6)>BACKSET(HH,5) ;FD01:=BACKSET(LL,6)>BACKSET(LL,5) ;FG02:=IF(BARSLAST(FG01)=BARSLAST(FD01) AND G>D,FG01,IF(BARSLAST(FD01)>BARSLAST(FG01),FG01,0));FD02:=IF(BARSLAST(FG01)=BARSLAST(FD01) AND D>G,FD01,IF(BARSLAST(FG01)>BARSLAST(FD01),FD01,0));FG0:=FG02 AND H=HHV(H,BARSLAST(FD02));FD0:=FD02 AND L=LLV(L,BARSLAST(FG02));GP:IF(FG0,H,DRAWNULL),CIRCLEDOT,COLORCYAN;DP:IF(FD0,L,DRAWNULL),CIRCLEDOT,COLORCYAN;GQ:=L>REF(H,1) AND DAY!=REF(DAY,1);DQ:=H<REF(L,1) AND DAY!=REF(DAY,1);GQL:=REF(L,BARSLAST(GQ));DQH:=REF(H,BARSLAST(DQ));FGH:=REF(H,BARSLAST(FG0));FGL:=REF(L,BARSLAST(FG0));FGH1:=REF(H,BARSLAST(FG0)+1);FGL1:=REF(L,BARSLAST(FG0)+1);FGH2:=REF(H,BARSLAST(FG0)+2);FGL2:=REF(L,BARSLAST(FG0)+2);FDH:=REF(H,BARSLAST(FD0));FDL:=REF(L,BARSLAST(FD0));FDH1:=REF(H,BARSLAST(FD0)+1);FDL1:=REF(L,BARSLAST(FD0)+1);FDH2:=REF(H,BARSLAST(FD0)+2);FDL2:=REF(L,BARSLAST(FD0)+2);FGZH:=IF(FGL<=FGL1,FGH2,FGH1);FGZL:=IF(FGH1<FGL,FGL,IF(FGL<=FGL1,FGL2,FGL1));FDZH:=IF(FDL1>FDH,FDH,IF(FDH>=FDH1,FDH2,FDH1));FDZL:=IF(FDH>=FDH1,FDL2,FDL1);FG1:=FGH>FDZH AND FG0;FD1:=FDL<FGZL AND FD0;FG:=FG1 AND FGH>FDH AND FGL>FDL AND FGL1>FDL;FD:=FD1 AND FDL<FGL AND FDH<FGH AND FDH1<FGH;BH0:=(H<=REF(H,1) AND L>=REF(L,1)) OR (H>=REF(H,1) AND L<=REF(L,1));BHG:=COUNT(BH0,BARSLAST(FD0));BHD:=COUNT(BH0,BARSLAST(FG0));BGQ:=COUNT(GQ,BARSLAST(FD0));BDQ:=COUNT(DQ,BARSLAST(FG0));BK0:=IF(BHG>0,BHG+2+1,IF(BHD,BHD+2+1,3));BK:=IF(BGQ,BK0-BGQ,IF(BDQ,BK0-BDQ,BK0));G1X:=(FG AND BARSLAST(FD)>BK);D1X:=(FD AND BARSLAST(FG)>BK);G1:=(FG0 AND REF(H,BARSLAST(FG0))>=REF(H,BARSLAST(G1X)) AND BARSLAST(D1X)>BARSLAST(G1X))OR (FG1 AND COUNT(GQ,BARSLAST(FD1))>0 AND REF(H,BARSLAST(FG1))>REF(H,BARSLAST(G1X)));D1:=(FD0 ANDREF(L,BARSLAST(FD0))<=REF(L,BARSLAST(D1X)) AND BARSLAST(G1X)>BARSLAST(D1X))OR (FD1 AND COUNT(DQ,BARSLAST(FG1))>0 AND REF(L,BARSLAST(FD1))<REF(H,BARSLAST(D1X)));G1H:=IF(BARSLAST(D1)>BARSLAST(G1),REF(H,BARSLAST(G 1)),REF(H,BARSLAST(D1))),;D1L:=IF(BARSLAST(G1)>BARSLAST(D1),REF(L,BARSLAST(D1) ),REF(L,BARSLAST(G1)));G2:=G1 AND H=HHV(G1H,BARSLAST(D1)+1) AND H>REF(H,1) AND BARSLAST(D1)>BARSLAST(G1);D2:=D1 AND L=LLV(D1L,BARSLAST(G1)+1) AND L<REF(L,1) AND BARSLAST(G1)>BARSLAST(D1);G3:=G2 OR (FG0 AND REF(H,BARSLAST(FG0))>REF(H,BARSLAST(G2)) AND BARSLAST(D2)>BARSLAST(G2));D3:=D2 OR (FD0 AND REF(L,BARSLAST(FD0))<REF(L,BARSLAST(D2)) AND BARSLAST(G2)>BARSLAST(D2));GPB:IF(G1X,H,DRAWNULL),CIRCLEDOT,COLORYELLOW;DPB:IF(D1X,L,DRAWNULL),CIRCLEDOT,COLORYELLOW;{画线}NN:=G3;UU:=D3;L1:DRAWLINE(UU,L,NN,H,0),COLORLIGREEN;L2:DRAWLINE(NN,H,UU,L,0),COLORLIGREEN;。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
相关文档
最新文档