缠论中枢划线(笔和线段)主图指标公式-优化后

合集下载

缠论中枢公式

缠论中枢公式

缠论中枢公式缠论中枢思想是前三笔为主的中枢画线,本指标以近三笔为主作出的中枢画线。

黄色、紫色上升中枢,绿色、蓝色下跌中枢;虚线中枢未走完,全实线表示中枢成立。

}{三角形中枢}时间:=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);CC1:DRAWLINE(A,H,B,L,0);CC2:DRAWLINE(B,L,A,H,0);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);天,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);天,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);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);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;{后挂高低点画红点标志}DRAWTEXT(极点保留=1,局部极点,'顶分型卖'),COLORGREEN;DRAWTEXT(极点保留=-1,局部极点,'底分型买'),COLORRED;{以上两行代码在高低点标注字符}C1:DRAWLINE(极点保留=-1,局部极点,极点保留=1,局部极点,0),COLORLIGRAY;C2:DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0),COLORLIGRAY;极顶:=IF(N=1,C2=C1 AND 局部高点预选A AND 极点保留=1,DRAWNULL);极底:=IF(N=1,C2=C1 AND 局部低点预选A AND 极点保留=-1,DRAWNULL);A1:=BARSLAST(极顶);B1:=CURRBARSCOUNT=CONST(A1)+1;D1:=BARSLAST(B1);高1:=CONST(REF(H,D1));A2:=REF(A1,A1+1)+A1+1;B2:=CURRBARSCOUNT=CONST(A 2)+1;D2:=BARSLAST(B2);高2:=CONST(REF(H,D2));A3:=REF(A2,A1+1)+A1+1;B3:=CURRBARSCOUNT=CONST(A 3)+1;D3:=BARSLAST(B3);高3:=CONST(REF(H,D3));DA1:=BARSLAST(极底);DB1:=CURRBARSCOUNT=CONST(DA1)+1;DD1:=BARSLAST( DB1);低1:=CONST(REF(L,DD1));DA2:=REF(DA1,DA1+1)+DA1+1;DB2:=CURRBARSCOUNT=C ONST(DA2)+1;DD2:=BARSLAST(DB2);低2:=CONST(REF(L,DD2));DA3:=REF(DA2,DA1+1)+DA1+1;DB3:=CURRBARSCOUNT=C ONST(DA3)+1;DD3:=BARSLAST(DB3);低3:=CONST(REF(L,DD3));三角型放大A:=低1<低2 AND 高2>高1 AND DA2>A1 AND A1>DA1 AND A2>DA2 AND CONST(C)>低2;中枢A1:=IF(三角型放大 A AND CONST(C)<高1,DB2,DRAWNULL);STICKLINE(中枢A1,CONST(C),低2,0,0),COLORLIMAGENTA;中枢A2:=IF(三角型放大 A AND CONST(C)<高1,ISLASTBAR,DRAWNULL);STICKLINE(中枢A2,CONST(C),低2,0,0),COLORLIMAGENTA;DRAWLINE(中枢A1=1,CONST(C),中枢A2=1,CONST(C),0),DOTLINE,COLORLIMAGENTA;DRAWLINE(中枢A1=1,低2,中枢A2=1,低2,0),COLORLIMAGENTA;{成立}中枢AC1:=IF(三角型放大 A AND CONST(C)>=高1,DB2,DRAWNULL);STICKLINE(中枢AC1,高1,低1,0,0),COLORLIMAGENTA;中枢AC2:=IF(三角型放大 A AND CONST(C)>=高1,ISLASTBAR,DRAWNULL);STICKLINE(中枢AC2,高1,低1,0,0),COLORLIMAGENTA;DRAWLINE(中枢AC1=1,高1,中枢AC2=1,高1,0),COLORLIMAGENTA;DRAWLINE(中枢AC1=1,低1,中枢AC2=1,低1,0),COLORLIMAGENTA;三角型放大B:=低1>低2 AND 高1>高2 AND DA1>A1 AND A2>DA1 AND DA2>A2 AND CONST(C)<高2;中枢B1:=IF(三角型放大 B AND CONST(C)>低1,B2,DRAWNULL);STICKLINE(中枢B1,CONST(C),高2,0,0),COLORGREEN;中枢B2:=IF(三角型放大 B AND CONST(C)>低1,ISLASTBAR,DRAWNULL);STICKLINE(中枢B2,CONST(C),高2,0,0),COLORGREEN;DRAWLINE(中枢B1=1,高2,中枢B2=1,高2,0),COLORGREEN;DRAWLINE(中枢B1=1,CONST(C),中枢B2=1,CONST(C),0),DOTLINE,COLORGREEN;{成立}中枢BC1:=IF(三角型放大 B AND CONST(C)<=低1,B2,DRAWNULL);STICKLINE(中枢BC1,高2,低1,0,0),COLORGREEN;中枢BC2:=IF(三角型放大 B AND CONST(C)<=低1,ISLASTBAR,DRAWNULL);STICKLINE(中枢BC2,高2,低1,0,0),COLORGREEN;DRAWLINE(中枢BC1=1,高2,中枢BC2=1,高2,0),COLORGREEN;DRAWLINE(中枢BC1=1,低1,中枢BC2=1,低1,0),COLORGREEN;三角型收敛A:=低1>低2 AND 高2>高1 AND DA2>A1 AND A1>DA1 AND A2>DA2 AND CONST(C)>低1;中枢C1:=IF(三角型收敛 A AND CONST(C)<高1,DB2,DRAWNULL);STICKLINE(中枢C1,CONST(C),低1,0,0),COLORYELLOW;中枢C2:=IF(三角型收敛 A AND CONST(C)<高1,ISLASTBAR,DRAWNULL);STICKLINE(中枢C2,CONST(C),低1,0,0),COLORYELLOW;DRAWLINE(中枢C1=1,CONST(C),中枢C2=1,CONST(C),0),DOTLINE,COLORYELLOW;DRAWLINE(中枢C1=1,低1,中枢C2=1,低1,0),COLORYELLOW;{成立}中枢CC1:=IF(三角型收敛 A AND CONST(C)>=高1,DB2,DRAWNULL);STICKLINE(中枢CC1,高1,低1,0,0),COLORYELLOW;中枢CC2:=IF(三角型收敛 A AND CONST(C)>=高1,ISLASTBAR,DRAWNULL);STICKLINE(中枢CC2,高1,低1,0,0),COLORYELLOW;DRAWLINE(中枢CC1=1,高1,中枢CC2=1,高1,0),COLORYELLOW;DRAWLINE(中枢CC1=1,低1,中枢CC2=1,低1,0),COLORYELLOW;三角型收敛B:=低1>低2 AND 高1<高2 AND DA1>A1 AND A2>DA1 AND DA2>A2 AND CONST(C)<高1;中枢D1:=IF(三角型收敛 B AND CONST(C)>低1,B2,DRAWNULL);STICKLINE(中枢D1,CONST(C),高1,0,0),COLORLICYAN;中枢D2:=IF(三角型收敛 B AND CONST(C)>低1,ISLASTBAR,DRAWNULL);STICKLINE(中枢D2,CONST(C),高1,0,0),COLORLICYAN;DRAWLINE(中枢D1=1,高1,中枢D2=1,高1,0),COLORLICYAN;DRAWLINE(中枢D1=1,CONST(C),中枢D2=1,CONST(C),0),DOTLINE,COLORLICYAN;{成立}中枢DC1:=IF(三角型收敛 B AND CONST(C)<=低1,B2,DRAWNULL);STICKLINE(中枢DC1,高1,低1,0,0),COLORLICYAN;中枢DC2:=IF(三角型收敛 B AND CONST(C)<=低1,ISLASTBAR,DRAWNULL);STICKLINE(中枢DC2,高1,低1,0,0),COLORLICYAN;DRAWLINE(中枢DC1=1,高1,中枢DC2=1,高1,0),COLORLICYAN;DRAWLINE(中枢DC1=1,低1,中枢DC2=1,低1,0),COLORLICYAN;{9转数字}A11:=C>REF(C,4);NT:=BARSLASTCOUNT(A11);TJ11:=NT=9;TJ13:=ISLASTBAR AND BETWEEN(NT,5,8);AY:=(BACKSET(TJ11>0,9) OR BACKSET(TJ13>0,NT))*NT;DRAWTEXT(AY>0,H*1.02,VAR2STR(AY,0)),COLORFF00FF;DRAWTEXT(NT=9,H*1.02,'9'),COLORGREEN;B11:=C<REF(C,4);NT0:=BARSLASTCOUNT(B11);TJ21:=NT0=9 ;TJ23:=ISLASTBAR AND BETWEEN(NT0,5,8);AY1:=(BACKSET(TJ21>0,9) OR BACKSET(TJ23>0,NT0))*NT0;DRAWTEXT(AY1>0,L*0.98,VAR2STR(AY1,0)),COLORGREEN;DRAWTEXT(NT0=9,L*0.98,'9'),COLOR0000FF;现价:=CLOSE,COLORWHITE,LINETHICK2;DRAWTEXT(ISLASTBAR AND 现价,现价,ST RCAT('←',CON2STR(现价,2))),COLORYELLOW;MA5:MA(CLOSE,5),COLORWHITE;MA10:MA(CLOSE,10),COLORYELLOW;MA60:MA(CLOSE,60),COLORBLUE;MA120:MA(CLOSE,120),COLORMAGENTA;DRAWTEXT_FIX(C!=0,0.1,0.1,0,'顶分型第三K线柱收盘低于第一线柱止损出。

【炒股必看】同花顺缠论分笔及中枢主图指标公式

【炒股必看】同花顺缠论分笔及中枢主图指标公式

同花顺缠论分笔及中枢主图指标公式KU1:=IF(HIGH=HHV(HIGH,3),1,0);KD1:=IF(LOW=LLV(LOW,3),1,0);UL:=IF(REF(KU1,2)=1 AND REF(KU1,1)=0AND KU1=0,REF(HIGH,2),REF(HIGH,2+BARSLAST(REF(KU1,2)=1AND REF(KU1,1)=0 AND KU1=0)));DL:=IF(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0,REF(LOW,2),REF(LOW,2+BARSLAST(REF(KD1,2)=1AND REF(KD1,1)=0 AND KD1=0)));HV:=H>UL AND H>REF(H,1) ;LV:=L<DL AND L<REF(L,1) ;GP:=BARSLAST(HV);DP:=BARSLAST(LV);IP:=IF(GP=0,DP,GP)>3;HV1:=HV AND IP AND H>=HHV(H,BARSLAST(LV));LV1:=LV AND IP AND L<=LLV(L,BARSLAST(HV));DRAWLINE(LV1,LOW,HV1, HIGH,0),coloryellow,LINETHICK2;DRAWLINE(HV1,HIGH,LV1, LOW,0),colormagenta,LINETHICK2;///加入中枢判定//简化版N1:=10;N2:=10;DISP:=2;K:=1;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 AND TJ2 AND 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)) AND ZD<REF(ZD,REF(BARSLAST(TJ4),1));TJ8:=TJ4 AND NOT(TJ5 OR TJ6 OR TJ7);ZSD:=IF(TJ8,ZD,REF(ZD,1));//,coloryellow;ZSG:=IF(TJ8,ZG,REF(ZG,1));//,colormagenta;ZSH:=IF(TJ8,HH,REF(HH,1));//,colorblue;ZSL:=IF(TJ8,LL,REF(LL,1));//,colorgreen;STICKLINE(TJ8,ZSH,ZSL,0,-1),colormagenta;STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),colormagenta;DRAWTEXT(DISP=2,ZSH,''),colorwhite;//中枢高中枢高:ZSG,colormagenta;POLYLINE(DISP=2,REF(ZSG,BARSLAST(TJ8))),CIRCLEDOT,colormagenta;//中枢低:中枢低:ZSD,coloryellow;POLYLINE(DISP=2,REF(ZSD,BARSLAST(TJ8))),CIRCLEDOT,coloryellow;//中枢最高:中枢最高:ZSH,colorred;POLYLINE(DISP=2,REF(ZSH,BARSLAST(TJ8))),POINTDOT,colorred;//中枢最低:中枢最低:ZSL,colorgreen;POLYLINE(DISP=2,REF(ZSL,BARSLAST(TJ8))),POINTDOT,colorgreen;//趋势高://QSGD1:POLYLINE(DISP=3,ZIG(1,K*N1)),colorblue;//趋势低://QSDD1:POLYLINE(DISP=3,ZIG(2,K*N2)),colorblue;MA5:MA(CLOSE,5),COLORFF00FF,Linethick1;//COLORFF00FF,LINETHICK2;命真好:=MA5>REF(MA5,1);命真坏:=MA5<REF(MA5,1);//判定:PARTLINE(MA5,命真好,coloryellow,命真坏,colorblue,MA5,COLORFF00FF),linethick3;//F1:IF(MA5<REF(MA5,1),MA5,NULL),colorwhite,LINETHICK2;。

【炒股必看】同花顺缠论分笔及中枢主图指标公式

【炒股必看】同花顺缠论分笔及中枢主图指标公式

同花顺缠论分笔及中枢主图指标公式KU1:=IF(HIGH=HHV(HIGH,3),1,0);KD1:=IF(LOW=LLV(LOW,3),1,0);UL:=IF(REF(KU1,2)=1 AND REF(KU1,1)=0AND KU1=0,REF(HIGH,2),REF(HIGH,2+BARSLAST(REF(KU1,2)=1AND REF(KU1,1)=0 AND KU1=0)));DL:=IF(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0,REF(LOW,2),REF(LOW,2+BARSLAST(REF(KD1,2)=1AND REF(KD1,1)=0 AND KD1=0)));HV:=H>UL AND H>REF(H,1) ;LV:=L<DL AND L<REF(L,1) ;GP:=BARSLAST(HV);DP:=BARSLAST(LV);IP:=IF(GP=0,DP,GP)>3;HV1:=HV AND IP AND H>=HHV(H,BARSLAST(LV));LV1:=LV AND IP AND L<=LLV(L,BARSLAST(HV));DRAWLINE(LV1,LOW,HV1, HIGH,0),coloryellow,LINETHICK2;DRAWLINE(HV1,HIGH,LV1, LOW,0),colormagenta,LINETHICK2;///加入中枢判定//简化版N1:=10;N2:=10;DISP:=2;K:=1;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 AND TJ2 AND 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)) AND ZD<REF(ZD,REF(BARSLAST(TJ4),1));TJ8:=TJ4 AND NOT(TJ5 OR TJ6 OR TJ7);ZSD:=IF(TJ8,ZD,REF(ZD,1));//,coloryellow;ZSG:=IF(TJ8,ZG,REF(ZG,1));//,colormagenta;ZSH:=IF(TJ8,HH,REF(HH,1));//,colorblue;ZSL:=IF(TJ8,LL,REF(LL,1));//,colorgreen;STICKLINE(TJ8,ZSH,ZSL,0,-1),colormagenta;STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),colormagenta;DRAWTEXT(DISP=2,ZSH,''),colorwhite;//中枢高中枢高:ZSG,colormagenta;POLYLINE(DISP=2,REF(ZSG,BARSLAST(TJ8))),CIRCLEDOT,colormagenta;//中枢低:中枢低:ZSD,coloryellow;POLYLINE(DISP=2,REF(ZSD,BARSLAST(TJ8))),CIRCLEDOT,coloryellow;//中枢最高:中枢最高:ZSH,colorred;POLYLINE(DISP=2,REF(ZSH,BARSLAST(TJ8))),POINTDOT,colorred;//中枢最低:中枢最低:ZSL,colorgreen;POLYLINE(DISP=2,REF(ZSL,BARSLAST(TJ8))),POINTDOT,colorgreen;//趋势高://QSGD1:POLYLINE(DISP=3,ZIG(1,K*N1)),colorblue;//趋势低://QSDD1:POLYLINE(DISP=3,ZIG(2,K*N2)),colorblue;MA5:MA(CLOSE,5),COLORFF00FF,Linethick1;//COLORFF00FF,LINETHICK2;命真好:=MA5>REF(MA5,1);命真坏:=MA5<REF(MA5,1);//判定:PARTLINE(MA5,命真好,coloryellow,命真坏,colorblue,MA5,COLORFF00FF),linethick3;//F1:IF(MA5<REF(MA5,1),MA5,NULL),colorwhite,LINETHICK2;。

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

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

{通达信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(PER IOD=4,1,{60F}IF(PERIOD=3,1,{30F} IF(PERI OD=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>T1AND 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:=BETW EEN(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 A NDREF(局部高点预选A,1)=1,2); 局部高点预选C:=IF(局部高点预选B=1AND REF(局部高点预选B,1)=0,1,0); 缺口判断:=IF(L>REF(H,1),1,IF(HREF(距前低天,1) AND LLV(L,距前高天+1)=4ORLLV(缺口判断,距前高天)=-1 OR LLV(L,距前低天+2)REF(小值周期,距前低天+1) AND大值周期>REF(小值周期,距前低天) AND 大值周期>REF(大值周期,距前高天),1,0);高保留A:=IF(局部高点预选C=1AND REF(距前低天,1)>REF(距前高天,1)AND HHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0);高保留B:=IF(局部高点预选C=1 ANDREF(距前低天,1)<=REF(距前高天,1) AND REF(低保留S,距前低天)=-1 AND (距前低天>=4 OR HH V(缺口判断,距前低天)=1),1,0);高保留:=IF((高保留A=1 OR 高保留B=1 OR判断=1)AND H>REF(L,距前低天+1),1,0);预判A:=IF((距前高天<4AND HHV(缺口判断,距前高天)!=1)OR REF(高保留,距前高天)=0,1,0); 判断A:=IF(局部低点预选C=-1 ANDREF(距前高天,1)<=REF(距前低天,1)AND 预判A=1AND小值周期>R EF(大值周期,距前高天+1) AND 小值周期>REF(大值周期,距前高天) AND小值周期>REF(小值周期, 距前低天),-1,0); 低保留A:=IF(局部低点预选C=-1ANDREF(距前高天,1)>REF(距前低天,1) ANDLLV(L,距前高天+1)=4 OR LLV(缺口判断,距前高天)=-1 OR判断A=-1),-1,0); 低保留:=IF((低保留A=-1OR低保留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) ANDHHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0); 高保留XB:=IF(局部高点预选C=1 ANDREF(距前低天A,1)<=REF(距前高天A,1)AND REF(低保留,距前低天A)=-1 AND (距前低天A>=4ORHHV(缺口判断,距前低天A)=1),1,0); 高保留X:=IF((高保留XA=1OR高保留XB=1OR判断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=1AND 小值周期>REF(大值周期,距前高天A+1) AND 小值周期>REF(大值周期,距前高天A) AN D小值周期>REF(小值周期,距前低天A),-1,0); 低保留XA:=IF(局部低点预选C=-1AND REF(距前高天A,1)>REF(距前低天A,1) ANDLLV(L,距前高天A+1)=4ORLLV(缺口判断,距前高天A)=-1 OR 判断XA=-1),-1,0);低保留X:=IF((低保留XA=-1 OR 低保留XB=-1) ANDLREF(小值周期,距前低天YA+1) AND 大值周期>REF(小值周期,距前低天YA) AND大值周期>REF(大值周期,距前高天YA),1,0);高保留YXA:=IF (局部高点预选C=1AND REF(距前低天YA,1)>REF(距前高天YA,1) AND HHV(H,距前低天YA+1)>REF(HHV(H,距前低天YA+1),1),1,0);高保留YXB:=IF(局部高点预选C=1 ANDREF(距前低天YA,1)<=REF(距前高天YA,1)AND REF(低保留X,距前低天YA)=-1AND(距前低天YA>=4OR HHV(缺口判断,距前低天YA)=1),1,0);高保留YX:=IF((高保留YXA=1OR 高保留YXB=1OR 判断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:=I F(局部低点预选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=-1AND REF(距前高天YA,1)>REF(距前低天YA,1) AND LLV(L,距前高天YA+1)=4 ORLLV(缺口判断,距前高天YA)=-1OR 判断YXA=-1),-1,0); 低保留YX:=IF((低保留YXA=-1 OR 低保留YXB=-1)A ND LREF(H,REF(距前高天YA,1)+2),1,IF(高保留YX =1 AND 低保留YX=-1AND L。

缠中说禅之中枢及线段

缠中说禅之中枢及线段

单个中枢的形态和中枢高低点的判断中枢由某一个起点开始的上-下-上或者下-上-下构成,构成中枢的一个最基本条件是连续的三段之间一定要有股价重叠区域(也就是每段当中有股价相等的一个交易区域),例如以下的a和b中的三段可以构成中枢,而c和d中的则不能。

构成每个中枢的连续三段总共只有4个端点,其中4个端点当中最高点为中枢的高高点(GG),4个端点当中最低点为中枢的低低点(DD),另外两个端点就构成股价走势中枢价值区间,中枢区间的高点就为中枢高点(ZG), 中枢区间的低点就为中枢低点(ZD)。

显然,中枢高低点完全可能与中枢三段当中相应的GG或DD相等。

由于构成中枢三段的4个端点位置的不同,对上-下-上型和下-上-下型中枢分别对应9种可能的组合,列出如下,其中三段的夹角可以任意(180度除外):中枢级别扩展的两种类型示意根据博主中枢的定义和级别扩展定理,初步认为中枢级别扩展有两种比较典型的形式,一种是前后两个连续中枢的波动区间有重叠,一种是6个延伸段以上构成更高级别中枢。

其中6 个延伸段以上的情况中也可能有前后两个连续中枢的波动区间有重叠的情况,为了便于理解,本人只区分:围绕中枢价值区间[ ZG, ZD ]上下震荡产生的级别扩展和呈现收敛走势的中枢不断延伸最终构成的级别扩展。

以上理解和以下示意图是否正确,需要博主才能判断,其它朋友也可以帮忙指正,以便及时纠错和修改。

1. 围绕中枢价值区间[ ZG, ZD ] 上下震荡产生的级别扩展缠中说禅走势级别延续定理二:更大级别缠中说禅走势中枢产生,当且仅当围绕连续两个同级别缠中说禅走势中枢产生的波动区间产生重叠。

(课程20)缠中说禅走势中枢中心定理二:前后同级别的两个缠中说禅走势中枢,后GG〈前DD等价于下跌及其延续;后DD〉前GG等价于上涨及其延续。

后ZG<前ZD且后GG〉=前DD,或后ZD〉前ZG且后DD=<前GG,则等价于形成高级别的走势中枢。

(课程20)图1 由中枢震荡产生的级别扩展典型示意图(假设图中每段都为1分钟走势线段,红色和绿色标注的三段为5分钟中枢,蓝色虚线示意由5分钟中枢通过震荡扩展成30分钟中枢的三段,其中粉红线段表示导致前后两个中枢波动区间有重叠的部分)2. 呈现收敛走势的中枢不断延伸构成的中枢级别扩展课程33-走势的多义性一课:例如,5分钟级别的中枢不断延伸,出现9段以上的1分钟次级别走势。

【炒股必看】同花顺缠论分笔及中枢主图指标公式

【炒股必看】同花顺缠论分笔及中枢主图指标公式

同花顺缠论分笔及中枢主图指标公式KU1:=IF(HIGH=HHV(HIGH,3),1,0);KD1:=IF(LOW=LLV(LOW,3),1,0);UL:=IF(REF(KU1,2)=1 AND REF(KU1,1)=0AND KU1=0,REF(HIGH,2),REF(HIGH,2+BARSLAST(REF(KU1,2)=1AND REF(KU1,1)=0 AND KU1=0)));DL:=IF(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0,REF(LOW,2),REF(LOW,2+BARSLAST(REF(KD1,2)=1AND REF(KD1,1)=0 AND KD1=0)));HV:=H>UL AND H>REF(H,1) ;LV:=L<DL AND L<REF(L,1) ;GP:=BARSLAST(HV);DP:=BARSLAST(LV);IP:=IF(GP=0,DP,GP)>3;HV1:=HV AND IP AND H>=HHV(H,BARSLAST(LV));LV1:=LV AND IP AND L<=LLV(L,BARSLAST(HV));DRAWLINE(LV1,LOW,HV1, HIGH,0),coloryellow,LINETHICK2;DRAWLINE(HV1,HIGH,LV1, LOW,0),colormagenta,LINETHICK2;///加入中枢判定//简化版N1:=10;N2:=10;DISP:=2;K:=1;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 AND TJ2 AND 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)) AND ZD<REF(ZD,REF(BARSLAST(TJ4),1));TJ8:=TJ4 AND NOT(TJ5 OR TJ6 OR TJ7);ZSD:=IF(TJ8,ZD,REF(ZD,1));//,coloryellow;ZSG:=IF(TJ8,ZG,REF(ZG,1));//,colormagenta;ZSH:=IF(TJ8,HH,REF(HH,1));//,colorblue;ZSL:=IF(TJ8,LL,REF(LL,1));//,colorgreen;STICKLINE(TJ8,ZSH,ZSL,0,-1),colormagenta;STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),colormagenta;DRAWTEXT(DISP=2,ZSH,''),colorwhite;//中枢高中枢高:ZSG,colormagenta;POLYLINE(DISP=2,REF(ZSG,BARSLAST(TJ8))),CIRCLEDOT,colormagenta;//中枢低:中枢低:ZSD,coloryellow;POLYLINE(DISP=2,REF(ZSD,BARSLAST(TJ8))),CIRCLEDOT,coloryellow;//中枢最高:中枢最高:ZSH,colorred;POLYLINE(DISP=2,REF(ZSH,BARSLAST(TJ8))),POINTDOT,colorred;//中枢最低:中枢最低:ZSL,colorgreen;POLYLINE(DISP=2,REF(ZSL,BARSLAST(TJ8))),POINTDOT,colorgreen;//趋势高://QSGD1:POLYLINE(DISP=3,ZIG(1,K*N1)),colorblue;//趋势低://QSDD1:POLYLINE(DISP=3,ZIG(2,K*N2)),colorblue;MA5:MA(CLOSE,5),COLORFF00FF,Linethick1;//COLORFF00FF,LINETHICK2;命真好:=MA5>REF(MA5,1);命真坏:=MA5<REF(MA5,1);//判定:PARTLINE(MA5,命真好,coloryellow,命真坏,colorblue,MA5,COLORFF00FF),linethick3;//F1:IF(MA5<REF(MA5,1),MA5,NULL),colorwhite,LINETHICK2;。

通达信缠论中枢自动画线指标公式

通达信缠论中枢自动画线指标公式

通达信缠论中枢自动画线指标公式
1 什么是中枢自动画线指标
中枢自动画线指标,是指可以自动"判断行情大走势、涨跌趋势及其支撑位和阻力位"的技术分析工具,它使用"均线跌破、均线支撑,涨跌回转点"等指标进行判断,以更加准确把握股票价格判断。

2 中枢自动画线指标的特点
中枢自动画线指标的总体特点是以“均线跌破”为骨干,整合几大判断标准,利用多维度图形多角度联系行情涨跌,并建立稳定的支撑阻力压力位,从而更准确预测行情变化,成为市场交易者的有效投资分析工具,是时下热门的技术指标之一。

3 中枢自动画线的计算公式
均线跌破:
当价格跌破一条设定的均线时,判断为趋势发生变化;
MA(30)>MA(60) AND MA(60)>MA(90):
当30日均线大于60日均线、60日均线大于90日均线时,判断为上涨趋势;
MA(30)<MA(60) AND MA(60)<MA(90):
当30日均线小于60日均线、60日均线小于90日均线时,判断为下跌趋势;
涨跌回转点:
当价格跌落或上涨到前次支撑或阻力位附近时,判断可能出现一定回转;
EXPMA(7,34):
7天指数平均线,34天指数平均线
当7天指数平均线穿越34天指数平均线、或者两者之间形成交叉时,可以判断出股价可能出现趋势变换的最前期信号。

4 中枢自动画线的应用
中枢自动画线指标的使用很受广大交易者的青睐。

此指标功能强大,可以追求陆续参加行情的波段风向,择机加减仓的时点,抓住及时高抛低吸的动向,把握卖出股票的最优考虑时点,从而拿去最佳的利润。

同时,也让参与交易者更加有信心稳定获利。

缠论自动画线指标按照递归理论,自动画笔、线段、中枢

缠论自动画线指标按照递归理论,自动画笔、线段、中枢

缠论自动画线指标按照递归理论,自动画笔、线段、中枢展开全文在漫长的股市道路上,我们是不可能一路顺风的,相反的,更多时候我们都是在面对挫折,跨失落!因此,我们需要时刻保持一种积极乐观的心态,在我们失落失望失败的时候能像普希金说的那样“在愁苦的日子里心平气和”始终相信幸福的一天终究会来临!在股票经营中,规避和防范风险是第一要点,也是长期取得成功的前提和保证。

在股票的运作中,顺应股价走势是第二要点,也是在股市生存的最佳途径。

在股票操作中,成功的关键是被动地跟踪股价,我们不应该认为自己比投资市场更聪明。

交易时间点位确定后,采取果断行动,根据自己制定的交易信号进出。

但是自己的交易系统必须满足科学性、数量性和客观性的要求。

在股票操作中,买入的股票必须是顺势的,重势不重价,顺势而为是我们永远的朋友和基础。

在股票操作中,只分为短期操作和中长线操作。

企业和企业的股票是完全不同的,企业之间有业绩好的和不好的区别。

股票只有涨跌的区别。

在股票运作中,股票的交易是以股票的涨跌为基础的。

股票市场的走势总是不确定的。

换言之,股市唯一不变的就是它总是会变的。

时间越长,不确定性就越大。

股票价格运动的本质是高度随机的,其方向只有可能,而不是绝对的。

在股票交易中,任何对股票价格的分析和预测都是值得怀疑的。

在股票投资中,真正的投入因素包括资金、时间、心理和经验,和对股票运动规律、投资理念和经营策略的理解。

任何交易都不允许过度投资,不要在没有交易量的个股上投资,不要在受损的企业以赌徒式投资。

我们不能控制股市,但必须绝对能够控制住自己的情绪。

我们不要求每次都分析的很准确,但我们必须要求自己每次都做对,更重要的是做对更重要。

在股票操作中,一定要制定止赢止损策略。

炒股就是炒心,心态不好在股市也做不长久,股票交易胜负是短暂的,但意志却能决定你的一生。

短线或中长线经营只是操作方式不同,短线不操作的目的是不参与股票走势暂时不确定性。

世上没有完美的东西,也没有万能包赚钱的工具,股市任何技术指标都有缺陷的,股票指标公式只是一种工具,与其说会用哪个技术指标,还不如说能掌握某个指标的使用技巧更好,只有找到适合自己的工具最好。

【炒股必看】同花顺缠论分笔及中枢主图指标公式

【炒股必看】同花顺缠论分笔及中枢主图指标公式

同花顺缠论分笔及中枢主图指标公式KU1:=IF(HIGH=HHV(HIGH,3),1,0);KD1:=IF(LOW=LLV(LOW,3),1,0);UL:=IF(REF(KU1,2)=1 AND REF(KU1,1)=0AND KU1=0,REF(HIGH,2),REF(HIGH,2+BARSLAST(REF(KU1,2)=1AND REF(KU1,1)=0 AND KU1=0)));DL:=IF(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0,REF(LOW,2),REF(LOW,2+BARSLAST(REF(KD1,2)=1AND REF(KD1,1)=0 AND KD1=0)));HV:=H>UL AND H>REF(H,1) ;LV:=L<DL AND L<REF(L,1) ;GP:=BARSLAST(HV);DP:=BARSLAST(LV);IP:=IF(GP=0,DP,GP)>3;HV1:=HV AND IP AND H>=HHV(H,BARSLAST(LV));LV1:=LV AND IP AND L<=LLV(L,BARSLAST(HV));DRAWLINE(LV1,LOW,HV1, HIGH,0),coloryellow,LINETHICK2;DRAWLINE(HV1,HIGH,LV1, LOW,0),colormagenta,LINETHICK2;///加入中枢判定//简化版N1:=10;N2:=10;DISP:=2;K:=1;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 AND TJ2 AND 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)) AND ZD<REF(ZD,REF(BARSLAST(TJ4),1));TJ8:=TJ4 AND NOT(TJ5 OR TJ6 OR TJ7);ZSD:=IF(TJ8,ZD,REF(ZD,1));//,coloryellow;ZSG:=IF(TJ8,ZG,REF(ZG,1));//,colormagenta;ZSH:=IF(TJ8,HH,REF(HH,1));//,colorblue;ZSL:=IF(TJ8,LL,REF(LL,1));//,colorgreen;STICKLINE(TJ8,ZSH,ZSL,0,-1),colormagenta;STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),colormagenta;DRAWTEXT(DISP=2,ZSH,''),colorwhite;//中枢高中枢高:ZSG,colormagenta;POLYLINE(DISP=2,REF(ZSG,BARSLAST(TJ8))),CIRCLEDOT,colormagenta;//中枢低:中枢低:ZSD,coloryellow;POLYLINE(DISP=2,REF(ZSD,BARSLAST(TJ8))),CIRCLEDOT,coloryellow;//中枢最高:中枢最高:ZSH,colorred;POLYLINE(DISP=2,REF(ZSH,BARSLAST(TJ8))),POINTDOT,colorred;//中枢最低:中枢最低:ZSL,colorgreen;POLYLINE(DISP=2,REF(ZSL,BARSLAST(TJ8))),POINTDOT,colorgreen;//趋势高://QSGD1:POLYLINE(DISP=3,ZIG(1,K*N1)),colorblue;//趋势低://QSDD1:POLYLINE(DISP=3,ZIG(2,K*N2)),colorblue;MA5:MA(CLOSE,5),COLORFF00FF,Linethick1;//COLORFF00FF,LINETHICK2;命真好:=MA5>REF(MA5,1);命真坏:=MA5<REF(MA5,1);//判定:PARTLINE(MA5,命真好,coloryellow,命真坏,colorblue,MA5,COLORFF00FF),linethick3;//F1:IF(MA5<REF(MA5,1),MA5,NULL),colorwhite,LINETHICK2;。

缠论中枢划线(笔和线段)主图指标公式-优化后

缠论中枢划线(笔和线段)主图指标公式-优化后

KU1:=IF(HIGH=HHV(HIGH,3),1,0);KD1:=IF(LOW=LLV(LOW,3),1,0);UL:=IF(REF(KU1,2)=1 AND REF(KU1,1)=0AND KU1=0,REF(HIGH,2),REF(HIGH,2+BARSLAST(REF(KU1,2)=1AND REF(KU1,1)=0 AND KU1=0)));DL:=IF(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0,REF(LOW,2),REF(LOW,2+BARSLAST(REF(KD1,2)=1AND REF(KD1,1)=0 AND KD1=0)));HV:=H>UL AND H>REF(H,1) ;LV:=L<DL AND L<REF(L,1) ;GP:=BARSLAST(HV);DP:=BARSLAST(LV);IP:=IF(GP=0,DP,GP)>3;HV1:=HV AND IP AND H>=HHV(H,BARSLAST(LV));LV1:=LV AND IP AND L<=LLV(L,BARSLAST(HV));DRAWLINE(LV1,LOW,HV1, HIGH,0),COLORYELLOW,LINETHICK2;DRAWLINE(HV1,HIGH,LV1, LOW,0),COLORMAGENTA,LINETHICK2;N1:=10;N2:=10;DISP:=2;K:=1;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 AND TJ2 AND 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)) AND ZD<REF(ZD,REF(BARSLAST(TJ4),1));TJ8:=TJ4 AND NOT(TJ5 OR TJ6 OR TJ7);ZSD:=IF(TJ8,ZD,REF(ZD,1));ZSG:=IF(TJ8,ZG,REF(ZG,1));ZSH:=IF(TJ8,HH,REF(HH,1));ZSL:=IF(TJ8,LL,REF(LL,1));STICKLINE(TJ8,ZSH,ZSL,0,-1);STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),COLORMAGENTA;DRAWTEXT(DISP=2,ZSH,''),COLORWHITE;中枢高:ZSG,COLORMAGENTA;IF(DISP=2,REF(ZSG,BARSLAST(TJ8)),DRAWNULL),CIRCLEDOT,COLORMAGENTA;中枢低:ZSD,COLORYELLOW;IF(DISP=2,REF(ZSD,BARSLAST(TJ8)),DRAWNULL),CIRCLEDOT,COLORYELLOW;中枢最高:ZSH,COLORRED;IF(DISP=2,REF(ZSH,BARSLAST(TJ8)),DRAWNULL),POINTDOT,COLORRED;中枢最低:ZSL,COLORGREEN;IF(DISP=2,REF(ZSL,BARSLAST(TJ8)),DRAWNULL),POINTDOT,COLORGREEN;MA5:MA(CLOSE,5),COLORFF00FF,LINETHICK1;命真好:=MA5>REF(MA5,1);命真坏:=MA5<REF(MA5,1);DRAWBAND(MA5,RGB(255,96,96),REF(MA5,1),RGB(0,224,224));(注:专业文档是经验性极强的领域,无法思考和涵盖全面,素材和资料部分来自网络,供参考。

缠论中枢划线主图指标公式-优化后

缠论中枢划线主图指标公式-优化后

KU1:=IF(HIGH=HHV(HIGH,3),1,0);KD1:=IF(LOW=LLV(LOW,3),1,0);UL:=IF(REF(KU1,2)=1 AND REF(KU1,1)=0AND KU1=0,REF(HIGH,2),REF(HIGH,2+BARSLAST(REF(KU1,2)=1AND REF(KU1,1)=0 AND KU1=0)));DL:=IF(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0,REF(LOW,2),REF(LOW,2+BARSLAST(REF(KD1,2)=1AND REF(KD1,1)=0 AND KD1=0)));HV:=H>UL AND H>REF(H,1) ;LV:=L<DL AND L<REF(L,1) ;GP:=BARSLAST(HV);DP:=BARSLAST(LV);IP:=IF(GP=0,DP,GP)>3;HV1:=HV AND IP AND H>=HHV(H,BARSLAST(LV));LV1:=LV AND IP AND L<=LLV(L,BARSLAST(HV));DRAWLINE(LV1,LOW,HV1, HIGH,0),COLORYELLOW,LINETHICK2;DRAWLINE(HV1,HIGH,LV1, LOW,0),COLORMAGENTA,LINETHICK2;N1:=10;N2:=10;DISP:=2;K:=1;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 AND TJ2 AND 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)) AND ZD<REF(ZD,REF(BARSLAST(TJ4),1));TJ8:=TJ4 AND NOT(TJ5 OR TJ6 OR TJ7);ZSD:=IF(TJ8,ZD,REF(ZD,1));ZSG:=IF(TJ8,ZG,REF(ZG,1));ZSH:=IF(TJ8,HH,REF(HH,1));ZSL:=IF(TJ8,LL,REF(LL,1));STICKLINE(TJ8,ZSH,ZSL,0,-1);STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),COLORMAGENTA;DRAWTEXT(DISP=2,ZSH,''),COLORWHITE;中枢高:ZSG,COLORMAGENTA;IF(DISP=2,REF(ZSG,BARSLAST(TJ8)),DRAWNULL),CIRCLEDOT,COLORMAGENTA;中枢低:ZSD,COLORYELLOW;IF(DISP=2,REF(ZSD,BARSLAST(TJ8)),DRAWNULL),CIRCLEDOT,COLORYELLOW;中枢最高:ZSH,COLORRED;IF(DISP=2,REF(ZSH,BARSLAST(TJ8)),DRAWNULL),POINTDOT,COLORRED;中枢最低:ZSL,COLORGREEN;IF(DISP=2,REF(ZSL,BARSLAST(TJ8)),DRAWNULL),POINTDOT,COLORGREEN; MA5:MA(CLOSE,5),COLORFF00FF,LINETHICK1;命真好:=MA5>REF(MA5,1);命真坏:=MA5<REF(MA5,1);DRAWBAND(MA5,RGB(255,96,96),REF(MA5,1),RGB(0,224,224));。

缠论画笔指标公式

缠论画笔指标公式

缠论画笔指标公式
缠论画笔指标公式,是一种技术分析指标,用于预测交易市场的走势。

基本公式如下:
1.计算当前价格与前一个价格的差值△P,若为正,则为向上画笔,反之,则为向下画笔。

2.计算当前价格的波动幅度△R,即最高价与最低价之差。

3.计算当前价格到达画笔起点的时间间隔△T。

4.根据以下公式计算画笔中心线:
(1)若为向上画笔,则中心线为前一画笔中心线加上当前画笔波动幅度的一半,即:
中心线=Pn-1+(△R/2)
(2)若为向下画笔,则中心线为前一画笔中心线减去当前画笔波动幅度的一半,即:
中心线=Pn-1-(△R/2)
5.计算画笔宽度,即画笔波动幅度的一半。

6.根据以上步骤,可以得出每个画笔的起点、中心线、宽度和方向,以帮助交易者进行预测和决策。

温馨提示:以上公式仅供参考,实际应用需要根据具体情况进行调整和优化。

缠中说禅主图三角形中枢划线主图指标通达信指标公式源码

缠中说禅主图三角形中枢划线主图指标通达信指标公式源码

主图源码:{三角形中枢}时间:=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);CC1:DRAWLINE(A,H,B,L,0);CC2:DRAWLINE(B,L,A,H,0);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) 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,COLORLIMAGENTA;C1:DRAWLINE(极点保留=-1,局部极点,极点保留=1,局部极点,0),COLORLIGRAY;C2:DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0),COLORLIGRAY;极顶:=IF(N=1,C2=C1 AND 局部高点预选A AND 极点保留=1,DRAWNULL);极底:=IF(N=1,C2=C1 AND 局部低点预选A AND 极点保留=-1,DRAWNULL);A1:=BARSLAST(极顶);B1:=CURRBARSCOUNT=CONST(A1)+1;D1:=BARSLAST(B1);高1:=CONST(REF(H,D1));A2:=REF(A1,A1+1)+A1+1;B2:=CURRBARSCOUNT=CONST(A2)+1;D2:=BARSLAST(B2);高2:=CONST(REF(H,D2));A3:=REF(A2,A1+1)+A1+1;B3:=CURRBARSCOUNT=CONST(A3)+1;D3:=BARSLAST(B3);高3:=CONST(REF(H,D3));DA1:=BARSLAST(极底);DB1:=CURRBARSCOUNT=CONST(DA1)+1;DD1:=BARSLAST(DB1);低1:=CONST(REF(L,DD1));DA2:=REF(DA1,DA1+1)+DA1+1;DB2:=CURRBARSCOUNT=CONST(DA2)+1;DD2:=BARS LAST(DB2);低2:=CONST(REF(L,DD2));DA3:=REF(DA2,DA1+1)+DA1+1;DB3:=CURRBARSCOUNT=CONST(DA3)+1;DD3:=BARS LAST(DB3);低3:=CONST(REF(L,DD3));三角型放大A:=低1<低2 AND 高2>高1 AND DA2>A1 AND A1>DA1 AND A2>DA2 AND CONST(C)>低2;中枢A1:=IF(三角型放大A AND CONST(C)<高1,DB2,DRAWNULL);STICKLINE(中枢A1,CONST(C),低2,0,0),COLORLIMAGENTA;中枢A2:=IF(三角型放大A AND CONST(C)<高1,ISLASTBAR,DRAWNULL); STICKLINE(中枢A2,CONST(C),低2,0,0),COLORLIMAGENTA;DRAWLINE(中枢A1=1,CONST(C),中枢A2=1,CONST(C),0),DOTLINE,COLORLIMAGENTA; DRAWLINE(中枢A1=1,低2,中枢A2=1,低2,0),COLORLIMAGENTA;{成立}中枢AC1:=IF(三角型放大A AND CONST(C)>=高1,DB2,DRAWNULL);STICKLINE(中枢AC1,高1,低1,0,0),COLORLIMAGENTA;中枢AC2:=IF(三角型放大A AND CONST(C)>=高1,ISLASTBAR,DRAWNULL); STICKLINE(中枢AC2,高1,低1,0,0),COLORLIMAGENTA;DRAWLINE(中枢AC1=1,高1,中枢AC2=1,高1,0),COLORLIMAGENTA;DRAWLINE(中枢AC1=1,低1,中枢AC2=1,低1,0),COLORLIMAGENTA;三角型放大B:=低1>低2 AND 高1>高2 AND DA1>A1 AND A2>DA1 AND DA2>A2 AND CONST(C)<高2;中枢B1:=IF(三角型放大B AND CONST(C)>低1,B2,DRAWNULL);STICKLINE(中枢B1,CONST(C),高2,0,0),COLORGREEN;中枢B2:=IF(三角型放大B AND CONST(C)>低1,ISLASTBAR,DRAWNULL); STICKLINE(中枢B2,CONST(C),高2,0,0),COLORGREEN;DRAWLINE(中枢B1=1,高2,中枢B2=1,高2,0),COLORGREEN;DRAWLINE(中枢B1=1,CONST(C),中枢B2=1,CONST(C),0),DOTLINE,COLORGREEN; {成立}中枢BC1:=IF(三角型放大B AND CONST(C)<=低1,B2,DRAWNULL);STICKLINE(中枢BC1,高2,低1,0,0),COLORGREEN;中枢BC2:=IF(三角型放大B AND CONST(C)<=低1,ISLASTBAR,DRAWNULL); STICKLINE(中枢BC2,高2,低1,0,0),COLORGREEN;DRAWLINE(中枢BC1=1,高2,中枢BC2=1,高2,0),COLORGREEN;DRAWLINE(中枢BC1=1,低1,中枢BC2=1,低1,0),COLORGREEN;三角型收敛A:=低1>低2 AND 高2>高1 AND DA2>A1 AND A1>DA1 AND A2>DA2 AND CONST(C)>低1;中枢C1:=IF(三角型收敛A AND CONST(C)<高1,DB2,DRAWNULL);STICKLINE(中枢C1,CONST(C),低1,0,0),COLORYELLOW;中枢C2:=IF(三角型收敛A AND CONST(C)<高1,ISLASTBAR,DRAWNULL); STICKLINE(中枢C2,CONST(C),低1,0,0),COLORYELLOW;DRAWLINE(中枢C1=1,CONST(C),中枢C2=1,CONST(C),0),DOTLINE,COLORYELLOW; DRAWLINE(中枢C1=1,低1,中枢C2=1,低1,0),COLORYELLOW;{成立}中枢CC1:=IF(三角型收敛A AND CONST(C)>=高1,DB2,DRAWNULL);STICKLINE(中枢CC1,高1,低1,0,0),COLORYELLOW;中枢CC2:=IF(三角型收敛A AND CONST(C)>=高1,ISLASTBAR,DRAWNULL); STICKLINE(中枢CC2,高1,低1,0,0),COLORYELLOW;DRAWLINE(中枢CC1=1,高1,中枢CC2=1,高1,0),COLORYELLOW;DRAWLINE(中枢CC1=1,低1,中枢CC2=1,低1,0),COLORYELLOW;三角型收敛B:=低1>低2 AND 高1<高2 AND DA1>A1 AND A2>DA1 AND DA2>A2 AND CONST(C)<高1;中枢D1:=IF(三角型收敛B AND CONST(C)>低1,B2,DRAWNULL);STICKLINE(中枢D1,CONST(C),高1,0,0),COLORLICYAN;中枢D2:=IF(三角型收敛B AND CONST(C)>低1,ISLASTBAR,DRAWNULL); STICKLINE(中枢D2,CONST(C),高1,0,0),COLORLICYAN;DRAWLINE(中枢D1=1,高1,中枢D2=1,高1,0),COLORLICYAN;DRAWLINE(中枢D1=1,CONST(C),中枢D2=1,CONST(C),0),DOTLINE,COLORLICYAN; {成立}中枢DC1:=IF(三角型收敛B AND CONST(C)<=低1,B2,DRAWNULL);STICKLINE(中枢DC1,高1,低1,0,0),COLORLICYAN;中枢DC2:=IF(三角型收敛B AND CONST(C)<=低1,ISLASTBAR,DRAWNULL); STICKLINE(中枢DC2,高1,低1,0,0),COLORLICYAN;DRAWLINE(中枢DC1=1,高1,中枢DC2=1,高1,0),COLORLICYAN; DRAWLINE(中枢DC1=1,低1,中枢DC2=1,低1,0),COLORLICYAN;。

