通达信缠论画笔、画线段公式(更新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)=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)=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),COLORMAGENT A;DRAWTEXT(DISP=2,ZSH,''),COLORWHITE;中枢高:ZSG,COLORMAGENTA;IF(DISP=2,REF(ZSG,BARSLAST(TJ8)),DRAWNULL),CIRCLEDO T,COLORMAGENTA;中枢低:ZSD,COLORYELLOW;IF(DISP=2,REF(ZSD,BARSLAST(TJ8)),DRAWNULL),CIRCLEDO T,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,22 4));。
目前最准确的通达信缠论分笔公式
目前最准确的通达信缠论分笔公式-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;};。
通达信顶级自动画线公式,可以叠加任何主图
通达信顶级自动画线公式,可以叠加任何主图A1:=REF(H,8)=HHV(H,2*8+1);B1:=FILTER(A1,8);C1:=BACKSET(B1,8+1);D1:=FILTER(C1,8);{高点}R11:=BACKSET(ISLASTBAR,BARSLAST(D1)+1);S11:=R11>REF(R11,1);DRAWLINE(D1,H,S11,H,1),COLORBLUE;A2:=REF(L,8)=LLV(L,2*8+1);B2:=FILTER(A2,8);C2:=BACKSET(B2,8+1);D2:=FILTER(C2,8);{低点}T11:=BACKSET(ISLASTBAR,BARSLAST(D2)+1);U11:=T11>REF(T11,1);DRAWLINE(D2,L,U11,L,1),COLORBLUE;M:=INTPART(3*8/5);A12:=REF(H,M)=HHV(H,2*M+1);B12:=FILTER(A12,M);C12:=BACKSET(B12,M+1);D12:=FILTER(C12,M);{高点}R112:=BACKSET(ISLASTBAR,BARSLAST(D12)+1); S112:=R112>REF(R112,1);DRAWLINE(D12,H,S112,H,1),COLORRED;A22:=REF(L,M)=LLV(L,2*M+1);B22:=FILTER(A22,M);C22:=BACKSET(B22,M+1);D22:=FILTER(C22,M);{低点}T112:=BACKSET(ISLASTBAR,BARSLAST(D22)+1); U112:=T112>REF(T112,1);DRAWLINE(D22,L,U112,L,1),COLORRED;VAR1111:=BACKSET(REF(HIGH,2)=HHV(HIGH,5),3);VAR2222:=CROSS(VAR1111,0.9);VAR3333:=BACKSET(REF(LOW,2)=LLV(LOW,5),3);VAR4444:=CROSS(VAR3333,0.9);压力:= REF(HIGH,BARSLAST(VAR2222));STICKLINE(CLOSE,REF(HIGH,BARSLAST(VAR2222)),REF(HIGH ,BARSLAST(VAR2222)),0.5,1),COLOREA91B5,LINETHICK3;支撑:= REF(LOW,BARSLAST(VAR4444));STICKLINE(CLOSE,REF(LOW,BARSLAST(VAR4444)),REF(LOW, BARSLAST(VAR4444)),0.5,1),COLOR00B4FF,LINETHICK3;下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100);RRRSV:=SMA(下档线,3,1);KKK:=SMA(RRRSV,3,1);DDD:=((3 * RRRSV) - (2 * KKK));JJ12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100);RSV24:=SMA(JJ12,3,1);K24:=SMA(RSV24,3,1);D24:=((3 * RSV24) - (2 * K24));压力2:=IF(CROSS(D24,DDD),HIGH,REF(HIGH,BARSLAST(CROSS(D24, DDD)))),COLORFFFFFF;压力位:=IF(ISLASTBAR,压力2,DRAWNULL);STICKLINE(ISLASTBAR ,压力位,压力位,120,0),LINETHICK4,COLORFFFFFF;底部:=LLV(HIGH,30),COLOR00FF00;底部位:=IF(ISLASTBAR,底部,DRAWNULL);STICKLINE(ISLASTBAR ,底部位,底部位,100,0),LINETHICK4,COLOR00FF00;。
量学画线主图指标通达信公式(附图)
量学画线主图指标通达信公式(附图)均线数:=0;画线虚实:=1;显3121刻度:=0;显买卖点:=1;半分位:=(O+C)/2;峰边距:=5;回踩误差千分之:=2;画将1黄2元3全4:=2;精准计数周期:=240;低1开2收3高4:=1;基准点前N天:=0;昨半分位:=REF(半分位,1);STICKLINE(ISLASTBAR,昨半分位,昨半分位,10,0);DRAWTEXT(ISLASTBAR,昨半分位,' 昨半分位');{原文链接:/THREAD-4885579-1-1.HTML};X_1:=1991015;X_2:=TESTSKIP(DATE>X_1);STICKLINE(REF(LOW,1)>HIGH,HIGH,REF(LOW,1),5,0),COLOR GRAY;STICKLINE(REF(HIGH,1)<LOW,LOW,REF(HIGH,1),5,0),COLOR GRAY;DRAWTEXT_FIX(ISLASTBAR,0,0,0,HYBLOCK);DRAWTEXT_FIX(ISLASTBAR,0.05,0,0,DYBLOCK);DRAWTEXT_FIX(ISLASTBAR,0.1,0,0,GNBLOCK);DRAWTEXT_FIX(ISLASTBAR,0,0.045,0,FGBLOCK),COLORGREE N;X_3:=240;X_4:=CONST(HHV(REF(HIGH,1),X_3));X_5:=CONST(LLV(REF(LOW,1),X_3));X_6:=X_4-X_5;X_7:=LOW-X_6*0.03;X_8:=HIGH+X_6*0.03;X_9:=CLOSE>500;X_10:=MAX(CLOSE,OPEN);X_11:=MIN(CLOSE,OPEN);X_12:=基准点前N天;X_13:=画线虚实;X_14:=IF(X_9,HIGH,X_10);X_15:=IF(X_9,LOW,X_11);X_16:=IF(CLOSE>OPEN,IF(X_13=0,LOW,X_15),IF(X_13=0,HIG H,X_14));X_17:=回踩误差千分之/1000;X_18:=CURRBARSCOUNT;X_19:=精准计数周期;X_20:=X_18<=X_19;X_21:=IF(低1开2收3高4=1,LOW,IF(低1开2收3高4=2,OPEN,IF(低1开2收3高4=3,CLOSE,HIGH)));X_22:=IF(基准点前N天=0,X_21,REF(X_21,基准点前N天));WEN98编_基准价:IF(X_20,CONST(X_22),DRAWNULL),DOTLINE,COLORLIGRAY;X_23:=WEN98编_基准价;X_24:=X_23*X_17;X_25:=ABS(LOW-X_23)<=X_24;X_26:=ABS(OPEN-X_23)<=X_24;X_27:=ABS(CLOSE-X_23)<=X_24;X_28:=ABS(HIGH-X_23)<=X_24;X_29:=X_25 OR X_26 OR X_27 OR X_28 AND X_20 AND X_18!=基准点前N天+1;X_30:=COUNT(X_29,X_19);精准点个数:IF(X_30>0,X_30+1,0),NODRAW,COLORMAGENTA;X_31:=峰边距;X_32:=REF(HIGH,X_31)=HHV(HIGH,2*X_31+1);X_33:=FILTER(X_32,X_31);X_34:=BACKSET(X_33,X_31+1);X_35:=FILTER(X_34,X_31);X_36:=REF(HIGH,BARSLAST(X_35));X_37:=REF(MAX(CLOSE,OPEN),X_31)=HHV(MAX(CLOSE,OPE N),2*X_31+1);X_38:=FILTER(X_37,X_31);X_39:=BACKSET(X_38,X_31+1);X_40:=FILTER(X_39,X_31);X_41:=REF(MAX(CLOSE,OPEN),BARSLAST(X_40));X_42:=REF(LOW,X_31)=LLV(LOW,2*X_31+1);X_43:=FILTER(X_42,X_31);X_44:=BACKSET(X_43,X_31+1);X_45:=FILTER(X_44,X_31);X_46:=REF(LOW,BARSLAST(X_45));X_47:=REF(MIN(CLOSE,OPEN),X_31)=LLV(MIN(CLOSE,OPEN) ,2*X_31+1);X_48:=FILTER(X_47,X_31);X_49:=BACKSET(X_48,X_31+1);X_50:=FILTER(X_49,X_31);X_51:=REF(MIN(CLOSE,OPEN),BARSLAST(X_50));X_52:=IF(画线虚实=0,X_36,X_41);X_53:=IF(画线虚实=0,X_46,X_51);STICKLINE(X_52=REF(X_52,1) AND 峰边距>0,X_52,X_52,5,0),COLOR990099;STICKLINE(X_53=REF(X_53,1) AND 峰边距>0,X_53,X_53,5,0),COLOR009900;K中:(HIGH+LOW)/2,NODRAW,COLORYELLOW;X_54:=MA(CLOSE,5);MA5角度:ATAN((X_54/REF(X_54,1)-1)*100)*180/3.1416,NODRAW;X_55:=均线数;年线250:IF(X_55>=6 AND X_55<7,MA(CLOSE,250),DRAWNULL),COLORBLUE;趋势120:IF(X_55>=5 AND X_55<7,MA(CLOSE,120),DRAWNULL),COLORGRAY;决策60:IF(X_55>=4 AND X_55<7,MA(CLOSE,60),DRAWNULL),COLORGREEN;生命20:IF(X_55>=3 AND X_55<7,MA(CLOSE,20),DRAWNULL),COLORLIRED;IF(X_55>=3 AND 生命20>=REF(生命20,1),生命20,DRAWNULL),COLORLIMAGENTA;操盘10:IF(X_55>=2 AND X_55<7,MA(CLOSE,10),DRAWNULL),COLORBROWN;攻击5:IF(X_55>=1 AND X_55<7,MA(CLOSE,5),DRAWNULL),COLORWHITE;IF(攻击5>REF(攻击5,1),攻击5,DRAWNULL),COLORMAGENTA;IF(操盘10>REF(操盘10,1),操盘10,DRAWNULL),COLORYELLOW;X_56:=FILTER(CROSS(KDJ.J,0) OR CROSS(KDJ.J,10),3);DRAWICON(显买卖点=1 AND X_56 AND CLOSE>REF(CLOSE,1),X_7-X_6*0.03,1);DRAWICON(显买卖点=1 AND CROSS(RSI.RSI1,20),X_7,1);X_57:=REF(HHV(IF(X_13=1,X_10,HIGH),2),1);X_58:=FILTER(CLOSE>X_57,1);X_59:=REF(LLV(IF(X_13=1,X_11,LOW),2),1);X_60:=FILTER(CLOSE<X_59,1);X_61:=X_58 AND COUNT(X_58,BARSLAST(X_60))=1 AND 显买卖点=1;X_62:=X_60 AND COUNT(X_60,BARSLAST(X_58))=1 AND 显买卖点=1;STICKLINE(X_62,X_59,X_59,18,(-1)),COLORGREEN;DRAWICON(X_62,X_8,39);STICKLINE(X_61,X_57,X_57,18,(-1)),COLORMAGENTA;DRAWICON(X_61,X_7,38);X_63:=1.01;X_64:=IF(X_13=1,MIN(CLOSE,OPEN),LOW);X_65:=VOL=REFX(HHV(VOL,8),3);X_66:=X_65 AND BETWEEN(VOL/REF(VOL,1),1.01,5);X_67:=VOL>REF(VOL,1);X_68:=CLOSE/REF(CLOSE,1)>=1.03 OR CLOSE/OPEN>=1.03;X_69:=CLOSE>OPEN OR CLOSE>REF(CLOSE,1);X_70:=CLOSE>REF(MAX(CLOSE,OPEN),1);X_71:=X_68;X_72:=RANGE(VOL/REF(VOL,1),0.966,1.034) AND BARSCOUNT(VOL)>=2;X_73:=X_70 AND REFX(X_72 AND COUNT(CLOSE>OPEN,2)=2,1);X_74:=BETWEEN(VOL/REF(VOL,1),1.01,4.99) AND X_69;X_75:=X_67 AND X_70;X_76:=REFX(COUNT(VOL>=REF(VOL,1) AND X_69,2)=2,2);X_77:=REFX(COUNT(BETWEEN(CLOSE/REF(CLOSE,1),1.001,1.04),2)=2,2);X_78:=X_66 OR X_71 OR X_73 OR X_74 OR X_75 OR X_76 OR X_77;X_79:=FILTER(X_69 AND X_78,0);X_80:=LLV(CLOSE,3)>=REF(MIN(CLOSE,OPEN),3);X_81:=1*(X_79 AND REFX(X_80,3));X_82:=EMA(VOL,3)<=REF(VOL,3)*1.03;X_83:=(EMA(VOL,3)-REF(VOL,3))/REF(VOL,3)<=(EMA(CLOSE,3)-REF(CLOSE,3))/REF(CLOSE,3);X_84:=X_82 OR X_83;X_85:=REFX(MIN(EMA(CLOSE,3),CLOSE),3)>=CLOSE;X_86:=1*(X_81 AND REFX(X_84,3) AND X_85);X_87:=COUNT(VOL<=REF(VOL,1),3)=3;X_88:=COUNT(CLOSE>=REF(CLOSE,1),3)=3;X_89:=COUNT(CLOSE>OPEN,4)=4;X_90:=X_87 AND X_88 AND X_89;X_91:=REFX(X_90,3);X_92:=MIN(CLOSE,OPEN)>REF(MAX(CLOSE,OPEN),1);X_93:=1*(X_69 AND REFX(X_86,1) AND MAX(CLOSE,OPEN)<REFX(OPEN,1));X_94:=画将1黄2元3全4;X_95:=BARSLAST(X_81 AND REF(X_81=0,1));X_96:=REF(X_64,X_95);X_97:=X_94=1 OR X_94=4;STICKLINE(X_97,X_96,X_96,3,0),COLORWHITE;X_98:=BARSLAST(X_86 AND REF(X_86=0,1));X_99:=REF(X_64,X_98);X_100:=X_94=2 OR X_94=4 OR X_94=5;STICKLINE(X_100,X_99,X_99,3,0),COLORYELLOW;X_101:=REF(LLV(X_64,3),X_98-3);STICKLINE(X_94=5,X_101,X_101,21,(-1)),COLORYELLOW;X_102:=BARSLAST(X_93 AND REF(X_93=0,1));X_103:=REF(MAX(CLOSE,OPEN),X_102);X_104:=X_94=3 OR X_94=4;STICKLINE(X_104,X_103,X_103,3,0),COLORLIRED;X_105:=ABS(X_36-X_23)<=X_24;X_106:=ABS(X_41-X_23)<=X_24;X_107:=FILTER(X_105 OR X_106,480) AND X_20;X_108:=ABS(X_46-X_23)<=X_24;X_109:=ABS(X_51-X_23)<=X_24;X_110:=FILTER(X_108 OR X_109,480) AND X_20;X_111:=COUNT(X_110,X_19) AND COUNT(X_107,X_19) AND X_18=15;DRAWLINE(X_107 AND 峰边距>0,X_23,1,X_23,0),COLORLIRED;DRAWLINE(X_110 AND 峰边距>0,X_23,1,X_23,0),COLORGREEN;DRAWLINE(X_111 AND 峰边距>0,X_23,1,X_23,1),COLORMAGENTA;X_112:=ABS(X_99-X_23)<=X_24;X_113:=ABS(X_101-X_23)<=X_24;X_114:=ABS(X_103-X_23)<=X_24;X_115:=FILTER(X_112 OR X_113 OR X_114,480) AND X_20;DRAWLINE(X_115,X_23,1,X_23,0),COLORBROWN;X_116:=REF(CLOSE,1);X_117:=IF(CLOSE>=1,10000,100000);X_118:=1.1*X_116-49/X_117;X_119:=1.05*X_116-49/X_117;X_120:=0.9*X_116+51/X_117;X_121:=0.95*X_116+51/X_117;X_122:=NAMELIKE(1) OR NAMELIKE(2);X_123:=IF(X_122,CLOSE>=X_119,CLOSE>=X_118);X_124:=IF(X_122,CLOSE<=X_121,CLOSE<=X_120);X_125:=IF(X_122,HIGH>=X_119,HIGH>=X_118);X_126:=IF(X_122,LOW<=X_121,LOW<=X_120);X_127:=CLOSE>OPEN AND (CLOSE>=X_119 OR CLOSE>1.05*OPEN-51/X_117) OR (CLOSE>1000 AND CLOSE>X_116*1.024);X_128:=CLOSE<OPEN AND (CLOSE<=X_121 OR CLOSE<0.95*OPEN+49/X_117) OR (CLOSE>1000 AND CLOSE<X_116*0.976);X_129:=BARSLAST(FILTER(X_127,3));X_130:=REF(X_16,X_129);阳底:IF(显3121刻度=2 AND REF(X_127,X_129) AND X_130=REF(X_130,1),X_130,DRAWNULL),DOTLINE,COLORYELLO W;X_131:=BARSLAST(FILTER(X_128,3));X_132:=REF(X_16,X_131);阴顶:IF(显3121刻度=2 AND REF(X_128,X_131) AND X_132=REF(X_132,1),X_132,DRAWNULL),DOTLINE,COLORGREEN;DRAWKLINE(HIGH,OPEN,LOW,CLOSE);STICKLINE(X_125,HIGH,MAX(CLOSE,OPEN),0,0),COLORMAG ENTA;STICKLINE(X_126,LOW,MIN(CLOSE,OPEN),0,0),COLORLICYA N;STICKLINE(X_127,OPEN,CLOSE,1,0),COLOR0000BB;STICKLINE(X_128,OPEN,CLOSE,1,0),COLORLIGREEN;STICKLINE(X_123,OPEN,CLOSE,1,0),COLORMAGENTA;STICKLINE(X_124,OPEN,CLOSE,1,0),COLORLICYAN;X_133:=CLOSE>OPEN AND CLOSE<X_116;STICKLINE(X_133,OPEN,CLOSE,0,0),COLORGREEN;X_134:=CLOSE<OPEN AND CLOSE>X_116;STICKLINE(X_134,OPEN,CLOSE,0,0),COLORRED;X_135:=AMOUNT/VOL/100;X_136:=CLOSE<OPEN AND X_135>REF(CLOSE,1) AND CLOSE<=X_116 AND X_135<=HIGH;STICKLINE(X_136,X_135,X_135,1,0),COLORRED;X_137:=PERIOD=5 AND NAMELIKE(10) AND (ABS(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)>=0.025 OR ABS(CLOSE-OPEN)>=60);X_138:=X_14-(X_14-X_15)/3;X_139:=X_15+(X_14-X_15)/3;X_140:=X_15+(X_14-X_15)/2;X_141:=1+IF(X_9,2,4.92)/100;X_142:=X_14/X_15>=X_141 OR CLOSE/REF(CLOSE,1)>=X_141;X_143:=显3121刻度=1 AND X_142;C31:IF(X_143,X_138,DRAWNULL),POINTDOT,COLORWHITE;C21:IF(X_143,X_140,DRAWNULL),POINTDOT,COLORWHITE;C32:IF(X_143,X_139,DRAWNULL),POINTDOT,COLORWHITE;X_144:=1;X_145:=显3121刻度=2 AND X_142;STICKLINE(X_145,X_138,X_138,X_144,0),COLORYELLOW;STICKLINE(X_145,X_140,X_140,X_144,0),COLORYELLOW;STICKLINE(X_145,X_139,X_139,X_144,0),COLORYELLOW;DRAWICON(X_18=基准点前N天+1,X_7,1);STICKLINE(X_29,X_23,X_23,3,1),COLORYELLOW;STICKLINE(X_18=基准点前N天+1,X_23,X_23,3,1),COLORYELLOW;X_146:=IF(X_13=0,BARSLAST(X_35)>0,BARSLAST(X_40)>0) AND (ABS(LOW-X_52)<=X_52*X_17 OR ABS(X_11-X_52)<=X_52*X_17);X_147:=IF(X_13=0,BARSLAST(X_45)>0,BARSLAST(X_50)>0)AND (ABS(LOW-X_53)<=X_53*X_17 OR ABS(X_11-X_53)<=X_53*X_17);STICKLINE(X_146,X_52,X_52,1,1),COLORYELLOW;STICKLINE(X_147,X_53,X_53,1,1),COLORYELLOW;。
缠论中枢划线(笔和线段)主图指标公式-优化后
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));。
通达信画线段公式
{DRAWTEXT(TZGQCFZ,HIGH*1.05,'去除高点')COLORMAGENTA;}
TZGQCHG1:=TZDQCHG AND TZGQCFZ=0;{特征高去除后低点,产生新高点序列记为TZGQCHG1};
{DRAWTEXT(BG,HIGH*1.05,'Y高点')COLORYELLOW;{测试高点}
{K线包含处理}
{前面顶部左侧K线第1根是否跟前一根重合}
顶前包含:=(REF(LOW,JQG+1)<=REF(LOW,JQG+2) AND REF(HIGH,JQG+1)>=REF(HIGH,JQG+2)) OR (REF(LOW,JQG+1)>=REF(LOW,JQG+2) AND REF(HIGH,JQG+1)<=REF(HIGH,JQG+2));
{前面底部的左侧第一根K线是否跟前一根重合}
底前包含:=(REF(LOW,JQD+1)<=REF(LOW,JQD+2) AND REF(HIGH,JQD+1)>=REF(HIGH,JQD+2)) OR (REF(LOW,JQD+1)>=REF(LOW,JQD+2) AND REF(HIGH,JQD+1)<=REF(HIGH,JQD+2));
GZD:=MAX(REF(LOW,JQG+1),REF(LOW,JQG+2));
DQGYC:=MAX(REFXV(LOW,1),REFXV(LOW,2) );{当前是顶分型,取低点最大值}
通达信手机版缠论画笔分析指标公式
通达信手机版缠论画笔分析指标公式本文档旨在介绍通达信手机版缠论画笔分析指标公式,包括其计算方法和应用。
该指标用于分析市场走势,并帮助投资者做出合理的买卖决策。
一、画笔分析指标公式概述画笔分析指标是缠论技术的一部分,通过分析市场价格形态的画笔特征来预测未来的走势。
该指标主要包含以下几个公式:1. 画笔长度公式:- 公式:P = H - L- 解释:P代表画笔的长度,H代表画笔的最高点价格,L代表画笔的最低点价格。
2. 画笔变化公式:- 公式:V = P1 / P2- 解释:V代表画笔变化的比率,P1代表当前画笔的长度,P2代表前一个画笔的长度。
3. 画笔斜率公式:- 公式:S = (H1 - H2) / (n * C)- 解释:S代表画笔的斜率,H1代表当前画笔的最高点价格,H2代表前一个画笔的最高点价格,n代表画笔的数量,C代表当前价格收盘价。
二、画笔分析指标公式的应用画笔分析指标的应用可以帮助投资者判断市场的趋势和买卖信号。
以下是几种常见的应用方法:1. 趋势判断:- 通过观察画笔长度和画笔变化比率,可以判断市场的趋势是上涨还是下跌。
2. 买卖信号:- 当画笔的斜率为正值时,表示市场处于上涨趋势,投资者可以考虑买入。
- 当画笔的斜率为负值时,表示市场处于下跌趋势,投资者可以考虑卖出。
3. 风险控制:- 投资者可以根据画笔分析指标的结果,合理控制投资风险,避免盲目买卖。
请注意,具体的应用方法应结合实际情况和个人风险承受能力进行综合判断。
结论通达信手机版缠论画笔分析指标公式是一种用于分析市场走势和辅助投资决策的指标。
掌握该指标的计算方法和应用可以帮助投资者更好地理解市场,并做出更准确的买卖决策。
【通达信】原创通达信版-缠论分笔分段公式(附:缠论公式编写教程,打造自己的缠论体系)
【通达信】原创通达信版-缠论分笔分段公式(附:缠论公式编写教程,打造自己的缠论体系)一切有为法,如梦幻泡影,如露亦如电,应作如是观。
本文开篇就以《金刚经》的偈语作序吧。
缠论大师很多,在下才疏学浅,不到之处敬请点拔。
另外声明一下,世间没有包赚钱的公式,只有适合的工具。
想通过一个什么包赚钱的价格几万的公式来稳赚不赔,那股市就没有输家了。
如果有缘份的话,本文最后将推出缠师最终没有告知大家的力度公式部分。
真正得缠者,为见相非相,即见如来。
通达信版公式,因为定义不了全局变量、数组,以及没有循环语句等功能,相比大智慧在公式编程方面差了不少。
但通达信的优势还是有的,在此推出一个通达信非DLL 版本的缠论分笔公式,并在后续的文章中逐步讲解如何通过程序,将缠论转化公式。
如果缠友仅想得到一公式而已,那就也无所谓细读本文。
但凡得道,靠的是觉悟和缘份,在此也就不细说了。
初学缠论的朋友也可以参考一些网站或专门的书籍,对阅读本文会有较大的帮助。
一、分形。
缠论集道氏、波浪、江恩学派于一体,结合浑沌理论,将K线形态以分形的方式进行规划,并以一套规则定义波浪起始点,以中枢的形式表达三角形调整(旗形、契形、钻石等形态,均是三角形形态的变种),以背驰的理论表述力度的衰竭。
理论指导实战,行之有效。
分形分二种,一是顶分型,另一是底分型。
分型也可以看成是酒田的三山形态,即中间K线高低点均高于二侧的,为顶分型,均低于二侧的,为底分形。
当一根K线高低点均在前一根K线价格之类,或者前一根K线高低点均在本根K线价格之类,称为包含关系。
在程序处理上,被前一根K线包含的,因为不可能作为分形的顶、底点,所以我们可以不进行处理。
如果是后一种包含关系,则观察前一根K线处于什么分形关态,如果前一根是顶分形,则本根向上取值,作为顶分形处理,反之则向下处理为底分形。
但这里有一个特殊情况,在不成笔的情况下,如果这根K线的前一分形状态为低分形,但本K线高点却已经超出了前一个顶分形的顶点,应将这根K线作为顶分形处理,反之亦然。
目前最好用的缠论画笔线段公式--通达信
目前最好用的缠论画笔线段公式--通达信kxian:="chanlun@kxian"; {初始化}kxg:="chanlun@kxg";kxd:="chanlun@kxd";bi:="chanlun@bi";duan:="chanlun@duan";duanfx:="chanlun@duanfx";{中枢笔构成的中枢}zs:="chanlun@zs";zsgg:="chanlun@zsgg";zsdd:="chanlun@zsdd";zszg:="chanlun@zszg";zszd:="chanlun@zszd";zszz:="chanlun@zszz";zskslast:="chanlun@zskslast";zsjslast:="chanlun@zsjslast";{以直线方式画中枢}{上涨中枢}DRAWLINE(zskslast=1 AND duanfx=1, zszg, zsjslast=1 AND duanfx=1, zszg, 0), colormagenta, linethick2;DRAWLINE(zskslast=1 AND duanfx=1, zszd, zsjslast=1 AND duanfx=1, zszd, 0), colormagenta, linethick2;STICKLINE(zskslast=1 AND duanfx=1, zszg, zszd, 1, -501), colormagenta, linethick2;STICKLINE(zsjslast=1 AND duanfx=1, zszg, zszd, 1, 501), colormagenta, linethick2;{下跌中枢}DRAWLINE(zskslast=1 AND duanfx=-1, zszg, zsjslast=1 ANDduanfx=-1, zszg, 0), colorCyan, linethick2;DRAWLINE(zskslast=1 AND duanfx=-1, zszd, zsjslast=1 AND duanfx=-1, zszd, 0), colorCyan, linethick2;STICKLINE(zskslast=1 AND duanfx=-1, zszg, zszd, 1, -501), colorCyan, linethick2;STICKLINE(zsjslast=1 AND duanfx=-1, zszg, zszd, 1, 501), colorCyan, linethick2;{中枢震荡监视器}DRAWLINE(zskslast=1, zszz, zsjslast=1, zszz, 0), coloryellow;{画中枢END}zslx:="chanlun@zslx"(duan);{走势类型中枢段构成的中枢}zslxzs:="chanlun@zslxzs";zslxzsgg:="chanlun@zslxzsgg";zslxzsdd:="chanlun@zslxzsdd";zslxzszg:="chanlun@zslxzszg";zslxzszd:="chanlun@zslxzszd";zslxzszz:="chanlun@zslxzszz";zslxzskslast:="chanlun@zslxzskslast";zslxzsjslast:="chanlun@zslxzsjslast";{画中枢Begin}DRAWLINE(zslxzskslast=1, zslxzszg, zslxzsjslast=1, zslxzszg, 0), colorGreen, linethick2;DRAWLINE(zslxzskslast=1, zslxzszd, zslxzsjslast=1, zslxzszd, 0), colorGreen, linethick2;STICKLINE(zslxzskslast=1, zslxzszg, zslxzszd, 1, -501), colorGreen, linethick2;STICKLINE(zslxzsjslast=1, zslxzszg, zslxzszd, 1, 501), colorGreen, linethick2;{中枢震荡监视器}DRAWLINE(zslxzskslast=1, zslxzszz, zslxzsjslast=1, zslxzszz, 0), colorGreen;{画中枢End}{高级别走势类型中枢本级别走势构成的中枢}zslxA:="chanlun@zslx"(zslx);zslxzsA:="chanlun@zslxzs";zslxzsggA:="chanlun@zslxzsgg";zslxzsddA:="chanlun@zslxzsdd";zslxzszgA:="chanlun@zslxzszg";zslxzszdA:="chanlun@zslxzszd";zslxzszzA:="chanlun@zslxzszz";zslxzskslastA:="chanlun@zslxzskslast";zslxzsjslastA:="chanlun@zslxzsjslast";{画中枢Begin}DRAWLINE(zslxzskslastA=1, zslxzszgA, zslxzsjslastA=1, zslxzszgA, 0), colorRed, linethick2;DRAWLINE(zslxzskslastA=1, zslxzszdA, zslxzsjslastA=1, zslxzszdA, 0), colorRed, linethick2;STICKLINE(zslxzskslastA=1, zslxzszgA, zslxzszdA, 1, -501), colorRed, linethick2;STICKLINE(zslxzsjslastA=1, zslxzszgA, zslxzszdA, 1, 501), colorRed, linethick2;{中枢震荡监视器}DRAWLINE(zslxzskslastA=1, zslxzszzA, zslxzsjslastA=1, zslxzszzA, 0), colorRed;{画中枢End}{笔段走势类型}drawline(bi=1, kxg, bi=-1, kxd, 0),colorYellow, linethick1;drawline(bi=-1, kxd, bi=1, kxg, 0),colorYellow, linethick1;drawline(duan=1, kxg, duan=-1, kxd, 0),colorBlue, linethick2;drawline(duan=-1, kxd, duan=1, kxg, 0),colorBlue, linethick2;drawline(zslx=1, kxg, zslx=-1, kxd, 0),colorRed, linethick2;drawline(zslx=-1, kxd, zslx=1, kxg, 0),colorRed, linethick2;drawline(zslxA=1, kxg, zslxA=-1, kxd, 0),colorMagenta, linethick2;drawline(zslxA=-1, kxd, zslxA=1, kxg, 0),colorMagenta, linethick2;。
【通达信】《缠中说禅》画笔、画线段指标公式(通达信、大智慧、操盘手源码)
【通达信】《缠中说禅》画笔、画线段指标公式(通达信、大
智慧、操盘手源码)
初学缠论的朋友,大部分同学都纠结与缠论的分笔、分段的划分,笔的新旧定义,跳空缺口等等都会让走势难以合理分解,使得对走势的分析学如不及,犹恐失之,
深怕因为分笔分段的错误而影响当下走势的判断。
缠论分笔分段公式的作用,就是避免繁重的画笔分段工作,非常便利对行情走势的分析,同时分笔分段的成功率达到95%以上,
只有极少数比较复杂的走势需要自己手动修正,方便、快捷、高效率
画笔公式的运用周期广泛,无论是日线,周线,月线,亦或是60分钟周期、30分钟、5分钟、还是1分钟,统统适用与分笔指标公式,适用于不同类型的投资者(短线,中线,长线皆可)。
下面是通达信版本的最近各大指数的分笔图形
上证日线
上证30分钟
上证5分钟
创业板30分钟
中小板30分钟
下面是大智慧版、操盘手版本的最近上证指数的分笔图形
上证30分钟
上证5分钟
注意:通达信版本画笔公式,无法画出中枢;大智慧和操盘手版本画笔指标可以画出中枢。
分笔不可能100%正确,但正确率在95%以上,只有极少数需要手动修正!。
通达信缠论、笔、分型指标公式
通达信缠论、笔、分型指标公式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,低点重叠,'_____');通达信缠论、笔、分型指标公式的选股公式如下:。
通达信自动划线主图指标公式
通达信自动划线主图指标公式通达信自动划线主图指标公式HIGHN:=10;LOWN:=10;HIGHDISPLAY:=0;LOWDISPLAY:=0;Z GDISPLAY:=0;MADISPLAY:=0;AAB:=REF(H,HIGHN)=HHV(H,2*HIGHN+1);{HIGHN日前的最高价=2*HIGHN+1日内最高价的最高值}QY:=BACKSET(AAB,HIGHN+1);{若AA则将最近HIGHN+1周期置为1}CC:=FILTER(QY,HIGHN) AND H=HHV(H,HIGHN+1);{QY的HIGHN日过滤AND 最高价=HIGHN+1日内最高价的最高值}DRAWICON(CC,H*1.02,2);DDD:=BARSLAST(CC);{上次CC距今天数}GDTS:=IF(CC,CURRBARSCOUNT,0);{如果CC,返回到最后交易日的周,否则返回0}DINGBU:=IF(DDD,REF(H,DDD),H);{顶部}DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);DINGBU1:=REF(DINGBU,DDD+1);GDCS1:=CONST(DINGBUTS);DINGBUTS1:=REF(DINGBUTS,DDD+1);GDCS2:=CONST(DINGBUTS1);DINGBU2:=REF(DINGBU1,DDD+1);MMM:=IF(CURRBARSCOUNT>GDCS2,0,1);高点压力:DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT= GDCS1,H,1) COLORGREEN,DOTLINE;压力A:DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H,G DCS2-1),1),COLOR0055FF,DOTLINE;压力B:DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,G DCS1-1),1),COLORYELLOW,DOTLINE;AA1:=REF(L,LOWN)=LLV(L,2*LOWN+1);QY1:=BACKSET(AA1,LOWN+1);CC1:=FILTER(QY1,LOWN) AND L=LLV(L,LOWN+1);{DRAWICON(CC1,L*0.98,1);}DD1:=BARSLAST(CC1);DDTS:=IF(CC1,CURRBARSCOUNT,0);YDB:=IF(DD1,REF(L,DD1),L);DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);DDCS1:=CONST(DDTS1);ZDB:=REF(YDB,DD1+1);DDTS2:=REF(DDTS1,DD1+1);DDCS2:=CONST(DDTS2);低点支撑:DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT= DDCS1,L,1) COLORRED,DOTLINE;ZGSTAR:=(高点压力+低点支撑)/2;ZGEND:=CONST((高点压力+低点支撑)/2);STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);中轨:DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR, ZGEND,1),POINTDOT,COLORFFBBFF,LINETHICK1;TTT:=6;A1:=REF(HIGH,6)=HHV(HIGH,2*TTT+1); B1:=FILTER(A1,TTT); C1:=BACKSET(B1,TTT+1); D1:=FILTER(C1,TTT);A2:=REF(LOW,TTT)=LLV(LOW,2*TTT+1); B2:=FILTER(A2,TTT); C2:=BACKSET(B2,TTT+1); D2:=FILTER(C2,TTT);E1:=(REF(LLV(LOW,2*TTT),1)+REF(HHV(HIGH,2*TTT),1))/2;E2:=(HIGH+LOW)/2;H1:=(D1 AND NOT(D2 AND E1>=E2)) OR BARSTATUS OR BARSCOUNT(CLOSE)=1;L1:=(D2 AND NOT(D1 AND E1<E2)); H2:=D1 AND NOT(D2 AND E1>=E2);X1:=REF(BARSLAST(H1),1)+1; F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1));G1:=F1>REF(F1,1); I1:=BACKSET(G1,2); LD:=I1>REF(I1,1);L2:=LD OR BARSTATUS 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(G2,2); HD:=I2>REF(I2,1);UU:=BACKSET(BARSTATUS,BARSLAST(LD)+1);VV:=UU>REF(UU,1);WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2);XX:=WW>REF(WW,1);UU2:=BACKSET(BARSTATUS,BARSLAST(HD)+1);VV2:=UU2>REF(UU2,1);WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);XX2:=WW2>REF(WW2,1);近低A:REF(L,BARSLAST(VV)),COLORWHITE,LINETHICK1,DOTLINE;近低B:REF(L,BARSLAST(XX)),COLORMAGENTA,DOTLINE;DRAWTEXT(CURRBARSCOUNT=2,高点压力,STRCAT('压力延伸:',CON2STR(高点压力,2))),COLORYELLOW;DRAWTEXT(CURRBARSCOUNT=2,低点支撑,STRCAT('支撑延伸:',CON2STR(低点支撑,2))),COLORYELLOW;DRAWTEXT(CURRBARSCOUNT=2,中轨,STRCAT('中轨:',CON2STR(中轨,2))),COLORYELLOW;DRAWTEXT(CURRBARSCOUNT=2,压力A,STRCAT('压力A:',CON2STR(压力A,2))),COLORYELLOW;DRAWTEXT(CURRBARSCOUNT=2,压力B,STRCAT('压力B:',CON2STR(压力B,2))),COLORYELLOW;DRAWTEXT(CURRBARSCOUNT=2,近低A,STRCAT('←近低A:',CON2STR(近低A,2))),COLORWHITE;DRAWTEXT(CURRBARSCOUNT=2,近低B,STRCAT('←近低B:',CON2STR(近低B,2))),COLORMAGENTA;。
量学画线主图指标通达信公式(附图)
量学画线主图指标通达信公式(附图)均线数:=0;画线虚实:=1;显3121刻度:=0;显买卖点:=1;半分位:=(O+C)/2;峰边距:=5;回踩误差千分之:=2;画将1黄2元3全4:=2;精准计数周期:=240;低1开2收3高4:=1;基准点前N天:=0;昨半分位:=REF(半分位,1);STICKLINE(ISLASTBAR,昨半分位,昨半分位,10,0);DRAWTEXT(ISLASTBAR,昨半分位,' 昨半分位');{原文链接:/THREAD-4885579-1-1.HTML};X_1:=1991015;X_2:=TESTSKIP(DATE>X_1);STICKLINE(REF(LOW,1)>HIGH,HIGH,REF(LOW,1),5,0),COLOR GRAY;STICKLINE(REF(HIGH,1)<LOW,LOW,REF(HIGH,1),5,0),COLOR GRAY;DRAWTEXT_FIX(ISLASTBAR,0,0,0,HYBLOCK);DRAWTEXT_FIX(ISLASTBAR,0.05,0,0,DYBLOCK);DRAWTEXT_FIX(ISLASTBAR,0.1,0,0,GNBLOCK);DRAWTEXT_FIX(ISLASTBAR,0,0.045,0,FGBLOCK),COLORGREE N;X_3:=240;X_4:=CONST(HHV(REF(HIGH,1),X_3));X_5:=CONST(LLV(REF(LOW,1),X_3));X_6:=X_4-X_5;X_7:=LOW-X_6*0.03;X_8:=HIGH+X_6*0.03;X_9:=CLOSE>500;X_10:=MAX(CLOSE,OPEN);X_11:=MIN(CLOSE,OPEN);X_12:=基准点前N天;X_13:=画线虚实;X_14:=IF(X_9,HIGH,X_10);X_15:=IF(X_9,LOW,X_11);X_16:=IF(CLOSE>OPEN,IF(X_13=0,LOW,X_15),IF(X_13=0,HIG H,X_14));X_17:=回踩误差千分之/1000;X_18:=CURRBARSCOUNT;X_19:=精准计数周期;X_20:=X_18<=X_19;X_21:=IF(低1开2收3高4=1,LOW,IF(低1开2收3高4=2,OPEN,IF(低1开2收3高4=3,CLOSE,HIGH)));X_22:=IF(基准点前N天=0,X_21,REF(X_21,基准点前N天));WEN98编_基准价:IF(X_20,CONST(X_22),DRAWNULL),DOTLINE,COLORLIGRAY;X_23:=WEN98编_基准价;X_24:=X_23*X_17;X_25:=ABS(LOW-X_23)<=X_24;X_26:=ABS(OPEN-X_23)<=X_24;X_27:=ABS(CLOSE-X_23)<=X_24;X_28:=ABS(HIGH-X_23)<=X_24;X_29:=X_25 OR X_26 OR X_27 OR X_28 AND X_20 AND X_18!=基准点前N天+1;X_30:=COUNT(X_29,X_19);精准点个数:IF(X_30>0,X_30+1,0),NODRAW,COLORMAGENTA;X_31:=峰边距;X_32:=REF(HIGH,X_31)=HHV(HIGH,2*X_31+1);X_33:=FILTER(X_32,X_31);X_34:=BACKSET(X_33,X_31+1);X_35:=FILTER(X_34,X_31);X_36:=REF(HIGH,BARSLAST(X_35));X_37:=REF(MAX(CLOSE,OPEN),X_31)=HHV(MAX(CLOSE,OPE N),2*X_31+1);X_38:=FILTER(X_37,X_31);X_39:=BACKSET(X_38,X_31+1);X_40:=FILTER(X_39,X_31);X_41:=REF(MAX(CLOSE,OPEN),BARSLAST(X_40));X_42:=REF(LOW,X_31)=LLV(LOW,2*X_31+1);X_43:=FILTER(X_42,X_31);X_44:=BACKSET(X_43,X_31+1);X_45:=FILTER(X_44,X_31);X_46:=REF(LOW,BARSLAST(X_45));X_47:=REF(MIN(CLOSE,OPEN),X_31)=LLV(MIN(CLOSE,OPEN) ,2*X_31+1);X_48:=FILTER(X_47,X_31);X_49:=BACKSET(X_48,X_31+1);X_50:=FILTER(X_49,X_31);X_51:=REF(MIN(CLOSE,OPEN),BARSLAST(X_50));X_52:=IF(画线虚实=0,X_36,X_41);X_53:=IF(画线虚实=0,X_46,X_51);STICKLINE(X_52=REF(X_52,1) AND 峰边距>0,X_52,X_52,5,0),COLOR990099;STICKLINE(X_53=REF(X_53,1) AND 峰边距>0,X_53,X_53,5,0),COLOR009900;K中:(HIGH+LOW)/2,NODRAW,COLORYELLOW;X_54:=MA(CLOSE,5);MA5角度:ATAN((X_54/REF(X_54,1)-1)*100)*180/3.1416,NODRAW;X_55:=均线数;年线250:IF(X_55>=6 AND X_55<7,MA(CLOSE,250),DRAWNULL),COLORBLUE;趋势120:IF(X_55>=5 AND X_55<7,MA(CLOSE,120),DRAWNULL),COLORGRAY;决策60:IF(X_55>=4 AND X_55<7,MA(CLOSE,60),DRAWNULL),COLORGREEN;生命20:IF(X_55>=3 AND X_55<7,MA(CLOSE,20),DRAWNULL),COLORLIRED;IF(X_55>=3 AND 生命20>=REF(生命20,1),生命20,DRAWNULL),COLORLIMAGENTA;操盘10:IF(X_55>=2 AND X_55<7,MA(CLOSE,10),DRAWNULL),COLORBROWN;攻击5:IF(X_55>=1 AND X_55<7,MA(CLOSE,5),DRAWNULL),COLORWHITE;IF(攻击5>REF(攻击5,1),攻击5,DRAWNULL),COLORMAGENTA;IF(操盘10>REF(操盘10,1),操盘10,DRAWNULL),COLORYELLOW;X_56:=FILTER(CROSS(KDJ.J,0) OR CROSS(KDJ.J,10),3);DRAWICON(显买卖点=1 AND X_56 AND CLOSE>REF(CLOSE,1),X_7-X_6*0.03,1);DRAWICON(显买卖点=1 AND CROSS(RSI.RSI1,20),X_7,1);X_57:=REF(HHV(IF(X_13=1,X_10,HIGH),2),1);X_58:=FILTER(CLOSE>X_57,1);X_59:=REF(LLV(IF(X_13=1,X_11,LOW),2),1);X_60:=FILTER(CLOSE<X_59,1);X_61:=X_58 AND COUNT(X_58,BARSLAST(X_60))=1 AND 显买卖点=1;X_62:=X_60 AND COUNT(X_60,BARSLAST(X_58))=1 AND 显买卖点=1;STICKLINE(X_62,X_59,X_59,18,(-1)),COLORGREEN;DRAWICON(X_62,X_8,39);STICKLINE(X_61,X_57,X_57,18,(-1)),COLORMAGENTA;DRAWICON(X_61,X_7,38);X_63:=1.01;X_64:=IF(X_13=1,MIN(CLOSE,OPEN),LOW);X_65:=VOL=REFX(HHV(VOL,8),3);X_66:=X_65 AND BETWEEN(VOL/REF(VOL,1),1.01,5);X_67:=VOL>REF(VOL,1);X_68:=CLOSE/REF(CLOSE,1)>=1.03 OR CLOSE/OPEN>=1.03;X_69:=CLOSE>OPEN OR CLOSE>REF(CLOSE,1);X_70:=CLOSE>REF(MAX(CLOSE,OPEN),1);X_71:=X_68;X_72:=RANGE(VOL/REF(VOL,1),0.966,1.034) AND BARSCOUNT(VOL)>=2;X_73:=X_70 AND REFX(X_72 AND COUNT(CLOSE>OPEN,2)=2,1);X_74:=BETWEEN(VOL/REF(VOL,1),1.01,4.99) AND X_69;X_75:=X_67 AND X_70;X_76:=REFX(COUNT(VOL>=REF(VOL,1) AND X_69,2)=2,2);X_77:=REFX(COUNT(BETWEEN(CLOSE/REF(CLOSE,1),1.001,1.04),2)=2,2);X_78:=X_66 OR X_71 OR X_73 OR X_74 OR X_75 OR X_76 OR X_77;X_79:=FILTER(X_69 AND X_78,0);X_80:=LLV(CLOSE,3)>=REF(MIN(CLOSE,OPEN),3);X_81:=1*(X_79 AND REFX(X_80,3));X_82:=EMA(VOL,3)<=REF(VOL,3)*1.03;X_83:=(EMA(VOL,3)-REF(VOL,3))/REF(VOL,3)<=(EMA(CLOSE,3)-REF(CLOSE,3))/REF(CLOSE,3);X_84:=X_82 OR X_83;X_85:=REFX(MIN(EMA(CLOSE,3),CLOSE),3)>=CLOSE;X_86:=1*(X_81 AND REFX(X_84,3) AND X_85);X_87:=COUNT(VOL<=REF(VOL,1),3)=3;X_88:=COUNT(CLOSE>=REF(CLOSE,1),3)=3;X_89:=COUNT(CLOSE>OPEN,4)=4;X_90:=X_87 AND X_88 AND X_89;X_91:=REFX(X_90,3);X_92:=MIN(CLOSE,OPEN)>REF(MAX(CLOSE,OPEN),1);X_93:=1*(X_69 AND REFX(X_86,1) AND MAX(CLOSE,OPEN)<REFX(OPEN,1));X_94:=画将1黄2元3全4;X_95:=BARSLAST(X_81 AND REF(X_81=0,1));X_96:=REF(X_64,X_95);X_97:=X_94=1 OR X_94=4;STICKLINE(X_97,X_96,X_96,3,0),COLORWHITE;X_98:=BARSLAST(X_86 AND REF(X_86=0,1));X_99:=REF(X_64,X_98);X_100:=X_94=2 OR X_94=4 OR X_94=5;STICKLINE(X_100,X_99,X_99,3,0),COLORYELLOW;X_101:=REF(LLV(X_64,3),X_98-3);STICKLINE(X_94=5,X_101,X_101,21,(-1)),COLORYELLOW;X_102:=BARSLAST(X_93 AND REF(X_93=0,1));X_103:=REF(MAX(CLOSE,OPEN),X_102);X_104:=X_94=3 OR X_94=4;STICKLINE(X_104,X_103,X_103,3,0),COLORLIRED;X_105:=ABS(X_36-X_23)<=X_24;X_106:=ABS(X_41-X_23)<=X_24;X_107:=FILTER(X_105 OR X_106,480) AND X_20;X_108:=ABS(X_46-X_23)<=X_24;X_109:=ABS(X_51-X_23)<=X_24;X_110:=FILTER(X_108 OR X_109,480) AND X_20;X_111:=COUNT(X_110,X_19) AND COUNT(X_107,X_19) AND X_18=15;DRAWLINE(X_107 AND 峰边距>0,X_23,1,X_23,0),COLORLIRED;DRAWLINE(X_110 AND 峰边距>0,X_23,1,X_23,0),COLORGREEN;DRAWLINE(X_111 AND 峰边距>0,X_23,1,X_23,1),COLORMAGENTA;X_112:=ABS(X_99-X_23)<=X_24;X_113:=ABS(X_101-X_23)<=X_24;X_114:=ABS(X_103-X_23)<=X_24;X_115:=FILTER(X_112 OR X_113 OR X_114,480) AND X_20;DRAWLINE(X_115,X_23,1,X_23,0),COLORBROWN;X_116:=REF(CLOSE,1);X_117:=IF(CLOSE>=1,10000,100000);X_118:=1.1*X_116-49/X_117;X_119:=1.05*X_116-49/X_117;X_120:=0.9*X_116+51/X_117;X_121:=0.95*X_116+51/X_117;X_122:=NAMELIKE(1) OR NAMELIKE(2);X_123:=IF(X_122,CLOSE>=X_119,CLOSE>=X_118);X_124:=IF(X_122,CLOSE<=X_121,CLOSE<=X_120);X_125:=IF(X_122,HIGH>=X_119,HIGH>=X_118);X_126:=IF(X_122,LOW<=X_121,LOW<=X_120);X_127:=CLOSE>OPEN AND (CLOSE>=X_119 OR CLOSE>1.05*OPEN-51/X_117) OR (CLOSE>1000 AND CLOSE>X_116*1.024);X_128:=CLOSE<OPEN AND (CLOSE<=X_121 OR CLOSE<0.95*OPEN+49/X_117) OR (CLOSE>1000 AND CLOSE<X_116*0.976);X_129:=BARSLAST(FILTER(X_127,3));X_130:=REF(X_16,X_129);阳底:IF(显3121刻度=2 AND REF(X_127,X_129) AND X_130=REF(X_130,1),X_130,DRAWNULL),DOTLINE,COLORYELLO W;X_131:=BARSLAST(FILTER(X_128,3));X_132:=REF(X_16,X_131);阴顶:IF(显3121刻度=2 AND REF(X_128,X_131) AND X_132=REF(X_132,1),X_132,DRAWNULL),DOTLINE,COLORGREEN;DRAWKLINE(HIGH,OPEN,LOW,CLOSE);STICKLINE(X_125,HIGH,MAX(CLOSE,OPEN),0,0),COLORMAG ENTA;STICKLINE(X_126,LOW,MIN(CLOSE,OPEN),0,0),COLORLICYA N;STICKLINE(X_127,OPEN,CLOSE,1,0),COLOR0000BB;STICKLINE(X_128,OPEN,CLOSE,1,0),COLORLIGREEN;STICKLINE(X_123,OPEN,CLOSE,1,0),COLORMAGENTA;STICKLINE(X_124,OPEN,CLOSE,1,0),COLORLICYAN;X_133:=CLOSE>OPEN AND CLOSE<X_116;STICKLINE(X_133,OPEN,CLOSE,0,0),COLORGREEN;X_134:=CLOSE<OPEN AND CLOSE>X_116;STICKLINE(X_134,OPEN,CLOSE,0,0),COLORRED;X_135:=AMOUNT/VOL/100;X_136:=CLOSE<OPEN AND X_135>REF(CLOSE,1) AND CLOSE<=X_116 AND X_135<=HIGH;STICKLINE(X_136,X_135,X_135,1,0),COLORRED;X_137:=PERIOD=5 AND NAMELIKE(10) AND (ABS(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)>=0.025 OR ABS(CLOSE-OPEN)>=60);X_138:=X_14-(X_14-X_15)/3;X_139:=X_15+(X_14-X_15)/3;X_140:=X_15+(X_14-X_15)/2;X_141:=1+IF(X_9,2,4.92)/100;X_142:=X_14/X_15>=X_141 OR CLOSE/REF(CLOSE,1)>=X_141;X_143:=显3121刻度=1 AND X_142;C31:IF(X_143,X_138,DRAWNULL),POINTDOT,COLORWHITE;C21:IF(X_143,X_140,DRAWNULL),POINTDOT,COLORWHITE;C32:IF(X_143,X_139,DRAWNULL),POINTDOT,COLORWHITE;X_144:=1;X_145:=显3121刻度=2 AND X_142;STICKLINE(X_145,X_138,X_138,X_144,0),COLORYELLOW;STICKLINE(X_145,X_140,X_140,X_144,0),COLORYELLOW;STICKLINE(X_145,X_139,X_139,X_144,0),COLORYELLOW;DRAWICON(X_18=基准点前N天+1,X_7,1);STICKLINE(X_29,X_23,X_23,3,1),COLORYELLOW;STICKLINE(X_18=基准点前N天+1,X_23,X_23,3,1),COLORYELLOW;X_146:=IF(X_13=0,BARSLAST(X_35)>0,BARSLAST(X_40)>0) AND (ABS(LOW-X_52)<=X_52*X_17 OR ABS(X_11-X_52)<=X_52*X_17);X_147:=IF(X_13=0,BARSLAST(X_45)>0,BARSLAST(X_50)>0)AND (ABS(LOW-X_53)<=X_53*X_17 OR ABS(X_11-X_53)<=X_53*X_17);STICKLINE(X_146,X_52,X_52,1,1),COLORYELLOW;STICKLINE(X_147,X_53,X_53,1,1),COLORYELLOW;。
通达信主图公式 缠分笔公式1
通达信主图公式缠分笔公式:(来自缠中说禅论坛,本人借花献佛):五日:MA(C,5);十日:MA(C,10);三十日:MA(C,30);六十日:MA(C,60);一百二十日:MA(C,120);局部低点预选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,距前低天)=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);距前低天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 L距前高天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)低保留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)COLORGREEN;DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0)COLORGREEN;。
通达信缠论分型笔线段主图指标公式
通达信缠论分型笔线段主图指标公式贝加尔湖畔(唯美版)来自定锚00:0003:17源码MA5:MA(CLOSE,5) COLORWHITE,LINETHICK2;MA10:MA(CLOSE,10) COLORMAGENTA,LINETHICK1;MA20:MA(CLOSE,20) COLORBLUE,LINETHICK1;MA60:MA(CLOSE,60) COLORYELLOW,LINETHICK2;MA250:MA(CLOSE,250) COLORRED, LINETHICK1;老笔:=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:=HGQL:=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<>FGZL:=IF(FGH1<><>FDZH:=IF(FDL1>FDH,FDH,IF(FDH>=FDH1,FDH2,FDH1));FDZL:=IF(FDH>=FDH1,FDL2,FDL1);FG1:=FGH>FDZH AND FG0;FD1:=FDLFG:=FG1 AND FGH>FDH AND FGL>FDL AND FGL1>FDL;FD:=FD1 AND FDL<>BH0:=(H<=ref(h,1) and="" l="">=REF(L,1)) OR (H>=REF(H,1) AND L<>=ref(h,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 ANDREF(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 AND REF(L,BARSLAST(FD0))<=ref(l,barslast(d1x)) and="" barslast(g1x)="">BARSLAST(D1X))=ref(l,barslast(d1x))> OR (FD1 AND COUNT(DQ,BARSLAST(FG1))>0 AND REF(L,BARSLAST(FD1))<>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 LBARSLAST(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))BARSLAST(D2));GPB:IF(G1X,H,DRAWNULL),CIRCLEDOT,COLORYELLOW;DPB:IF(D1X,L,DRAWNULL),CIRCLEDOT,COLORYELLOW;DRAWICON(CROSS(MA20,MA60),MA60*0.98,9);DIF:=MA(CLOSE,5)-MA(CLOSE,89);DIFMA:=MA(DIF,36);XG:=CROSS(DIF,DIFMA) AND DIF<>DRAWICON(XG,H*1.03,23);{画线}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;{折扣价}DRAWICON(CURRBARSCOUNT=6,LOW*0.98,24);DRAWNUMBER(CURRBARSCOUNT=6,LOW*0.96,C);DRAWICON(CURRBARSCOUNT=11,LOW*0.98,25);DRAWNUMBER(CURRBARSCOUNT=11,LOW*0.96,C);DRAWICON(CURRBARSCOUNT=21,LOW*0.98,26);DRAWNUMBER(CURRBARSCOUNT=21,LOW*0.96,C);DRAWICON(CURRBARSCOUNT=61,LOW*0.98,27);DRAWNUMBER(CURRBARSCOUNT=61,LOW*0.96,C);DRAWICON(CURRBARSCOUNT=121,LOW*0.98,18);DRAWNUMBER(CURRBARSCOUNT=121,LOW*0.96,C);{量能平台}N250:=250;PT250:=CONST(HHVBARS(V,N250));T250:IF(CURRBARSCOUNT<>IF(CURRBARSCOUNT=PT250+1,T250,DRAWNULL),CIRCLED OT,COLORFF0000,LINETHICK2;DRAWTEXT(CURRBARSCOUNT=N250,T250,'250'),COLOR99 0000;N120:=120;PT120:=CONST(HHVBARS(V,N120));T120:IF(CURRBARSCOUNT<>IF(CURRBARSCOUNT=PT120+1,T120,DRAWNULL),CIRCLED OT,COLORFFFF00,LINETHICK2;DRAWTEXT(CURRBARSCOUNT=N120,T120,'120'),COLORAA AA00;N60:=60;PT60:=CONST(HHVBARS(V,N60));T60:IF(CURRBARSCOUNT<>IF(CURRBARSCOUNT=PT60+1,T60,DRAWNULL),CIRCLEDOT, COLOR00FF00,LINETHICK2;DRAWTEXT(CURRBARSCOUNT=N60,T60,'60'),COLOR00BB0 0;N30:=30;PT30:=CONST(HHVBARS(V,N30));T30:IF(CURRBARSCOUNT<>IF(CURRBARSCOUNT=PT30+1,T30,DRAWNULL),CIRCLEDOT, COLOR0000FF,LINETHICK2;DRAWTEXT(CURRBARSCOUNT=N30,T30,'30'),COLOR0000C C;N20:=20;PT20:=CONST(HHVBARS(V,N20));T20:IF(CURRBARSCOUNT<>IF(CURRBARSCOUNT=PT20+1,T20,DRAWNULL),CIRCLEDOT, COLORFF00FF,LINETHICK2;DRAWTEXT(CURRBARSCOUNT=N20,T20,'20'),COLORDD00 DD;N10:=10;PT10:=CONST(HHVBARS(V,N10));T10:IF(CURRBARSCOUNT<>IF(CURRBARSCOUNT=PT10+1,T10,DRAWNULL),CIRCLEDOT, COLOR00FFFF,LINETHICK2;DRAWTEXT(CURRBARSCOUNT=N10,T10,'10'),COLOR00EEEE;N5:=5;PT5:=CONST(HHVBARS(V,N5));T5:IF(CURRBARSCOUNT<>IF(CURRBARSCOUNT=PT5+1,T5,DRAWNULL),CIRCLEDOT,C OLORFFFFFF,LINETHICK2;DRAWTEXT(CURRBARSCOUNT=N5,T5,'5'),COLORFFFFFF;ND:=10;PTD:=CONST(LLVBARS(V,ND));TDPX:IF(CURRBARSCOUNT<=nd,const(if(ptd=0,o,ref(o,ptd)) ),drawnull),>=nd,const(if(ptd=0,o,ref(o,ptd))),drawnull),> IF(CURRBARSCOUNT=PTD+1,TDPX,DRAWNULL),CIRCLEDOT, COLOR9370DB,LINETHICK2;DRAWTEXT(ISLASTBAR,TDPX,' 地平线10'), COLOR9370DB;检测到未来函数:BACKSET,DRAWLINE,未来函数用于观察行情还是可以的,不可以用于选股翻译输出MA5:收盘价的5日简单移动平均画白色,线宽为2输出MA10:收盘价的10日简单移动平均画洋红色,线宽为1输出MA20:收盘价的20日简单移动平均画蓝色,线宽为1输出MA60:收盘价的60日简单移动平均画黄色,线宽为2输出MA250:收盘价的250日简单移动平均画红色, 线宽为1老笔赋值:0G赋值:收盘价的5日简单移动平均D赋值:收盘价的10日简单移动平均HH赋值:5日前的最高价=11日内最高价的最高值LL赋值:5日前的最低价=11日内最低价的最低值FG01赋值:若HH则将最近6周期置为1>若HH则将最近5周期置为1FD01赋值:若LL则将最近6周期置为1>若LL则将最近5周期置为1FG02赋值:如果上次FG01距今天数=上次FD01距今天数ANDG>D,返回FG01,否则返回如果上次FD01距今天数>上次FG01距今天数,返回FG01,否则返回0FD02赋值:如果上次FG01距今天数=上次FD01距今天数ANDD>G,返回FD01,否则返回如果上次FG01距今天数>上次FD01距今天数,返回FD01,否则返回0FG0赋值:FG02 AND 最高价=上次FD02距今天数日内最高价的最高值FD0赋值:FD02 AND 最低价=上次FG02距今天数日内最低价的最低值输出GP:如果FG0,返回最高价,否则返回无效数,CIRCLEDOT,画青色输出DP:如果FD0,返回最低价,否则返回无效数,CIRCLEDOT,画青色GQ赋值:最低价>1日前的最高价 AND 日不等于1日前的日DQ赋值:最高价<>日前的最低价 AND 日不等于1日前的日GQL赋值:上次GQ距今天数日前的最低价DQH赋值:上次DQ距今天数日前的最高价FGH赋值:上次FG0距今天数日前的最高价FGL赋值:上次FG0距今天数日前的最低价FGH1赋值:上次FG0距今天数+1日前的最高价FGL1赋值:上次FG0距今天数+1日前的最低价FGH2赋值:上次FG0距今天数+2日前的最高价FGL2赋值:上次FG0距今天数+2日前的最低价FDH赋值:上次FD0距今天数日前的最高价FDL赋值:上次FD0距今天数日前的最低价FDH1赋值:上次FD0距今天数+1日前的最高价FDL1赋值:上次FD0距今天数+1日前的最低价FDH2赋值:上次FD0距今天数+2日前的最高价FDL2赋值:上次FD0距今天数+2日前的最低价FGZH赋值:如果FGL<>返回FGH2,否则返回FGH1FGZL赋值:如果FGH1<>返回FGL,否则返回如果FGL<>返回FGL2,否则返回FGL1FDZH赋值:如果FDL1>FDH,返回FDH,否则返回如果FDH>=FDH1,返回FDH2,否则返回FDH1FDZL赋值:如果FDH>=FDH1,返回FDL2,否则返回FDL1FG1赋值:FGH>FDZH AND FG0FD1赋值:FDLFG赋值:FG1 AND FGH>FDH AND FGL>FDL AND FGL1>FDL FD赋值:FD1 AND FDL<>BH0赋值:(最高价<>日前的最高价AND 最低价>=1日前的最低价) OR (最高价>=1日前的最高价 AND 最低价<>日前的最低价) BHG赋值:统计上次FD0距今天数日中满足BH0的天数BHD赋值:统计上次FG0距今天数日中满足BH0的天数BGQ赋值:统计上次FD0距今天数日中满足GQ的天数BDQ赋值:统计上次FG0距今天数日中满足DQ的天数BK0赋值:如果BHG>0,返回BHG+2+老笔,否则返回如果BHD,返回BHD+2+老笔,否则返回3BK赋值:如果BGQ,返回BK0-BGQ,否则返回如果BDQ,返回BK0-BDQ,否则返回BK0G1X赋值:(FG AND 上次FD距今天数>BK)D1X赋值:(FD AND 上次FG距今天数>BK)G1赋值:(FG0 AND 上次FG0距今天数日前的最高价>=上次G1X 距今天数日前的最高价AND 上次D1X距今天数>上次G1X距今天数)OR (FG1 AND 统计上次FD1距今天数日中满足GQ的天数>0 AND 上次FG1距今天数日前的最高价>上次G1X距今天数日前的最高价) D1赋值:(FD0 AND 上次FD0距今天数日前的最低价<>上次D1X距今天数日前的最低价AND 上次G1X距今天数>上次D1X距今天数)OR (FD1 AND 统计上次FG1距今天数日中满足DQ的天数>0 AND 上次FD1距今天数日前的最低价上次D1X距今天数日前的最高价) G1H赋值:如果上次D1距今天数>上次G1距今天数,返回上次G1距今天数日前的最高价,否则返回上次D1距今天数日前的最高价, D1L赋值:如果上次G1距今天数>上次D1距今天数,返回上次D1距今天数日前的最低价,否则返回上次G1距今天数日前的最低价G2赋值:G1 AND 最高价=上次D1距今天数+1日内G1H的最高值 AND 最高价>1日前的最高价 AND 上次D1距今天数>上次G1距今天数D2赋值:D1 AND 最低价=上次G1距今天数+1日内D1L的最低值 AND 最低价<>日前的最低价 AND 上次G1距今天数>上次D1距今天数G3赋值:G2 OR (FG0 AND 上次FG0距今天数日前的最高价>上次G2距今天数日前的最高价AND 上次D2距今天数>上次G2距今天数)D3赋值:D2 OR (FD0 AND 上次FD0距今天数日前的最低价上次D2距今天数日前的最低价 AND 上次G2距今天数>上次D2距今天数) 输出GPB:如果G1X,返回最高价,否则返回无效数,CIRCLEDOT,画黄色输出DPB:如果D1X,返回最低价,否则返回无效数,CIRCLEDOT,画黄色当满足条件MA20上穿MA60时,在MA60*0.98位置画9号图标DIF赋值:收盘价的5日简单移动平均-收盘价的89日简单移动平均DIFMA赋值:DIF的36日简单移动平均XG赋值:DIF上穿DIFMA AND DIF<>当满足条件XG时,在最高价*1.03位置画23号图标NN赋值:G3UU赋值:D3输出L1:当满足条件UU时,在最低价位置画直线起点,当满足条件NN时,在最高价位置画直线终点,0表示是否延长.,画淡绿色输出L2:当满足条件NN时,在最高价位置画直线起点,当满足条件UU时,在最低价位置画直线终点,0表示是否延长.,画淡绿色当满足条件L1ANDL2ANDNN时,在最高价位置书写数字,画淡红色当满足条件L1ANDL2ANDUU时,在最低价位置书写数字,画淡洋红色当满足条件到最后交易的周期=6时,在最低价*0.98位置画24号图标当满足条件到最后交易的周期=6时,在最低价*0.96位置书写数字当满足条件到最后交易的周期=11时,在最低价*0.98位置画25号图标当满足条件到最后交易的周期=11时,在最低价*0.96位置书写数字当满足条件到最后交易的周期=21时,在最低价*0.98位置画26号图标当满足条件到最后交易的周期=21时,在最低价*0.96位置书写数字当满足条件到最后交易的周期=61时,在最低价*0.98位置画27号图标当满足条件到最后交易的周期=61时,在最低价*0.96位置书写数字当满足条件到最后交易的周期=121时,在最低价*0.98位置画18号图标当满足条件到最后交易的周期=121时,在最低价*0.96位置书写数字N250赋值:250PT250赋值:N250日内成交量(手)距今天数的最后一日取值设为常数输出T250:如果到最后交易的周期<>返回如果PT250=0,返回收盘价,否则返回PT250日前的收盘价的最后一日取值设为常数,否则返回无效数,COLOR990000如果到最后交易的周期=PT250+1,返回T250,否则返回无效数,CIRCLEDOT,COLORFF0000,线宽为2当满足条件到最后交易的周期=N250时,在T250位置书写文字,COLOR990000N120赋值:120PT120赋值:N120日内成交量(手)距今天数的最后一日取值设为常数输出T120:如果到最后交易的周期<>返回如果PT120=0,返回收盘价,否则返回PT120日前的收盘价的最后一日取值设为常数,否则返回无效数,COLORAAAA00如果到最后交易的周期=PT120+1,返回T120,否则返回无效数,CIRCLEDOT,COLORFFFF00,线宽为2当满足条件到最后交易的周期=N120时,在T120位置书写文字,COLORAAAA00N60赋值:60PT60赋值:N60日内成交量(手)距今天数的最后一日取值设为常数输出T60:如果到最后交易的周期<>返回如果PT60=0,返回收盘价,否则返回PT60日前的收盘价的最后一日取值设为常数,否则返回无效数,COLOR00BB00如果到最后交易的周期=PT60+1,返回T60,否则返回无效数,CIRCLEDOT,COLOR00FF00,线宽为2当满足条件到最后交易的周期=N60时,在T60位置书写文字,COLOR00BB00N30赋值:30PT30赋值:N30日内成交量(手)距今天数的最后一日取值设为常数输出T30:如果到最后交易的周期<>返回如果PT30=0,返回收盘价,否则返回PT30日前的收盘价的最后一日取值设为常数,否则返回无效数,COLOR0000CC如果到最后交易的周期=PT30+1,返回T30,否则返回无效数,CIRCLEDOT,COLOR0000FF,线宽为2当满足条件到最后交易的周期=N30时,在T30位置书写文字,COLOR0000CCN20赋值:20PT20赋值:N20日内成交量(手)距今天数的最后一日取值设为常数输出T20:如果到最后交易的周期<>返回如果PT20=0,返回收盘价,否则返回PT20日前的收盘价的最后一日取值设为常数,否则返回无效数,COLORDD00DD如果到最后交易的周期=PT20+1,返回T20,否则返回无效数,CIRCLEDOT,COLORFF00FF,线宽为2当满足条件到最后交易的周期=N20时,在T20位置书写文字,COLORDD00DDN10赋值:10PT10赋值:N10日内成交量(手)距今天数的最后一日取值设为常数输出T10:如果到最后交易的周期<>返回如果PT10=0,返回收盘价,否则返回PT10日前的收盘价的最后一日取值设为常数,否则返回无效数,COLOR00EEEE如果到最后交易的周期=PT10+1,返回T10,否则返回无效数,CIRCLEDOT,COLOR00FFFF,线宽为2当满足条件到最后交易的周期=N10时,在T10位置书写文字,COLOR00EEEEN5赋值:5PT5赋值:N5日内成交量(手)距今天数的最后一日取值设为常数输出T5:如果到最后交易的周期<>返回如果PT5=0,返回收盘价,否则返回PT5日前的收盘价的最后一日取值设为常数,否则返回无效数,COLORFFFFFF如果到最后交易的周期=PT5+1,返回T5,否则返回无效数,CIRCLEDOT,COLORFFFFFF,线宽为2当满足条件到最后交易的周期=N5时,在T5位置书写文字,COLORFFFFFFND赋值:10PTD赋值:ND日内成交量(手)距今天数的最后一日取值设为常数输出TDPX:如果到最后交易的周期<>返回如果PTD=0,返回开盘价,否则返回PTD日前的开盘价的最后一日取值设为常数,否则返回无效数, COLOR9370DB如果到最后交易的周期=PTD+1,返回TDPX,否则返回无效数,CIRCLEDOT, COLOR9370DB,线宽为2当满足条件是否最后一个周期时,在TDPX位置书写文字, COLOR9370DB缠中说禅:为什么要研究分型、走势类型等东西,其哲学基础是什么?这就是人的贪嗔痴疑慢。
缠论中枢划线(笔和线段)主图指标公式-优化后之欧阳治创编
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)=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(K D1,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 ANDH>=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),COLOR MAGENTA;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));。
通信达顶级自动画线公式
通信达顶级自动画线公式A1:=REF(H,8)=HHV(H,2*8+1);B1:=FILTER(A1,8);C1:=BACKSET(B1,8+1);D1:=FILTER(C1,8);{高点}R11:=BACKSET(ISLASTBAR,BARSLAST(D1)+1); S11:=R11>REF(R11,1);DRAWLINE(D1,H,S11,H,1),COLORBLUE;A2:=REF(L,8)=LLV(L,2*8+1);B2:=FILTER(A2,8);C2:=BACKSET(B2,8+1);D2:=FILTER(C2,8);{低点}T11:=BACKSET(ISLASTBAR,BARSLAST(D2)+1); U11:=T11>REF(T11,1);DRAWLINE(D2,L,U11,L,1),COLORBLUE;M:=INTPART(3*8/5);A12:=REF(H,M)=HHV(H,2*M+1);B12:=FILTER(A12,M);C12:=BACKSET(B12,M+1);D12:=FILTER(C12,M);{高点}R112:=BACKSET(ISLASTBAR,BARSLAST(D12)+1);S112:=R112>REF(R112,1);DRAWLINE(D12,H,S112,H,1),COLORRED;A22:=REF(L,M)=LLV(L,2*M+1);B22:=FILTER(A22,M);C22:=BACKSET(B22,M+1);D22:=FILTER(C22,M);{低点}T112:=BACKSET(ISLASTBAR,BARSLAST(D22)+1);U112:=T112>REF(T112,1);DRAWLINE(D22,L,U112,L,1),COLORRED;V AR1111:=BACKSET(REF(HIGH,2)=HHV(HIGH,5),3);V AR2222:=CROSS(V AR1111,0.9);V AR3333:=BACKSET(REF(LOW,2)=LLV(LOW,5),3);V AR4444:=CROSS(V AR3333,0.9);压力:= REF(HIGH,BARSLAST(V AR2222));STICKLINE(CLOSE,REF(HIGH,BARSLAST(VAR2222)),RE F(HIGH,BARSLAST(V AR2222)),0.5,1),COLOREA91B5,LIN ETHICK3;支撑:= REF(LOW,BARSLAST(V AR4444));STICKLINE(CLOSE,REF(LOW,BARSLAST(V AR4444)),REF (LOW,BARSLAST(V AR4444)),0.5,1),COLOR00B4FF,LINET HICK3;下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) -LLV(LOW,13))) * 100);RRRSV:=SMA(下档线,3,1);KKK:=SMA(RRRSV,3,1);DDD:=((3 * RRRSV) - (2 * KKK));JJ12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) -LLV(LOW,55))) * 100);RSV24:=SMA(JJ12,3,1);K24:=SMA(RSV24,3,1);D24:=((3 * RSV24) - (2 * K24));压力2:=IF(CROSS(D24,DDD),HIGH,REF(HIGH,BARSLAST(CRO SS(D24,DDD)))),COLORFFFFFF;压力位:=IF(ISLASTBAR,压力2,DRAWNULL); STICKLINE(ISLASTBAR ,压力位,压力位,120,0),LINETHICK4,COLORFFFFFF;底部:=LLV(HIGH,30),COLOR00FF00;底部位:=IF(ISLASTBAR,底部,DRAWNULL);STICKLINE(ISLASTBAR ,底部位,底部位,100,0),LINETHICK4,COLOR00FF00;。