【炒股必看】同花顺缠论分笔及中枢主图指标公式

【炒股必看】同花顺缠论分笔及中枢主图指标公式

同花顺缠论分笔及中枢主图指标公式KU1:=IF(HIGH=HHV(HIGH,3),1,0);KD1:=IF(LOW=LLV(LOW,3),1,0);UL:=IF(REF(KU1,2)=1 AND REF(KU1,1)=0AND KU1=0,REF(HIGH,2),REF(HIGH,2+BARSLAST(REF(KU1,2)=1AND REF(KU1,1)=0 AND KU1=0)));DL:=IF(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0,REF(LOW,2),REF(LOW,2+BARSLAST(REF(KD1,2)=1AND REF(KD1,1)=0 AND KD1=0)));HV:=H>UL AND H>REF(H,1) ;LV:=L<DL AND L<REF(L,1) ;GP:=BARSLAST(HV);DP:=BARSLAST(LV);IP:=IF(GP=0,DP,GP)>3;HV1:=HV AND IP AND H>=HHV(H,BARSLAST(LV));LV1:=LV AND IP AND L<=LLV(L,BARSLAST(HV));DRAWLINE(LV1,LOW,HV1, HIGH,0),coloryellow,LINETHICK2;DRAWLINE(HV1,HIGH,LV1, LOW,0),colormagenta,LINETHICK2;///加入中枢判定//简化版N1:=10;N2:=10;DISP:=2;K:=1;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 AND TJ2 AND 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)) AND ZD<REF(ZD,REF(BARSLAST(TJ4),1));TJ8:=TJ4 AND NOT(TJ5 OR TJ6 OR TJ7);ZSD:=IF(TJ8,ZD,REF(ZD,1));//,coloryellow;ZSG:=IF(TJ8,ZG,REF(ZG,1));//,colormagenta;ZSH:=IF(TJ8,HH,REF(HH,1));//,colorblue;ZSL:=IF(TJ8,LL,REF(LL,1));//,colorgreen;STICKLINE(TJ8,ZSH,ZSL,0,-1),colormagenta;STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),colormagenta;DRAWTEXT(DISP=2,ZSH,''),colorwhite;//中枢高中枢高:ZSG,colormagenta;POLYLINE(DISP=2,REF(ZSG,BARSLAST(TJ8))),CIRCLEDOT,colormagenta;//中枢低:中枢低:ZSD,coloryellow;POLYLINE(DISP=2,REF(ZSD,BARSLAST(TJ8))),CIRCLEDOT,coloryellow;//中枢最高:中枢最高:ZSH,colorred;POLYLINE(DISP=2,REF(ZSH,BARSLAST(TJ8))),POINTDOT,colorred;//中枢最低:中枢最低:ZSL,colorgreen;POLYLINE(DISP=2,REF(ZSL,BARSLAST(TJ8))),POINTDOT,colorgreen;//趋势高://QSGD1:POLYLINE(DISP=3,ZIG(1,K*N1)),colorblue;//趋势低://QSDD1:POLYLINE(DISP=3,ZIG(2,K*N2)),colorblue;MA5:MA(CLOSE,5),COLORFF00FF,Linethick1;//COLORFF00FF,LINETHICK2;命真好:=MA5>REF(MA5,1);命真坏:=MA5<REF(MA5,1);//判定:PARTLINE(MA5,命真好,coloryellow,命真坏,colorblue,MA5,COLORFF00FF),linethick3;//F1:IF(MA5<REF(MA5,1),MA5,NULL),colorwhite,LINETHICK2;。

缠论中枢划线主图指标公式-优化后

缠论中枢划线主图指标公式-优化后

KU1:=IF(HIGH=HHV(HIGH,3),1,0);KD1:=IF(LOW=LLV(LOW,3),1,0);UL:=IF(REF(KU1,2)=1 AND REF(KU1,1)=0AND KU1=0,REF(HIGH,2),REF(HIGH,2+BARSLAST(REF(KU1,2)=1AND REF(KU1,1)=0 AND KU1=0)));DL:=IF(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0,REF(LOW,2),REF(LOW,2+BARSLAST(REF(KD1,2)=1AND REF(KD1,1)=0 AND KD1=0)));HV:=H>UL AND H>REF(H,1) ;LV:=L<DL AND L<REF(L,1) ;GP:=BARSLAST(HV);DP:=BARSLAST(LV);IP:=IF(GP=0,DP,GP)>3;HV1:=HV AND IP AND H>=HHV(H,BARSLAST(LV));LV1:=LV AND IP AND L<=LLV(L,BARSLAST(HV));DRAWLINE(LV1,LOW,HV1, HIGH,0),COLORYELLOW,LINETHICK2;DRAWLINE(HV1,HIGH,LV1, LOW,0),COLORMAGENTA,LINETHICK2;N1:=10;N2:=10;DISP:=2;K:=1;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 AND TJ2 AND 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)) AND ZD<REF(ZD,REF(BARSLAST(TJ4),1));TJ8:=TJ4 AND NOT(TJ5 OR TJ6 OR TJ7);ZSD:=IF(TJ8,ZD,REF(ZD,1));ZSG:=IF(TJ8,ZG,REF(ZG,1));ZSH:=IF(TJ8,HH,REF(HH,1));ZSL:=IF(TJ8,LL,REF(LL,1));STICKLINE(TJ8,ZSH,ZSL,0,-1);STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),COLORMAGENTA;DRAWTEXT(DISP=2,ZSH,''),COLORWHITE;中枢高:ZSG,COLORMAGENTA;IF(DISP=2,REF(ZSG,BARSLAST(TJ8)),DRAWNULL),CIRCLEDOT,COLORMAGENTA; 中枢低:ZSD,COLORYELLOW;IF(DISP=2,REF(ZSD,BARSLAST(TJ8)),DRAWNULL),CIRCLEDOT,COLORYELLOW; 中枢最高:ZSH,COLORRED;IF(DISP=2,REF(ZSH,BARSLAST(TJ8)),DRAWNULL),POINTDOT,COLORRED;中枢最低:ZSL,COLORGREEN;IF(DISP=2,REF(ZSL,BARSLAST(TJ8)),DRAWNULL),POINTDOT,COLORGREEN; MA5:MA(CLOSE,5),COLORFF00FF,LINETHICK1;命真好:=MA5>REF(MA5,1);命真坏:=MA5<REF(MA5,1);DRAWBAND(MA5,RGB(255,96,96),REF(MA5,1),RGB(0,224,224));。

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

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

通达信缠论、笔、分型指标公式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,低点重叠,'_____');通达信缠论、笔、分型指标公式的选股公式如下:。

缠论中枢划线(笔和线段)主图指标公式-优化后

缠论中枢划线(笔和线段)主图指标公式-优化后

KU1:=IF(HIGH=HHV(HIGH,3),1,0);KD1:=IF(LOW=LLV(LOW,3),1,0);UL:=IF(REF(KU1,2)=1 AND REF(KU1,1)=0AND KU1=0,REF(HIGH,2),REF(HIGH,2+BARSLAST(REF(KU1,2)=1AND REF(KU1,1)=0 AND KU1=0)));DL:=IF(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0,REF(LOW,2),REF(LOW,2+BARSLAST(REF(KD1,2)=1AND REF(KD1,1)=0 AND KD1=0)));HV:=H>UL AND H>REF(H,1) ;LV:=L<DL AND L<REF(L,1) ;GP:=BARSLAST(HV);DP:=BARSLAST(LV);IP:=IF(GP=0,DP,GP)>3;HV1:=HV AND IP AND H>=HHV(H,BARSLAST(LV));LV1:=LV AND IP AND L<=LLV(L,BARSLAST(HV));DRAWLINE(LV1,LOW,HV1, HIGH,0),COLORYELLOW,LINETHICK2;DRAWLINE(HV1,HIGH,LV1, LOW,0),COLORMAGENTA,LINETHICK2;N1:=10;N2:=10;DISP:=2;K:=1;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 AND TJ2 AND 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)) AND ZD<REF(ZD,REF(BARSLAST(TJ4),1)); TJ8:=TJ4 AND NOT(TJ5 OR TJ6 OR TJ7);ZSD:=IF(TJ8,ZD,REF(ZD,1));ZSG:=IF(TJ8,ZG,REF(ZG,1));ZSH:=IF(TJ8,HH,REF(HH,1));ZSL:=IF(TJ8,LL,REF(LL,1));STICKLINE(TJ8,ZSH,ZSL,0,-1);STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),COLORMAGENTA;DRAWTEXT(DISP=2,ZSH,''),COLORWHITE;中枢高:ZSG,COLORMAGENTA;IF(DISP=2,REF(ZSG,BARSLAST(TJ8)),DRAWNULL),CIRCLEDOT,COLORMAGENTA; 中枢低:ZSD,COLORYELLOW;IF(DISP=2,REF(ZSD,BARSLAST(TJ8)),DRAWNULL),CIRCLEDOT,COLORYELLOW; 中枢最高:ZSH,COLORRED;IF(DISP=2,REF(ZSH,BARSLAST(TJ8)),DRAWNULL),POINTDOT,COLORRED;中枢最低:ZSL,COLORGREEN;IF(DISP=2,REF(ZSL,BARSLAST(TJ8)),DRAWNULL),POINTDOT,COLORGREEN;MA5:MA(CLOSE,5),COLORFF00FF,LINETHICK1;命真好:=MA5>REF(MA5,1);命真坏:=MA5<REF(MA5,1);DRAWBAND(MA5,RGB(255,96,96),REF(MA5,1),RGB(0,224,224));。

同花顺缠中说禅中枢划线公式

同花顺缠中说禅中枢划线公式

同花顺缠中说禅中枢划线公式以下是同花顺缠中说禅中枢划线公式(无源码的请下载附件导入)同花顺缠中说禅中枢划线公式KU1:=IF(HIGH=HHV(HIGH,3),1,0);KD1:=IF(LOW=LLV(LOW,3),1,0);UL:=IF(REF(KU1,2)=1 AND REF(KU1,1)=0ANDKU1=0,REF(HIGH,2),REF(HIGH,2+BARSLAST(REF(KU1,2)=1 AND REF(KU1,1)=0 AND KU1=0)));DL:=IF(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0,REF(LOW,2),REF(LOW,2+BARSLAST(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0)));HV:=H>UL AND H>REF(H,1) ;LV:=L<DL AND L<REF(L,1) ;GP:=BARSLAST(HV);DP:=BARSLAST(LV);IP:=IF(GP=0,DP,GP)>3;HV1:=HV AND IP AND H>=HHV(H,BARSLAST(LV));LV1:=LV AND IP AND L<=LLV(L,BARSLAST(HV));DRAWLINE(LV1,LOW,HV1, HIGH,0),coloryellow,LINETHICK2;DRAWLINE(HV1,HIGH,LV1,LOW,0),colormagenta,LINETHICK2;///加入中枢判定//简化版N1:=10;N2:=10;DISP:=2;K:=1;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 AND TJ2 AND NOT(TJ3);TJ5:=BETWEEN(ZD,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,RE F(BARSLAST(TJ4),1)));TJ6:=BETWEEN(ZG,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,RE F(BARSLAST(TJ4),1)));TJ7:=ZG>REF(ZG,REF(BARSLAST(TJ4),1)) AND ZD<REF(ZD,REF(BARSLAST(TJ4),1));TJ8:=TJ4 AND NOT(TJ5 OR TJ6 OR TJ7);ZSD:=IF(TJ8,ZD,REF(ZD,1));//,coloryellow;ZSG:=IF(TJ8,ZG,REF(ZG,1));//,colormagenta;ZSH:=IF(TJ8,HH,REF(HH,1));//,colorblue;ZSL:=IF(TJ8,LL,REF(LL,1));//,colorgreen;STICKLINE(TJ8,ZSH,ZSL,0,-1),colormagenta;STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),colormagenta;DRAWTEXT(DISP=2,ZSH,''),colorwhite;//中枢高中枢高:ZSG,colormagenta;POLYLINE(DISP=2,REF(ZSG,BARSLAST(TJ8))),CIRCLEDOT,colormagenta;//中枢低:中枢低:ZSD,coloryellow;POLYLINE(DISP=2,REF(ZSD,BARSLAST(TJ8))),CIRCLEDOT,colo ryellow;//中枢最高:中枢最高:ZSH,colorred;POLYLINE(DISP=2,REF(ZSH,BARSLAST(TJ8))),POINTDOT,colo rred;//中枢最低:中枢最低:ZSL,colorgreen;POLYLINE(DISP=2,REF(ZSL,BARSLAST(TJ8))),POINTDOT,color green;//趋势高://QSGD1:POLYLINE(DISP=3,ZIG(1,K*N1)),colorblue;//趋势低://QSDD1:POLYLINE(DISP=3,ZIG(2,K*N2)),colorblue;MA5:MA(CLOSE,5),COLORFF00FF,Linethick1;//COLORFF00FF,LINETHICK2;命真好:=MA5>REF(MA5,1);命真坏:=MA5<REF(MA5,1);//判定:PARTLINE(MA5,命真好,coloryellow,命真坏,colorblue,MA5,COLORFF00FF),linethick3;//F1:IF(MA5<REF(MA5,1),MA5,NULL),colorwhite,LINETHICK 2;。

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

KU1:=IF(HIGH=HHV(HIGH,3),1,0);
KD1:=IF(LOW=LLV(LOW,3),1,0);
UL:=IF(REF(KU1,2)=1 AND REF(KU1,1)=0
AND KU1=0,REF(HIGH,2),REF(HIGH,2+BARSLAST(REF(KU1,2)=1
AND REF(KU1,1)=0 AND KU1=0)));
DL:=IF(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0,REF(LOW,2),REF(LOW,2+BARSLAST(REF(KD1,2)=1
AND REF(KD1,1)=0 AND KD1=0)));
HV:=H>UL AND H>REF(H,1) ;
LV:=L<DL AND L<REF(L,1) ;
GP:=BARSLAST(HV);
DP:=BARSLAST(LV);
IP:=IF(GP=0,DP,GP)>3;
HV1:=HV AND IP AND H>=HHV(H,BARSLAST(LV));
LV1:=LV AND IP AND L<=LLV(L,BARSLAST(HV));
DRAWLINE(LV1,LOW,HV1, HIGH,0),COLORYELLOW,LINETHICK2;
DRAWLINE(HV1,HIGH,LV1, LOW,0),COLORMAGENTA,LINETHICK2;
N1:=10;N2:=10;DISP:=2;K:=1;
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 AND TJ2 AND 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)) AND ZD<REF(ZD,REF(BARSLAST(TJ4),1));
TJ8:=TJ4 AND NOT(TJ5 OR TJ6 OR TJ7);
ZSD:=IF(TJ8,ZD,REF(ZD,1));
ZSG:=IF(TJ8,ZG,REF(ZG,1));
ZSH:=IF(TJ8,HH,REF(HH,1));
ZSL:=IF(TJ8,LL,REF(LL,1));
STICKLINE(TJ8,ZSH,ZSL,0,-1);
STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),COLORMAGENTA;
DRAWTEXT(DISP=2,ZSH,''),COLORWHITE;
中枢高:ZSG,COLORMAGENTA;
IF(DISP=2,REF(ZSG,BARSLAST(TJ8)),DRAWNULL),CIRCLEDOT,COLORMAGENTA; 中枢低:ZSD,COLORYELLOW;
IF(DISP=2,REF(ZSD,BARSLAST(TJ8)),DRAWNULL),CIRCLEDOT,COLORYELLOW; 中枢最高:ZSH,COLORRED;
IF(DISP=2,REF(ZSH,BARSLAST(TJ8)),DRAWNULL),POINTDOT,COLORRED;
中枢最低:ZSL,COLORGREEN;
IF(DISP=2,REF(ZSL,BARSLAST(TJ8)),DRAWNULL),POINTDOT,COLORGREEN; MA5:MA(CLOSE,5),COLORFF00FF,LINETHICK1;
命真好:=MA5>REF(MA5,1);
命真坏:=MA5<REF(MA5,1);
DRAWBAND(MA5,RGB(255,96,96),REF(MA5,1),RGB(0,224,224));。

相关文档
最新文档