通达信股票划线公式

合集下载

通达信控盘成本画线主图指标公式

通达信控盘成本画线主图指标公式

通达信控盘成本画线主图指标公式X_1:=FROMOPEN<240;X_2:=X_1<=0;X_3:=1;X_4:=1281210;X_5:=IF(DATE>X_4,X_2,X_3);X_6:=IF(DATE>X_4,0,1);X_7:=IF(DATE>X_4,1,0);CLOSE;DRAWGBK(OPEN>CLOSE,RGB(1,88,92),RGB(1,22,28),0,7,0);X_8:=1 AND X_6;X_9:=(XMA(XMA(HIGH,25),25)-XMA(XMA(LOW,25),25))*1+XMA(XMA(HIGH,25),25);X_10:=XMA(XMA(LOW,25),25)-(XMA(XMA(HIGH,25),25)-XMA(XMA(LOW,25),25))*1;X_11:=X_8*(XMA(XMA(HIGH,60),60)-XMA(XMA(LOW,60),60))*2.2+XMA(XMA(HIGH,60),60);X_12:=X_8*XMA(XMA(LOW,60),60)-(XMA(XMA(HIGH,60),60)-XMA(XMA(LOW,60),60))*2.8;X_13:=X_8*(X_9+X_11)/2;X_14:=X_8*(X_10+X_12)/2;DRAWBAND(X_13,RGB(0,100,0),X_11,RGB(0,100,0));DRAWBAND(X_14,RGB(150,0,150),X_12,RGB(150,0,150));收盘价:CLOSE,NODRAW,COLORWHITE;涨跌幅:(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100,NODRAW,COLORYELLOW;最新价:IF(CLOSE,CONST(CLOSE),DRAWNULL),DOTLINE,COLORRED;DRAWKLINE(HIGH,OPEN,LOW,CLOSE);X_15:=(HIGH+LOW)/2;X_16:=X_15;X_17:=XMA(X_15,3);X_18:=XMA(X_15,5);X_19:=XMA(X_15,10);X_20:=XMA(X_15,15);X_21:=XMA(X_15,20);X_22:=XMA(X_15,25);X_23:=XMA(X_15,30);X_24:=XMA(X_15,35);X_25:=XMA(X_15,40);X_26:=XMA(X_15,45);X_27:=XMA(X_15,50);X_28:=XMA(X_15,55);X_29:=XMA(X_15,60);X_30:=(X_17+X_18+X_19+X_20+X_21+X_22+X_23+X_24+X_ 25+X_26+X_27+X_28+X_29)/13;X_31:=(X_16+X_17+X_18)/3;X_32:=PLOYLINE(2>1,X_30);X_33:=X_16>X_17 AND X_16>X_18 AND X_16>X_19 AND X_16>X_20 AND X_16>X_21 AND X_16>X_22 AND X_16>X_23 AND X_16>X_24 AND X_16>X_25 AND X_16>X_26 AND X_16>X_27 AND X_16>X_28 AND X_16>X_29 AND X_17>X_18 AND X_17>X_19 AND X_17>X_20 AND X_17>X_21 AND X_17>X_22 AND X_17>X_23;X_34:=X_17>X_24 AND X_17>X_25 AND X_17>X_26 AND X_17>X_27 AND X_17>X_28 AND X_17>X_29 AND X_18>X_19 AND X_18>X_20 AND X_18>X_21 AND X_18>X_22 AND X_18>X_23 AND X_18>X_24 AND X_18>X_25 AND X_18>X_26 AND X_18>X_27 AND X_18>X_28 AND X_18>X_29 ANDX_19>X_20 AND X_19>X_21 AND X_19>X_22 AND X_19>X_23 AND X_19>X_24 AND X_19>X_25 AND X_19>X_26 AND X_19>X_27 AND X_19>X_28 AND X_19>X_29;X_35:=X_20>X_21 AND X_20>X_22 AND X_20>X_23 AND X_20>X_24 AND X_20>X_25 AND X_20>X_26 AND X_20>X_27 AND X_20>X_28 AND X_20>X_29 AND X_21>X_22 AND X_21>X_23 AND X_21>X_24 AND X_21>X_25 AND X_21>X_26 AND X_21>X_27 AND X_21>X_28 AND X_21>X_29 AND X_22>X_23 AND X_22>X_24 AND X_22>X_25 AND X_22>X_26 AND X_22>X_27 AND X_22>X_28 AND X_22>X_29 AND X_23>X_24 AND X_23>X_25;X_36:=X_23>X_26 AND X_23>X_27 AND X_23>X_28 AND X_23>X_29 AND X_24>X_25 AND X_24>X_26 AND X_24>X_27 AND X_24>X_28 AND X_24>X_29 AND X_25>X_26 AND X_25>X_27 AND X_25>X_28 AND X_25>X_29 AND X_26>X_27 AND X_26>X_28 AND X_26>X_29 AND X_27>X_28 AND X_27>X_29 AND X_28>X_29;X_37:=X_33 AND X_34 AND X_35 AND X_36;X_38:=X_16<X_17 AND X_16<X_18 AND X_16<X_19 AND X_16<X_20 AND X_16<X_21 AND X_16<X_22 AND X_16<X_23 AND X_16<X_24 AND X_16<X_25 AND X_16<X_26 AND X_16<X_27 AND X_16<X_28 AND X_16<X_29 AND X_17<X_18 AND X_17<X_19 AND X_17<X_20 AND X_17<X_21 AND X_17<X_22 AND X_17<X_23;X_39:=X_17<X_24 AND X_17<X_25 AND X_17<X_26 AND X_17<X_27 AND X_17<X_28 AND X_17<X_29 AND X_18<X_19 AND X_18<X_20 AND X_18<X_21 AND X_18<X_22 AND X_18<X_23 AND X_18<X_24 AND X_18<X_25 AND X_18<X_26 AND X_18<X_27 AND X_18<X_28 AND X_18<X_29 AND X_19<X_20 AND X_19<X_21;X_40:=X_19<X_22 AND X_19<X_23 AND X_19<X_24 AND X_19<X_25 AND X_19<X_26 AND X_19<X_27 AND X_19<X_28 AND X_19<X_29 AND X_20<X_21 AND X_20<X_22 AND X_20<X_23 AND X_20<X_24 AND X_20<X_25 AND X_20<X_26 AND X_20<X_27 AND X_20<X_28 AND X_20<X_29 AND X_21<X_22;X_41:=X_21<X_23 AND X_21<X_24 AND X_21<X_25 AND X_21<X_26 AND X_21<X_27 AND X_21<X_28 AND X_21<X_29 AND X_22<X_23 AND X_22<X_24 AND X_22<X_25 AND X_22<X_26 AND X_22<X_27 AND X_22<X_28 AND X_22<X_29 AND X_23<X_24 AND X_23<X_25 AND X_23<X_26 AND X_23<X_27;X_42:=X_23<X_28 AND X_23<X_29 AND X_24<X_25 AND X_24<X_26 AND X_24<X_27 AND X_24<X_28 AND X_24<X_29 AND X_25<X_26 AND X_25<X_27 AND X_25<X_28 AND X_25<X_29 AND X_26<X_27 AND X_26<X_28 AND X_26<X_29 AND X_27<X_28 AND X_27<X_29 AND X_28<X_29;X_43:=X_38 AND X_39 AND X_40 AND X_41 AND X_42;X_44:=(CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100;X_45:=SMA(X_14,3,1);X_46:=SMA(X_45,3,1);X_47:=SMA(X_46,3,1);X_48:=X_46;X_49:=X_47;X_50:=X_46<20;X_51:=X_46>80;X_52:=X_50 OR X_51;STICKLINE(X_37 AND CLOSE>=OPEN AND CLOSE<X_13*1.1 AND X_52,HIGH,LOW,0.6,0),COLORRED;STICKLINE(X_37 AND CLOSE>=OPEN AND CLOSE<X_13*1.1 AND X_52,CLOSE,OPEN,3,0),COLORRED;STICKLINE(X_43 AND CLOSE>=OPEN AND CLOSE<X_13*1.1 AND X_52,HIGH,LOW,0.6,0),COLORRED;STICKLINE(X_43 AND CLOSE>=OPEN AND CLOSE<X_13*1.1 AND X_52,CLOSE,OPEN,3,0),COLORRED;STICKLINE(X_37 AND CLOSE<OPEN AND CLOSE<X_14*1.1 AND X_52,HIGH,LOW,0.6,0),COLORGREEN;STICKLINE(X_37 AND CLOSE<OPEN AND CLOSE<X_14*1.1 AND X_52,CLOSE,OPEN,3,0),COLORGREEN;STICKLINE(X_43 AND CLOSE<OPEN AND CLOSE<X_14*1.1 AND X_52,HIGH,LOW,0.6,0),COLORGREEN;STICKLINE(X_43 AND CLOSE<OPEN AND CLOSE<X_14*1.1 AND X_52,CLOSE,OPEN,3,0),COLORGREEN;X_53:=(HIGH+XMA(HIGH,3)+XMA(HIGH,5)+XMA(HIGH,10) +XMA(HIGH,15)+XMA(HIGH,20)+XMA(HIGH,25)+XMA(HIGH,30 )+XMA(HIGH,35)+XMA(HIGH,40)+XMA(HIGH,45)+XMA(HIGH,5 0)+XMA(HIGH,55)+XMA(HIGH,60))/14;X_54:=(LOW+XMA(LOW,3)+XMA(LOW,5)+XMA(LOW,10)+X MA(LOW,15)+XMA(LOW,20)+XMA(LOW,25)+XMA(LOW,30)+XM A(LOW,35)+XMA(LOW,40)+XMA(LOW,45)+XMA(LOW,50)+XMA( LOW,55)+XMA(LOW,60))/14;X_55:=X_20>X_21 AND X_20>X_22 AND X_20>X_23 AND X_20>X_24 AND X_20>X_25 AND X_20>X_26 AND X_20>X_27 AND X_20>X_28 AND X_20>X_29 AND X_21>X_22 AND X_21>X_23 AND X_21>X_24 AND X_21>X_25 AND X_21>X_26 AND X_21>X_27 AND X_21>X_28 AND X_21>X_29 AND X_22>X_23 AND X_22>X_24 AND X_22>X_25 AND X_22>X_26 AND X_22>X_27 AND X_22>X_28 AND X_22>X_29 AND X_23>X_24 AND X_23>X_25 AND X_23>X_26 AND X_23>X_27AND X_23>X_28 AND X_23>X_29 AND X_24>X_25 AND X_24>X_26 AND X_24>X_27 AND X_24>X_28 AND X_24>X_29 AND X_25>X_26 AND X_25>X_27 AND X_25>X_28 AND X_25>X_29 AND X_26>X_27 AND X_26>X_28 AND X_26>X_29 AND X_27>X_28 AND X_27>X_29 AND X_28>X_29;X_56:=X_20<X_21 AND X_20<X_22 AND X_20<X_23 AND X_20<X_24 AND X_20<X_25 AND X_20<X_26 AND X_20<X_27 AND X_20<X_28 AND X_20<X_29 AND X_21<X_22 AND X_21<X_23 AND X_21<X_24 AND X_21<X_25 AND X_21<X_26 AND X_21<X_27 AND X_21<X_28 AND X_21<X_29 AND X_22<X_23 AND X_22<X_24 AND X_22<X_25 AND X_22<X_26 AND X_22<X_27 AND X_22<X_28 AND X_22<X_29 AND X_23<X_24 AND X_23<X_25 AND X_23<X_26 AND X_23<X_27 AND X_23<X_28 AND X_23<X_29 AND X_24<X_25 AND X_24<X_26 AND X_24<X_27 AND X_24<X_28 AND X_24<X_29 AND X_25<X_26 AND X_25<X_27 AND X_25<X_28 AND X_25<X_29 AND X_26<X_27 AND X_26<X_28 AND X_26<X_29 AND X_27<X_28 AND X_27<X_29 AND X_28<X_29;X_57:=XMA(X_53/X_54*X_30+(X_53/X_54*X_30-X_30),10);X_58:=XMA(X_54/X_53*X_30-(X_30-X_54/X_53*X_30),10);X_59:=IF(REF(X_30,1)<X_30 AND NOT(X_55),X_57,DRAWNULL);X_60:=IF(REF(X_30,1)>X_30 AND NOT(X_56),X_58,DRAWNULL);X_61:=XMA(X_53/X_54*X_30+(X_53/X_54*X_30-X_30)/2,10);X_62:=XMA(X_54/X_53*X_30-0.5*(X_30-X_54/X_53*X_30),10);X_63:=IF(REF(X_30,1)>X_30,X_61,DRAWNULL);X_64:=IF(REF(X_30,1)<X_30,X_62,DRAWNULL);X_65:=X_53/X_54*X_30+(X_53/X_54*X_30-X_30)*1.5;X_66:=X_54/X_53*X_30-1.5*(X_30-X_54/X_53*X_30);X_67:=PLOYLINE(2>1,X_65);X_68:=PLOYLINE(2>1,X_66);X_69:=IF(REF(X_30,1)<X_30 AND X_55,X_65,DRAWNULL);X_70:=IF(REF(X_30,1)>X_30 AND X_56,X_66,DRAWNULL);X_71:=IF(X_37,X_65,DRAWNULL);X_72:=IF(X_43,X_66,DRAWNULL);交时1:=FROMOPEN<240;交时2:=交时1<=0;交时3:=1;DAYN1:=1281210;定时1:=IF(DATE>DAYN1,交时2,交时3);定时2:=IF(DATE>DAYN1,0,1);定时3:=IF(DATE>DAYN1,1,0);所属板块:=STRCAT('【所属板块】',STRCAT(STRCAT(STRCAT('【行业】',HYBLOCK),STRCAT('【地域】',DYBLOCK)),STRCAT('【概念】',GNBLOCK)));DRAWTEXT_FIX(ISLASTBAR,0,0,0,所属板块),COLORYELLOW;DRAWTEXT_FIX(1 AND 定时3,0.30,0.75,0,'如果看到这些文字,说明【印钞机3代】指标公式试用已到期,如果认为对你炒股,炒原油,炒外汇黄金'),COLORYELLOW;DRAWTEXT_FIX(1 AND 定时3,0.30,0.81,0,'等期货有用,请加设计编写QQ:2679426676,或者到股票公式指标群重新下载,(**号:303313976)'),COLORYELLOW;DRAWTEXT_FIX(1 AND 定时3,0.30,0.87,0,'【印钞机3代】必须与副图的【印钞机副图3】MACD背离指标同步使用,则神效更准,高胜算率。

通达信画线指标公式

通达信画线指标公式

通达信画线指标公式
通达信是一种常用的股票交易软件,它支持自定义指标和画线指标。

以下是一些通达信中常用的画线指标公式示例:
移动平均线(MA): MA(CLOSE, N):计算收盘价CLOSE的N日简单移动平均线。

指数移动平均线(EMA): EMA(CLOSE, N):计算收盘价CLOSE 的N日指数移动平均线。

BOLL指标: BOLL(CLOSE, N, P):计算收盘价CLOSE的N日布林带指标,P为标准差倍数。

MACD指标: DIF: EMA(CLOSE, SHORT) - EMA(CLOSE, LONG) DEA: EMA(DIF, MID) MACD: (DIF - DEA) * 2
KDJ指标: RSV: (CLOSE - LLV(LOW, N)) / (HHV(HIGH, N) - LLV(LOW, N)) * 100 K: SMA(RSV, M1, 1) D: SMA(K, M2, 1) J: 3 * K - 2 * D
这些公式只是通达信中常用的画线指标公式示例,实际上通达信支持更多的指标公式和定制化功能。

如果你有特定的指标需求,可以根据自己的需求进行进一步的研究和开发。

需要注意的是,通达信软件使用一种特定的编程语言来编写自定义指标公式,称为通达信公式语言(TDX Formula)。

如果你想要进一步学习和开发通达信指标,可以查阅相关的编程手册和文档。

通达信顶级自动画线公式,可以叠加任何主图

通达信顶级自动画线公式,可以叠加任何主图

通达信顶级自动画线公式,可以叠加任何主图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;。

自动画通道线主图指标通达信指标公式源码

自动画通道线主图指标通达信指标公式源码

自动画通道线主图指标通达信指标公式源码N:=33;UR:=6;LR:=6;TC1:=IF(H=HHV(H,8*UR),H,DRAWNULL);TC2:=CONST(BARSLAST(TC1=H))+1;UPPER:=CONST(IF(TC2=1,H,REF(H,TC2-1)));BC1:=IF(L=LLV(L,XXX),L,DRAWNULL);BC2:=CONST(BARSLAST(BC1=L))+1;LOWER:=CONST(IF(BC2=1,L,REF(L,BC2-1)));LP:=CURRBARSCOUNTTC2,HP,LP),LOWER,UPPER,0,0) ,COLOR;{右侧竖线}STICKLINE(IF(BC2>TC2,LP,HP),LOWER,UPPER,0,0),COL OR;{左侧竖线}NOD:=(IF(TC2>BC2,TC2,BC2)-IF(TC2>BC2,BC2,TC2));{用时}LR1:=FORCAST(C,NOD+1);NP:IF(CURRBARSCOUNT<=MAX(BC2,TC2),CONST(IF( MIN(TC2,BC2)=1,LR1,REF(LR1,MIN(TC2,BC2)-1))),DRAWNULL),POINTDOT,COLORFFFFFF;{近点}LR2:=SLOPE(C,NOD+1);LR3:=CONST(IF(MIN(TC2,BC2)=1,LR2,REF(LR2,MIN(T C2,BC2)-1)));}AD:=ABS(NP-FP);{高差};DBL:=BARSLAST(BC1!=DRAWNULL)+1;DBH:=BARSLAST(TC1!=DRAWNULL)+1;BSP:=IF(BC2>TC2,DBL,DBH)-1;LRL:=IF(NP>FP,FP+AD/NOD*BSP,FP-AD/NOD*BSP);AT1:=IF(BETWEEN(CURRBARSCOUNT,BC2, TC2) AND H>LRL,H,LRL);AT2:=HHV(AT1-LRL,MAX(BC2,TC2));AT3:=CONST(BARSLAST(AT1-LRL=AT2));AT4:=CONST(IF(AT3=0,H,REF(H,AT3)));AT5:=CONST(IF(AT3=0,AT1-LRL,REF(AT1-LRL,AT3)));ATL:=LRL+AT5;UT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND L<LRL,L,LRL);UT2:=HHV(LRL-UT1,MAX(BC2,TC2));UT3:=CONST(BARSLAST(LRL-UT1=UT2));UT4:=CONST(IF(UT3=0,H,REF(H,UT3)));UT5:=CONST(IF(UT3=0,LRL-UT1,REF(LRL-UT1,UT3)));UTL:=LRL-UT5;RH:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,ATL,CONST(REF(ATL,MIN(BC2,TC2)-11)));RL:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,UTL,CONST(REF(UTL,MIN(BC2,TC2)-11)));IF(NP>FP,IF(LRL=RL,LRL,DRAWNULL)),COLORRED;} {中轨画线}IF(NP>FP,IF(ATL=RL,ATL,DRAWNULL)),COLORYELL OW;{上轨画线}IF(NP>FP,IF(ATL=RL,ATL,DRAWNULL)),COLORYELL OW;{上轨画线}。

量学画线主图指标通达信公式(附图)

量学画线主图指标通达信公式(附图)

量学画线主图指标通达信公式(附图)均线数:=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 什么是中枢自动画线指标
中枢自动画线指标,是指可以自动"判断行情大走势、涨跌趋势及其支撑位和阻力位"的技术分析工具,它使用"均线跌破、均线支撑,涨跌回转点"等指标进行判断,以更加准确把握股票价格判断。

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 中枢自动画线的应用
中枢自动画线指标的使用很受广大交易者的青睐。

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

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

通达信指标公式源码 画线波谷BS通道主图指标公式

通达信指标公式源码 画线波谷BS通道主图指标公式

天际: (MA(CLOSE,40)) + 2*STD(CLOSE,40),LINETHICK2,COLORBLUE;海底: (MA(CLOSE,40)) - 2*STD(CLOSE,40),LINETHICK2,COLORBLUE;买卖决策①:EXPMA(CLOSE,12),CIRCLEDOT,COLORWHITE;红持绿抛②:MA(CLOSE,25),COLORRED;红持绿抛③:MA(CLOSE,30),COLORGREEN;DRAWBAND(红持绿抛②,RGB(255,0,0),红持绿抛③,RGB(0,255,0));NOTEXT1:IF(CLOSE>买卖决策①AND CLOSE!=买卖决策①,买卖决策①,DRAWNULL),CIRCLEDOT,COLORRED;NOTEXT2:IF(CLOSE<买卖决策①AND CLOSE!=买卖决策①,买卖决策①,DRAWNULL),CIRCLEDOT,COLORGREEN;现价:=C,POINTDOT;M3:MA(C,3);持股13线:=EMA(CLOSE,13);突破77线:=EMA(CLOSE,77);翻锅99线:=EMA(CLOSE,99);DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIF,9);AA:=EMA(CLOSE,10);多头:=STICKLINE(DIF>DEA,CLOSE,OPEN,2,0),COLORRED;STICKLINE(DIF>DEA,HIGH,LOW,0,0),COLORRED;空头:=STICKLINE(DIF<=DEA,CLOSE,OPEN,2,0),COLORGREEN;STICKLINE(DIF<=DEA,HIGH,LOW,0,0),COLORGREEN;STICKLINE(DIF<=DEA AND AA>MA(CLOSE,50),CLOSE,OPEN,2,0),COLORYELLOW; STICKLINE(DIF<=DEA AND AA>MA(CLOSE,50),HIGH,LOW,0,0),COLORYELLOW; DRAWTEXT(CROSS(DIF,DEA),LOW*0.995, 'B'),COLORYELLOW,LINETHICK3,; DRAWTEXT(CROSS(DEA,DIF),HIGH*1.02, 'S'),COLORGREEN,LINETHICK3,;A:=TROUGH(3,10,1);B:=TROUGHBARS(3,10,1)=0;画底线:DRAWLINE(B,A,B,A,1),COLORYELLOW;D:=PEAK(3,10,1);E:=PEAKBARS(3,10,1)=0;画顶线:DRAWLINE(E,D,E,D,1),COLOR00FF00;百分比:=10;{也可设立参数:百分比(5,30,10)}误差:=2;{误差百分比}允许误差:=误差/100+0.004;{也可设立参数:允许误差(0,0.02,0)} 波谷1距离:= 1+CONST(TROUGHBARS(2,百分比,1));波谷值1: CONST(TROUGH(2,百分比,1));波谷值2:= CONST(TROUGH(2,百分比,2));波谷值3:= CONST(TROUGH(2,百分比/2,2));波谷值4:= CONST(TROUGH(2,百分比*2,2));。

通达信指标公式源码顶底趋势主图画线指标

通达信指标公式源码顶底趋势主图画线指标

顶底趋势主图画线指标N:=3;A1:=REF(H,N)=HHV(H,2*N+1);B1:=FILTER(A1,N);C1:=BACKSET(B1,N+1);D1:=FILTER(C1,N);{高点}A2:=REF(L,N)=LLV(L,2*N+1);B2:=FILTER(A2,N);C2:=BACKSET(B2,N+1);D2:=FILTER(C2,N);{低点}E1:=(REF(LLV(L,2*N),1)+REF(HHV(H,2*N),1))/2;E2:=(H+L)/2;{高低点出现在同一K线上时可作取舍}H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(C)=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,L,10000),X1));G1:=F1>REF(F1,1);I1:=BACKSET(G1,2);LD:=I1>REF(I1,1),LINETHICK0;{过滤后低点}L2:=LD OR ISLASTBAR OR BARSCOUNT(C)=1;X2:=REF(BARSLAST(L2),1)+1;F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,H,0),X2));G2:=F2>REF(F2,1);I2:=BACKSET(G2,2);HD:=I2>REF(I2,1),LINETHICK0;{过滤后高点}R1:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);S1:=R1>REF(R1,1);{前一高}T1:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);U1:=T1>REF(T1,1);{前一低}R2:=BACKSET(S1,REF(BARSLAST(HD),1)+2);S2:=R2>REF(R2,1);{前二高}T2:=BACKSET(U1,REF(BARSLAST(LD),1)+2);U2:=T2>REF(T2,1);{前二低}T3:=BACKSET(U2,REF(BARSLAST(LD),1)+2);U3:=T3>REF(T3,1);{前三低}T4:=BACKSET(U3,REF(BARSLAST(LD),1)+2);U4:=T4>REF(T4,1);{前四低}R3:=BACKSET(S2,REF(BARSLAST(HD),1)+2);S3:=R3>REF(R3,1);{前三高}R4:=BACKSET(S3,REF(BARSLAST(HD),1)+2);S4:=R4>REF(R4,1);{前四高}★压力1:DRAWLINE(S2,H,S1,H,1),COLORMAGENTA,LINETHICK1; ★支撑1:DRAWLINE(U2,L,U1,L,1),COLOR8FBC8F,LINETHICK1;★压力2:DRAWLINE(S3,H,S2,H,1),COLORFF8000;★支撑2:DRAWLINE(U3,L,U2,L,1),COLOR99CC32;★压力3:DRAWLINE(S4,H,S3,H,1),COLOR0000FF;★支撑3:DRAWLINE(U4,L,U3,L,1),COLOR00FF7F; DRAWICON(S2,H*1.01,10);DRAWICON(S3,H*1.01,10);DRAWNUMBER(S2,H*1.02,H),COLORCFB53B; DRAWNUMBER(S1,H*1.02,H),COLORCFB53B; DRAWNUMBER(S3,H*1.02,H),COLORCFB53B;DRAWICON(U1,L*0.99,11);DRAWICON(U2,L*0.99,11);DRAWICON(U3,L*0.99,11);DRAWICON(U4,L*0.99,11);DRAWNUMBER(U1,L*0.98,L),COLORCYAN;DRAWNUMBER(U2,L*0.98,L),COLORCYAN;DRAWNUMBER(U3,L*0.98,L),COLORCYAN;DRAWNUMBER(U4,L*0.98,L),COLORCYAN;。

通达信 画线公式

通达信 画线公式

通达信画线公式
通达信画线公式是一种使用通达信炒股软件绘制股票趋势线的
方法,可以帮助投资者更好地了解股票市场的趋势。

下面是一个简单的通达信画线公式:
1. 长期趋势线:= 30 日移动平均线;
2. 中期趋势线:= 20 日移动平均线;
3. 短期趋势线:= 5 日移动平均线;
4. 股价上穿长期趋势线:=(Close >长期趋势线);
5. 股价下穿长期趋势线:=(Close <长期趋势线);
6. 股价上穿中期趋势线:=(Close >中期趋势线);
7. 股价下穿中期趋势线:=(Close <中期趋势线);
8. 股价上穿短期趋势线:=(Close >短期趋势线);
9. 股价下穿短期趋势线:=(Close <短期趋势线);
通过以上公式,投资者可以在通达信软件中使用趋势线画法功能,轻松绘制出股票的长期、中期和短期趋势线,从而更好地判断股票市场的趋势。

不过,这只是一个简单的通达信画线公式,投资者可以根据自己的需求和技巧,设计更加复杂的画线公式,更好地分析市场趋势。

【股票指标公式下载】-【通达信】每股收益(画线、标识文字、参考函数)

【股票指标公式下载】-【通达信】每股收益(画线、标识文字、参考函数)

【通达信】每股收益(画线、标识文字、参考函数)-指标公式源码{画线}FINANCE(32);FINANCE(33);FINANCE(34);0,LINETHICK3;{标识文字}DRAWTEXT(C=CONST(C) AND O=CONST(O),FINANCE(32),'每股未分配利润'),COLORYELLOW;DRAWTEXT(C=CONST(C) AND O=CONST(O),FINANCE(33),'每股收益'),COLORYELLOW;DRAWTEXT(C=CONST(C) AND O=CONST(O),FINANCE(34),'每股净资产'),COLORYELLOW;=====================================参考函数FINANCE(1) 总股本(万股)FINANCE(2) 国家股(万股)FINANCE(3) 发起人法人股(万股)FINANCE(4) 法人股(万股)FINANCE(5) B股(万股)FINANCE(6) H股(万股)FINANCE(7) 流通股本(万股)CAPITAL 流通股本(手)FINANCE(8) 职工股(万股)FINANCE(10) 总资产FINANCE(11) 流动资产FINANCE(12) 固定资产FINANCE(13) 无形资产FINANCE(14) 长期投资FINANCE(15) 流动负债FINANCE(16) 长期负债FINANCE(17) 资本公积金FINANCE(18) 每股公积金FINANCE(19) 股东权益FINANCE(20) 主营收入FINANCE(21) 主营利益FINANCE(22) 其它利益FINANCE(23) 营业利益FINANCE(24) 投资收益FINANCE(25) 补贴收入FINANCE(26) 营业外收支FINANCE(27) 上年损益调整FINANCE(28) 利益总额FINANCE(29) 税后利益FINANCE(30) 净利益FINANCE(31) 未分配利益FINANCE(32) 每股未分配利润FINANCE(33) 每股收益FINANCE(34) 每股净资产FINANCE(35) 调整每股净资产FINANCE(36) 股东权益比FINANCE(40) 流通市值FINANCE(41) 总市值FINANCE(42) 上市日期【通达信】每股收益(画线、标识文字、参考函数)-指标公式效果图(文档来源:若水财经社区)。

目前最好用的缠论画笔线段公式--通达信

目前最好用的缠论画笔线段公式--通达信

目前最好用的缠论画笔线段公式--通达信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;。

通达信公式教程大全(公式+指标+实例)

通达信公式教程大全(公式+指标+实例)

通达信公式教程大全(公式+指标+实例)本文介绍了通达信中常用的公式和指标,并给出了相应的实例说明。

希望能帮助读者更好地使用通达信软件。

一、公式1. 移动平均线 (Moving Average, MA)移动平均线是分析股票价格走势的常用工具之一,用于平滑价格曲线,使趋势更加明显。

通达信中的移动平均线公式为:MA(n) = (C + C1 + C2 + ... + C(n-1) + C(n)) / n其中,MA(n) 表示第 n 日的移动平均线值,C 表示当日的收盘价。

2. 相对强弱指数 (Relative Strength Index, RSI)相对强弱指数是用来测量股票价格走势强度的指标,其数值介于0和100之间。

通达信中的相对强弱指数公式为:RSI(n) = 100 - [100 / (1 + RS)]RS = GainAverage(n) / LossAverage(n)其中,RSI(n) 表示第n 日的相对强弱指数,RS表示相对强度,GainAverage(n) 表示涨幅平均值,LossAverage(n) 表示跌幅平均值。

3. 布林带指标 (Bollinger Bands, BOLL)布林带指标用于判断股票价格的波动情况,由上、中、下三条线组成。

通达信中的布林带指标公式为:UP(n) = MA(n) + 2 * Std(n)DN(n) = MA(n) - 2 * Std(n)其中,UP(n) 表示上轨线,DN(n) 表示下轨线,Std(n) 表示标准差。

二、指标1. 成交量 (Volume)成交量指标用于衡量股票交易的活跃度。

通达信中可以通过画柱状图的方式显示成交量。

2. 相对强弱指数 (Relative Strength Index, RSI)相对强弱指数在公式部分已经进行了介绍,这里重点说明其在通达信中的显示形式。

通达信以0和100作为区间,通过画线的方式显示相对强弱指数。

3. 动量指标 (Momentum)动量指标用来测量股票价格的变动速度,可以判断价格的超买超卖情况。

通达信指标公式源码精准画线公式

通达信指标公式源码精准画线公式

N1:=20;N2:=10;N3:=5;AA:=REF(H,N1)=HHV(H,2*N1+1);QY:=BACKSET(AA,N1+1);CC:=FILTER(QY,N1) AND H=HHV(H,N1+1);DDD:=BARSLAST(CC);GDTS:=IF(CC,CURRBARSCOUNT,0);DINGBU:=IF(DDD,REF(H,DDD),H);{顶部}DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);DINGBU1:=REF(DINGBU,DDD+1);GDCS1:=CONST(DINGBUTS);DINGBUTS1:=REF(DINGBUTS,DDD+1);GDCS2:=CONST(DINGBUTS1);DINGBU2:=REF(DINGBU1,DDD+1);MM:=IF(CURRBARSCOUNT>GDCS2,0,1);{DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H,GDCS2-1),1),CO LOR0055FF,POINTDOT,LINETHICK2;DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COL ORYELLOW,POINTDOT,LINETHICK2;}AA1:=REF(L,N1)=LLV(L,2*N1+1);QY1:=BACKSET(AA1,N1+1);CC1:=FILTER(QY1,N1) AND L=LLV(L,N1+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,ISLASTBAR,REF(L,DDCS2-1),1),COLOR0055FF,POINTDOT,LINETHICK2;DRAWLINE(CURRBARSCOUNT=DDCS1,L,ISLASTBAR,REF(L,DDCS1-1),1),COL ORYELLOW,POINTDOT,LINETHICK2;}LAA:=REF(H,N2)=HHV(H,2*N2+1);LQY:=BACKSET(LAA,N2+1);LCC:=FILTER(LQY,N2) AND H=HHV(H,N2+1);LDDD:=BARSLAST(LCC);LGDTS:=IF(LCC,CURRBARSCOUNT,0);LDINGBU:=IF(LDDD,REF(H,LDDD),H);{顶部}LDINGBUTS:=IF(LDDD,REF(LGDTS,LDDD),LGDTS);LDINGBU1:=REF(LDINGBU,LDDD+1);LGDCS1:=CONST(LDINGBUTS);LDINGBUTS1:=REF(LDINGBUTS,LDDD+1);LGDCS2:=CONST(LDINGBUTS1);LDINGBU2:=REF(LDINGBU1,LDDD+1);LMM:=IF(CURRBARSCOUNT>LGDCS2,0,1);{DRAWLINE(CURRBARSCOUNT=LGDCS2,H,ISLASTBAR,REF(H,LGDCS2-1),1), COLOR0055FF,POINTDOT;DRAWLINE(CURRBARSCOUNT=LGDCS1,H,ISLASTBAR,REF(H,LGDCS1-1),1),C OLORYELLOW,POINTDOT;}LAA1:=REF(L,N2)=LLV(L,2*N2+1);LQY1:=BACKSET(LAA1,N2+1);LCC1:=FILTER(LQY1,N2) AND L=LLV(L,N2+1);LDD1:=BARSLAST(LCC1);LDDTS:=IF(LCC1,CURRBARSCOUNT,0);LYDB:=IF(LDD1,REF(L,LDD1),L);LDDTS1:=IF(LDD1,REF(LDDTS,LDD1),LDDTS);LDDCS1:=CONST(LDDTS1);LZDB:=REF(LYDB,LDD1+1);LDDTS2:=REF(LDDTS1,DD1+1);LDDCS2:=CONST(LDDTS2);DDYL2:=DRAWLINE(CURRBARSCOUNT=LGDCS2,H,CURRBARSCOUNT=LGDC S1,H,1) COLORWHITE;DDZC2:=DRAWLINE(CURRBARSCOUNT=LDDCS2,L,CURRBARSCOUNT=LDDC S1,L,1) COLORWHITE;ZGSTAR:=(DDYL2+DDZC2)/2;ZGEND:=CONST((DDYL2+DDZC2)/2);STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);LLAA:=REF(H,N3)=HHV(H,2*N3+1);LLQY:=BACKSET(LLAA,N3+1);LLCC:=FILTER(LLQY,N3) AND H=HHV(H,N3+1);LLDDD:=BARSLAST(LLCC);LLGDTS:=IF(LLCC,CURRBARSCOUNT,0);LLDINGBU:=IF(LLDDD,REF(H,LLDDD),H);{顶部}LLDINGBUTS:=IF(LLDDD,REF(LLGDTS,LLDDD),LLGDTS);LLDINGBU1:=REF(LLDINGBU,LLDDD+1);LLGDCS1:=CONST(LLDINGBUTS);LLDINGBUTS1:=REF(LLDINGBUTS,LLDDD+1);LLGDCS2:=CONST(LLDINGBUTS1);LLDINGBU2:=REF(LLDINGBU1,LLDDD+1);LLMM:=IF(CURRBARSCOUNT>LGDCS2,0,1);{DRAWLINE(CURRBARSCOUNT=LLGDCS2,H,ISLASTBAR,REF(H,LLGDCS2-1),1 ),COLOR0055FF,POINTDOT;DRAWLINE(CURRBARSCOUNT=LLGDCS1,H,ISLASTBAR,REF(H,LLGDCS1-1),1) ,COLORYELLOW,POINTDOT;}LLAA1:=REF(L,N3)=LLV(L,2*N3+1);LLQY1:=BACKSET(LLAA1,N3+1);LLCC1:=FILTER(LLQY1,N3) AND L=LLV(L,N3+1);LLDD1:=BARSLAST(LCC1);LLDDTS:=IF(LLCC1,CURRBARSCOUNT,0);LLYDB:=IF(LLDD1,REF(L,LLDD1),L);LLDDTS1:=IF(LLDD1,REF(LLDDTS,LLDD1),LDDTS);LLDDCS1:=CONST(LLDDTS1);LLZDB:=REF(LLYDB,LLDD1+1);LLDDTS2:=REF(LLDDTS1,DD1+1);LLDDCS2:=CONST(LLDDTS2);GDYL3:=DRAWLINE(CURRBARSCOUNT=LLGDCS2,H,CURRBARSCOUNT=LLG DCS1,H,1) COLORYELLOW;DDZC3:=DRAWLINE(CURRBARSCOUNT=LLDDCS2,L,CURRBARSCOUNT=LLDD CS1,L,1) COLORYELLOW;LZGSTAR:=(GDYL3+DDZC3)/2;LZGEND:=CONST((GDYL3+DDZC3)/2);LSTARDAY:=IF(LLDDCS2<LLGDCS2,LLDDCS2,LLGDCS2);GDYL1:=DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1 ,H,1) COLORRED;DDZC1:=DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1, L,1) COLORRED;长线压力:DDZC1+(GDYL1-DDZC1)*0.809,COLORRED;长线支撑:DDZC1+(GDYL1-DDZC1)*0.191,COLORRED;中线压力:DDZC2+(DDYL2-DDZC2)*0.809,COLORGREEN;中线支撑:DDZC2+(DDYL2-DDZC2)*0.191,COLORGREEN;短线压力:DDZC3+(GDYL3-DDZC3)*0.809,COLORBLUE;短线支撑:DDZC3+(GDYL3-DDZC3)*0.191,COLORBLUE;L中轨:DRAWLINE(CURRBARSCOUNT=LSTARDAY,LZGSTAR,ISLASTBAR,LZGEND,1 ),COLORYELLOW;中轨:DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR,ZGEND,1),COLORWHITE;长GDYL:DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H, 1) COLORRED,POINTDOT;长DDZC:DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L, 1) COLORRED,POINTDOT;中DDYL:DRAWLINE(CURRBARSCOUNT=LGDCS2,H,CURRBARSCOUNT=LGDCS1, H,1) COLORWHITE,POINTDOT;中DDZC:DRAWLINE(CURRBARSCOUNT=LDDCS2,L,CURRBARSCOUNT=LDDCS1, L,1) COLORWHITE,POINTDOT;短GDYL:DRAWLINE(CURRBARSCOUNT=LLGDCS2,H,CURRBARSCOUNT=LLGDCS 1,H,1) COLORYELLOW,POINTDOT;短DDZC:DRAWLINE(CURRBARSCOUNT=LLDDCS2,L,CURRBARSCOUNT=LLDDCS 1,L,1) COLORYELLOW,POINTDOT;。

通达信趋势画线标公式

通达信趋势画线标公式

通达信趋势画线标公式指标画波浪线用到了未来函数;波浪线红色为上涨、蓝色为下跌;趋势线红色主升阶段,蓝色为主跌;源码:M1:=5;M2:=10;M3:=20;M4:=60;DRAWGBK(C>0,RGB(0,10,10),RGB(88,0,0),0,'0',0);DRAWGBK(C>0,RGB(40,120,20),RGB(00,00,00),0,'0',1);DRAWGBK(C>0,RGB(80,100,120),RGB(00,00,00),0,'0',1);MA1:MA(CLOSE,M1);MA2:MA(CLOSE,M2);MA3:MA(CLOSE,M3);MA4:MA(CLOSE,M4);BM:=EMA(C,2);SM:=EMA(SLOPE(C,21)*20+C,42);BU:=CROSS(BM,SM);SEL:=CROSS(SM,BM);DRAWICON(BU,L-0.05,1);DRAWICON(SEL,H+0.03,2);STICKLINE(BM>=SM,LOW,HIGH,0,1),COLORRED;STICKLINE(BM>=SM,CLOSE,OPEN,3,1),COLORRED;STICKLINE(BM<SM,LOW,HIGH,0,1),COLORCYAN;STICKLINE(BM<SM,CLOSE,OPEN,3,1),COLORCYAN;{缠论}{五线顺上的拐点定位线,有未来函数}局部低点预选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&gt;REF(H,1),1,IF(H<REF(L,1),-1,0));距前高天:=BARSLAST(局部高点预选C=1);距前低天:=BARSLAST(局部低点预选C=-1);小值周期:=LOWRANGE(L);大值周期:=TOPRANGE(H);低保留AA:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);低保留AB:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR LLV(L,距前低天+2)<REF(LLV(L,距前低天+1),1)),-1,0);低保留S:=IF((低保留AA=-1 OR 低保留AB=-1) AND L<REF(H,距前高天+1),-1,0);预判:=IF((距前低天<4 AND HHV(缺口判断,距前低天)!=1) OR REF(低保留S,距前低天)=0,1,0);判断:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND 预判=1 AND 大值周期>REF(小值周期,距前低天+1) AND 大值周期>REF(小值周期,距前低天) AND 大值周期>REF(大值周期,距前高天),1,0);高保留A:=IF(局部高点预选C=1 AND REF(距前低天,1)>REF(距前高天,1) AND HHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0);高保留B:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND REF(低保留S,距前低天)=-1 AND (距前低天>=4 OR HHV(缺口判断,距前低天)=1),1,0);高保留:=IF((高保留A=1 OR 高保留B=1 OR 判断=1) AND H>REF(L,距前低天+1),1,0);预判A:=IF((距前高天<4 AND HHV(缺口判断,距前高天)!=1) OR REF(高保留,距前高天)=0,1,0);判断A:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND 预判A=1 AND 小值周期>REF(大值周期,距前高天+1) AND 小值周期>REF(大值周期,距前高天) AND 小值周期>REF(小值周期,距前低天),-1,0);低保留A:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);低保留B:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR 判断A=-1),-1,0);低保留:=IF((低保留A=-1 OR 低保留B=-1) AND L<REF(H,距前高天+1),-1,0);距前高天A:=BARSLAST(高保留=1);距前低天A:=BARSLAST(低保留=-1);预判X:=IF((距前低天A<4 AND HHV(缺口判断,距前低天A)!=1) OR REF(低保留,距前低天A)=0,1,0);判断X:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND 预判X=1 AND 大值周期>REF(小值周期,距前低天A+1) AND 大值周期>REF(小值周期,距前低天A) AND 大值周期>REF(大值周期,距前高天A),1,0);高保留XA:=IF(局部高点预选C=1 AND REF(距前低天A,1)>REF(距前高天A,1) AND HHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0);高保留XB:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND REF(低保留,距前低天A)=-1 AND (距前低天A>=4 OR HHV(缺口判断,距前低天A)=1),1,0);高保留X:=IF((高保留XA=1 OR 高保留XB=1 OR 判断X=1) AND H>REF(L,距前低天A+1),1,0);预判XA:=IF((距前高天A<4 AND HHV(缺口判断,距前高天A)!=1) OR REF(高保留XA,距前高天A)=0,1,0);判断XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND 预判XA=1 AND 小值周期>REF(大值周期,距前高天A+1) AND 小值周期>REF(大值周期,距前高天A) AND 小值周期>REF(小值周期,距前低天A),-1,0);低保留XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)>REF(距前低天A,1) AND LLV(L,距前高天A+1)<REF(LLV(L,距前高天A+1),1),-1,0);低保留XB:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND (距前高天A>=4 OR LLV(缺口判断,距前高天A)=-1 OR 判断XA=-1),-1,0);低保留X:=IF((低保留XA=-1 OR 低保留XB=-1) AND L<REF(H,距前高天A+1),-1,0);距前高天YA:=BARSLAST(高保留X=1);距前低天YA:=BARSLAST(低保留X=-1);预判YX:=IF((距前低天YA<4 AND HHV(缺口判断,距前低天YA)!=1) OR REF(低保留X,距前低天YA)=0,1,0);判断YX:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND 预判YX=1 AND 大值周期>REF(小值周期,距前低天YA+1) AND 大值周期>REF(小值周期,距前低天YA) AND 大值周期>REF(大值周期,距前高天YA),1,0);高保留YXA:=IF(局部高点预选C=1 AND REF(距前低天YA,1)>REF(距前高天YA,1) AND HHV(H,距前低天YA+1)>REF(HHV(H,距前低天YA+1),1),1,0);高保留YXB:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND REF(低保留X,距前低天YA)=-1 AND (距前低天YA>=4 OR HHV(缺口判断,距前低天YA)=1),1,0);高保留YX:=IF((高保留YXA=1 OR 高保留YXB=1 OR 判断YX=1) AND H>REF(L,距前低天YA+1),1,0);预判YXA:=IF((距前高天YA<4 AND HHV(缺口判断,距前高天YA)!=1) OR REF(高保留YXA,距前高天YA)=0,1,0);判断YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND 预判YXA=1 AND 小值周期>REF(大值周期,距前高天YA+1) AND 小值周期>REF(大值周期,距前高天YA) AND 小值周期>REF(小值周期,距前低天YA),-1,0);低保留YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)>REF(距前低天YA,1) AND LLV(L,距前高天YA+1)<REF(LLV(L,距前高天YA+1),1),-1,0);低保留YXB:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND (距前高天YA>=4 OR LLV(缺口判断,距前高天YA)=-1 OR 判断YXA=-1),-1,0);低保留YX:=IF((低保留YXA=-1 OR 低保留YXB=-1) AND L<REF(H,距前高天YA+1),-1,0);AAAD:=IF(高保留YX=1 AND 低保留YX=-1 AND H>REF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1 AND 低保留YX=-1 AND L<REF(L,REF(距前低天YA,1)+2),-1,0));极点保留:=IF(AAAD=0,高保留YX+低保留YX,AAAD);局部极点:IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL)),CIRCLEDOT,COLORYELLOW;DRAWLINE(极点保留=-1,局部极点,极点保留=1,局部极点,0)COLORLIRED,LINETHICK3;DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0)COLORLICYAN,LINETHICK5;DD1:=BARSLAST(ABS(极点保留)!=1);DRAWICON(极点保留=1,局部极点,2);DRAWICON(极点保留=-1,局部极点,1);。

通达信顶底画线突破主图指标公式

通达信顶底画线突破主图指标公式

通达信顶底画线突破主图指标公式{基本资料}品种类型:=FINANCE(3);所属板块:=HYBLOCK;上市天数:=FINANCE(42);股总市值:=ROUND(FINANCE(41)/100000000);流通市值:=ROUND(FINANCE(40)/100000000);股东人数:=FINANCE(8);人均持股:=ROUND(FINANCE(7)/FINANCE(8));{}DRAWTEXT_FIX(1,0.008,0.01,0,'基本资料:'),COLORFFCC99;DRAWTEXT_FIX(1,0.008,0.05,0,'品种类型:'),COLOR99CCFF;DRAWTEXT_FIX(1,0.008,0.09,0,'行业板块:'),COLOR99CCFF;DRAWTEXT_FIX(1,0.008,0.13,0,'上市天数:'),COLOR99CCFF;DRAWTEXT_FIX(1,0.008,0.17,0,'股东人数:'),COLOR99CCFF;DRAWTEXT_FIX(1,0.008,0.21,0,'人均持股:'),COLOR99CCFF;{}DRAWTEXT_FIX(品种类型=1,0.055,0.05,0,'沪深 A 股'),COLORYELLOW;DRAWTEXT_FIX(品种类型=2,0.055,0.05,0,' 中小板'),COLORYELLOW;DRAWTEXT_FIX(品种类型=3,0.055,0.05,0,' 创业板'),COLORYELLOW;DRAWTEXT_FIX(1,0.055,0.09,0,HYBLOCK),COLORYELLOW;{行业板块}{数值}DRAWNUMBER_FIX(1,0.050,0.13,0,上市天数),COLORGREEN;DRAWNUMBER_FIX(1,0.050,0.17,0,股东人数),COLORGREEN;DRAWNUMBER_FIX(1,0.050,0.21,0,人均持股),COLORGREEN;{单位}DRAWTEXT_FIX(1,0.08,0.13,0,'天'),COLORWHITE;DRAWTEXT_FIX(1,0.08,0.17,0,'人'),COLORWHITE;DRAWTEXT_FIX(1,0.08,0.21,0,'股'),COLORWHITE;{所属板块}DRAWTEXT_FIX(1,0.008,0.25,0,'地区板块:')COLOR99CCFF;DRAWTEXT_FIX(1,0.048,0.25,0,DYBLOCK)COLORGREEN;DRAWTEXT_FIX(1,0.088,0.25,0,'概念板块:')COLOR99CCFF;DRAWTEXT_FIX(1,0.128,0.25,0,GNBLOCK)COLORGREEN;DRAWTEXT_FIX(1,0.008,0.29,0,'风格板块:')COLOR99CCFF;DRAWTEXT_FIX(1,0.048,0.29,0,FGBLOCK)COLORGREEN;获利筹码:IF(WINNER(CLOSE),WINNER(CLOSE)*100,0),NODRAW,COLOR 0080FF;净资产:FINANCE(34),NODRAW,COLORRED;公积金:FINANCE(18),NODRAW,COLORGREEN;未分利润:FINANCE(32),NODRAW,COLORMAGENTA;净资收益率:=STRCAT('净资收益率: ',CON2STR(FINANCE(29)/FINANCE(19)*100,2));每股收益:=STRCAT(' 每股收益: ',CON2STR(FINANCE(38),2));主营利润率:=STRCAT(' 主营利润率',CON2STR(FINANCE(23)/FINANCE(20)*100,2));当前业绩:=STRCAT(' ',STRCAT(STRCAT(净资收益率,每股收益),主营利润率));DRAWTEXT_FIX(ISLASTBAR,0.62,1.2,0,当前业绩),COLORRED; {主图显示}利润增长:FINANCE(43),COLORYELLOW,NODRAW;开幅:100*(O/REF(C,1)-1),COLORYELLOW,NODRAW;箱顶:HHV(MA((LOW+HIGH+CLOSE+O)/4,5),58),DOTLINE,COLORCYAN,LINETHICK1;N3:=60;B3:=EMA(C,3);B4:=SMA(SMA(B3,2,1),2,1);LLV(EMA(B4,1),N3),DOTLINE,COLORCYAN,LINETHICK1;F:EMA(CLOSE,21),COLORRED,LINETHICK2;IF(F>REF(F,1),F,DRAWNULL),LINETHICK2,COLORRED;IF(F网13:EXPMA(CLOSE,13),COLORGRAY,LINETHICK1;{黄金分割线}M:=13;顶1:=REFDATE(HHV(H,M),DATE);底1:=REFDATE(LLV(L,M),DATE);H1:=顶1-(顶1-底1)*0.191;H2:=顶1-(顶1-底1)*0.382;H3:=顶1-(顶1-底1)*0.5;H4:=顶1-(顶1-底1)*0.618;H5:=顶1-(顶1-底1)*0.809;顶部:REFDATE(顶1,DATE),COLOR666666;%19.8:REFDATE(H1,DATE),COLOR666666;%38.2:REFDATE(H2,DATE),COLOR666666;%50:REFDATE(H3,DATE),COLOR666666;%61.8:REFDATE(H4,DATE),COLOR666666;%80.9:REFDATE(H5,DATE),COLOR666666;底部:REFDATE(底1,DATE),COLOR666666;DRAWTEXT(ISLASTBAR,顶部,' 顶部'),COLORGREEN;DRAWTEXT(ISLASTBAR,%19.8,' 19.8%'),COLORMAGENTA;DRAWTEXT(ISLASTBAR,%38.2,' 38.2%'),COLORYELLOW;DRAWTEXT(ISLASTBAR,%50,' 50%'),COLORWHITE;DRAWTEXT(ISLASTBAR,%61.8,' 61.8%'),COLORYELLOW;DRAWTEXT(ISLASTBAR,%80.9,' 80.9%'),COLORMAGENTA;DRAWTEXT(ISLASTBAR,底部,' 底部'),COLORRED;{BS标志}DRAWICON((ZIG(3,5)>REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)<=REF(ZIG(3,5),2))AND (REF(ZIG(3,5),2)<=REF(ZIG(3,5),3)),LOW*0.98,7);DRAWICON((ZIG(3,5)=REF(ZIG(3,5),2))AND (REF(ZIG(3,5),2)>=REF(ZIG(3,5),3)),HIGH*1.02,8);{箱体}{箱顶:PEAK(CLOSE,N,1)*0.98,POINTDOT,LINETHICK3,COLORYELLO W;箱底:TROUGH(CLOSE,N,1)*1.02,POINTDOT,LINETHICK3,COLORFFFF 00;箱高:100*(箱顶-箱底)/箱底,NODRAW;};总额:=AMOUNT;买:=IF(O=C AND (C-REF(C,1))/REF(C,1)*100>9.8,AMOUNT,AMOUNT/((H-L)*2-ABS(O-C))*(C-L));买%:=买/AMOUNT*100;流入:=AMOUNT*买%/10000000000;流出:=AMOUNT/100000000-流入;净流:=(流入-流出);总额3:=SUM(AMOUNT,3);流入3:=SUM(流入,3);流出3:=SUM(流出,3);净流3:=SUM(流入-流出,3);总额5:=SUM(AMOUNT,5);流入5:=SUM(流入,5);流出5:=SUM(流出,5);净流5:=SUM(流入-流出,5);总额10:=SUM(AMOUNT,10);流入10:=SUM(流入,10);流出10:=SUM(流出,10);净流10:=SUM(流入-流出,10);画:=CONST(FINDHIGH(总额10,0,190,1));DRAWTEXT_FIX(1,0.71,0.07,0,'净流(亿):'),COLORMAGENTA,LINETHICK1;DRAWTEXT_FIX(1,0.78,0.05,0,'1日'),COLORMAGENTA,LINETHICK1;DRAWTEXT_FIX(1,0.83,0.05,0,'3日'),COLORMAGENTA,LINETHICK1;DRAWTEXT_FIX(1,0.88,0.05,0,'5日'),COLORMAGENTA,LINETHICK1;DRAWTEXT_FIX(1,0.93,0.05,0,'10日'),COLORMAGENTA,LINETHICK1;DRAWNUMBER_FIX(1,0.78,0.10,0,CONST((净流))),COLORYELLOW;DRAWNUMBER_FIX(1,0.83,0.10,0,CONST((净流3))),COLORYELLOW;DRAWNUMBER_FIX(1,0.88,0.10,0,CONST((净流5))),COLORYELLOW;DRAWNUMBER_FIX(1,0.93,0.10,0,CONST((净流10))),COLORYELLOW;DRAWKLINE(HIGH,OPEN,LOW,CLOSE);MA5:=MA(C,5);MA10: =MA(C,10);MA30:=MA(C,30);FA:=BARSLAST(CROSS(MA10,MA5))AND CROSS(MA5,MA10);FB:=FA AND MA5>MA30 AND MA10>MA30 ANDMA10>REF(MA10,1);{过左峰提示粉色}VAR121:=ZIG(3,6)=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);VAR141:=ZIG(3,22)=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);VAR161:=ZIG(3,51)=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);VAR181:=ZIG(3,72)=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);卖:=(VAR121+VAR141+VAR161+VAR181),LINETHICK2;SQ:D RAWLINE(卖,H,BARSLAST(卖)>=1,REF(H,BARSLAST(卖)),1),COLO RWHITE,LINETHICK2;过峰:=C>SQ AND REF(C,1)VVOL:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,DRAWNULL),NODRAW;预量:=VVOL/REF(V,1)>1.8;现量:=V/REF(V,1)>1.5;过峰1:STICKLINE( 过峰,C,O,5,0)COLORFF00FF;预量1:DRAWICON(过峰 AND 预量, H*1.01,14);现量1:DRAWICON(过峰 AND 现量,(O+C)/2,23);前次低点:LLV(L*1,250)POINTDOT,COLORFF00FF,LINETHICK4;。

通达信趋势自动画线公式

通达信趋势自动画线公式

通达信趋势⾃动画线公式应⽤宝搜:短线⽜股N:=3;A1:=REF(H,N)=HHV(H,2*N+1);B1:=FILTER(A1,N);C1:=BACKSET(B1,N+1);D1:=FILTER(C1,N);{⾼点}A2:=REF(L,N)=LLV(L,2*N+1);B2:=FILTER(A2,N);C2:=BACKSET(B2,N+1);D2:=FILTER(C2,N);{低点}E1:=(REF(LLV(L,2*N),1)+REF(HHV(H,2*N),1))/2;E2:=(H+L)/2;{⾼低点出现在同⼀K线上时可作取舍}H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(C)=1;L1:=(D2 AND NOT(D1 AND E1H2:=D1 AND NOT(D2 AND E1>=E2);X1:=REF(BARSLAST(H1),1)+1;F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,L,10000),X1));G1:=F1>REF(F1,1);I1:=BACKSET(G1,2);LD:=I1>REF(I1,1),LINETHICK0;{过滤后低点}L2:=LD OR ISLASTBAR OR BARSCOUNT(C)=1;X2:=REF(BARSLAST(L2),1)+1;F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,H,0),X2));G2:=F2>REF(F2,1);I2:=BACKSET(G2,2);HD:=I2>REF(I2,1),LINETHICK0;{过滤后⾼点}R1:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);S1:=R1>REF(R1,1);{前⼀⾼}T1:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);U1:=T1>REF(T1,1);{前⼀低}R2:=BACKSET(S1,REF(BARSLAST(HD),1)+2);S2:=R2>REF(R2,1);{前⼆⾼}T2:=BACKSET(U1,REF(BARSLAST(LD),1)+2);U2:=T2>REF(T2,1);{前⼆低}T3:=BACKSET(U2,REF(BARSLAST(LD),1)+2);U3:=T3>REF(T3,1);{前三低}T4:=BACKSET(U3,REF(BARSLAST(LD),1)+2);U4:=T4>REF(T4,1);{前四低}R3:=BACKSET(S2,REF(BARSLAST(HD),1)+2);S3:=R3>REF(R3,1);{前三⾼}R4:=BACKSET(S3,REF(BARSLAST(HD),1)+2);S4:=R4>REF(R4,1);{前四⾼}★压⼒1:DRAWLINE(S2,H,S1,H,1),COLORMAGENTA,LINETHICK1;★⽀撑1:DRAWLINE(U2,L,U1,L,1),COLOR8FBC8F,LINETHICK1;★压⼒2:DRAWLINE(S3,H,S2,H,1),COLORFF8000;★⽀撑2:DRAWLINE(U3,L,U2,L,1),COLOR99CC32;★压⼒3:DRAWLINE(S4,H,S2,H,1),COLOR0000FF;★⽀撑3:DRAWLINE(U4,L,S2,H,1),COLOR00FF7F; DRAWICON(S2,H*1.01,10);DRAWICON(S3,H*1.01,10);DRAWNUMBER(S2,H*1.02,H),COLORCFB53B; DRAWNUMBER(S1,H*1.02,H),COLORCFB53B; DRAWNUMBER(S3,H*1.02,H),COLORCFB53B; DRAWICON(U1,L*0.99,11);DRAWICON(U2,L*0.99,11);DRAWICON(U3,L*0.99,11);DRAWICON(U4,L*0.99,11);DRAWNUMBER(U1,L*0.98,L),COLORCYAN; DRAWNUMBER(U2,L*0.98,L),COLORCYAN; DRAWNUMBER(U3,L*0.98,L),COLORCYAN; DRAWNUMBER(U4,L*0.98,L),COLORCYAN;。

通达信指标公式源码自动画线主图指标公式

通达信指标公式源码自动画线主图指标公式

通达信自动画线主图指标公式自动化线的顶底两条线有未来,其他没有未来JRH:=HHV(C,2);JRL:=LLV(C,2);MA3:=MA(CLOSE,3);YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;R1:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2));R2:=(REF(R1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R3:=(REF(R2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R4:=(REF(R3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R5:=(REF(R4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R6:=(REF(R5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R7:=(REF(R6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R8:=(REF(R7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R9:=(REF(R8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); RA:=(REF(R9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); RB:=(REF(RA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); RC:=(REF(RB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); RD:=(CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2));RE:=(REF(RD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); RF:=(REF(RE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R10:=(REF(RF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R11:=(REF(R10,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));R12:=(REF(R11,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));R13:=(REF(R12,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));R14:=(REF(R13,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));R15:=(REF(R14,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));R16:=(REF(R15,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));R17:=(REF(R16,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));R18:=(REF(R17,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));R19:=REF(RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,1) AND R1;R1A:=((REF(R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,1)) AND RD);VAR3:=IF(C<200 ,MA(COST(80),3),2500),NODRAW;VAR4:=(((HIGH + LOW) + CLOSE) / 3);VAR5:=EMA(((((OPEN + HIGH) + LOW) + CLOSE) / 4),2330);VAR6:=(VAR5 + ((VAR5 * 6) / 100));春买:=R19,NODRAW,COLOR00DD00;秋离场:=R1A,NODRAW,COLOR2288EE;红持股:=R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,NODRAW,COLOR0000FF;阴观望:=RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,NODRAW,COLOR999999;急速超跌关注:=(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*100<-14,COLORBBBBBB,NODRA W;离场:=IF(红持股,JRL,DRAWNULL);明离场价:=离场,COLORFF99FF,NODRAW;今离场价:=REF(离场,1)COLOR0000FF,NODRAW;进:=IF(阴观望,JRH,DRAWNULL);明进场价:=进,COLOR33AACC,NODRAW;今进场价:=REF(明进场价,1),COLOR00FF00,NODRAW;STICKLINE(ISLASTBAR AND (红持股OR REF(红持股,1)=1),今离场价,今离场价,20,1),COLOR0000FF;STICKLINE(ISLASTBAR AND (阴观望OR REF(阴观望,1)=1),今进场价,今进场价,20,1),COLOR00FF00;XX2:EMA(EMA((CLOSE+LOW+HIGH)/3,3),23),COLORGREEN, LINETHICK2; XX3:=REF(XX2,1);IF(XX2>XX3,XX2,DRAWNULL),COLORRED, LINETHICK2;B11:=MA(CLOSE,1);B22:=SMA(SMA(SMA(B11,2,1),2,1),2,1) ;SMA2:=MA(B22,3) ;DRAWBAND(B22,RGB(255,0,0),SMA2,RGB(0,255,0));下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100); RRRSV:=SMA(下档线,3,1);KKK:=SMA(RRRSV,3,1);DDDDD:=((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,DDDDD),HIGH,REF(HIGH,BARSLAST(CROSS(D24,DDDDD)) )),COLORFFFFFF;底部:=LLV(HIGH,30),COLOR00FF00;压力位:=IF(ISLASTBAR,压力2,DRAWNULL),NODRAW;底部位:=IF(ISLASTBAR,底部,DRAWNULL),NODRAW;STICKLINE(ISLASTBAR ,压力位,压力位,40,0),COLORFF00FF,LINETHICK2; STICKLINE(ISLASTBAR ,底部位,底部位,35,0),COLOR00FFFF,LINETHICK2;B1:=REF(CLOSE,1);B2:=REF(CLOSE,2);B3:=REF(CLOSE,3);B4:=REF(CLOSE,4);CMAX:=MAX(MAX(MAX(CLOSE,B1),B2),B3);CMIN:=MIN(MIN(MIN(CLOSE,B1),B2),B3);持股:=(CLOSE=CMAX AND (B1>=B2 OR B1>=B3)) OR ((B1=CMAX AND(B2=CMIN OR B3=CMIN)) AND CLOSE>=B2) OR(B2=CMAX AND B3=CMIN AND CLOSE>=B1) OR (B3=CMAX AND CLOSE>=B1 AND CLOSE>=B2);STICKLINE(持股,B1,CLOSE,3,0),COLOR000099;变盘:=CLOSE=CMAX AND B1=CMIN;STICKLINE(变盘,B2,CLOSE,3,0),COLOR0099EF;下跌:=(CLOSE=CMIN AND (B1<B2 OR B1<B3)) OR ((B1=CMIN AND(B2=CMAX OR B3=CMAX)) AND CLOSE<B2) OR(B2=CMIN AND B3=CMAX AND CLOSE<B1) OR (B3=CMIN AND CLOSE<B1 AND CLOSE<B2);STICKLINE(下跌,B1,CLOSE,3,0),COLOR009900;STICKLINE(B1=CMAX AND CLOSE=CMIN,B2,CLOSE,3,0),COLOR009900;买入:=(B1=CMIN AND CLOSE>=B2) OR ((B2=CMIN AND B1<=B3) OR(B3=CMIN AND B1<=B2) AND B2<B4 AND CLOSE>=B1);STICKLINE(买入,B1,B2,3,0),COLOR00FFFF;抛售:=(B1=CMAX AND CLOSE<B2) OR ((B2=CMAX AND B1>B3) OR(B3=CMAX AND B1>B2) AND B2>=B4 AND CLOSE<B1);STICKLINE(抛售,B1,B2,3,0),COLORFFFFFF;STICKLINE(C>=O,L,H,0,1),COLORRED;STICKLINE(C<O,H,L,0,1),COLORGREEN;STICKLINE(持股OR 买入,O,C,1.5,0),COLORRED;STICKLINE(下跌OR 抛售,O,C,1.5,0),COLORGREEN;STICKLINE(C>0,O,C,0,0),COLORFFFFFF;MMA:=CONST(HHV(H,90));MMB:=CONST(LLV(L,90));WN:=3;{原码N:=3;}WA1:=REF(H,WN)=HHV(H,2*WN+1); WB1:=FILTER(WA1,WN);WC1:=BACKSET(WB1,WN+1); WD1:=FILTER(WC1,WN);{高点}WA2:=REF(L,WN)=LLV(L,2*WN+1); WB2:=FILTER(WA2,WN);WC2:=BACKSET(WB2,WN+1); WD2:=FILTER(WC2,WN);{低点}WE1:=(REF(LLV(L,2*WN),1)+REF(HHV(H,2*WN),1))/2;WE2:=(H+L)/2;{高低点出现在同一K线上时可作取舍}WH1:=(WD1 AND NOT(WD2 AND WE1>=WE2)) OR ISLASTBAR OR BARSCOUNT(C)=1;WL1:=(WD2 AND NOT(WD1 AND WE1<WE2)); WH2:=WD1 AND NOT(WD2AND WE1>=WE2);WX1:=REF(BARSLAST(WH1),1)+1; WF1:=BACKSET(WH1 ANDCOUNT(WL1,WX1)>0,LLVBARS(IF(WL1,L,10000),WX1));WG1:=WF1>REF(WF1,1); WI1:=BACKSET(WG1,2);WLD:=WI1>REF(WI1,1);{过滤后低点}WL2:=WLD OR ISLASTBAR OR BARSCOUNT(C)=1;WX2:=REF(BARSLAST(WL2),1)+1; WF2:=BACKSET(WL2 ANDCOUNT(WH2,WX2)>0,HHVBARS(IF(WH2,H,0),WX2));WG2:=WF2>REF(WF2,1); WI2:=BACKSET(WG2,2);WHD:=WI2>REF(WI2,1);{过滤后高点}WR1:=BACKSET(ISLASTBAR,BARSLAST(WHD)+1); WS1:=WR1>REF(WR1,1); {前一高}WT1:=BACKSET(ISLASTBAR,BARSLAST(WLD)+1); WU1:=WT1>REF(WT1,1); {前一低}WR2:=BACKSET(WS1,REF(BARSLAST(WHD),1)+2); WS2:=WR2>REF(WR2,1); {前二高}WT2:=BACKSET(WU1,REF(BARSLAST(WLD),1)+2); WU2:=WT2>REF(WT2,1); {前二低}WT3:=BACKSET(WU2,REF(BARSLAST(WLD),1)+2); WU3:=WT3>REF(WT3,1); {前三低}WT4:=BACKSET(WU3,REF(BARSLAST(WLD),1)+2); WU4:=WT4>REF(WT4,1); {前四低}WR3:=BACKSET(WS2,REF(BARSLAST(WHD),1)+2); WS3:=WR3>REF(WR3,1); {前三高}WR4:=BACKSET(WS3,REF(BARSLAST(WHD),1)+2); WS4:=WR4>REF(WR4,1); {前四高};压力1:=DRAWLINE(WS2,H,WS1,H,1),COLOR008888; {★压力1:}支撑1:=DRAWLINE(WU2,L,WU1,L,1),COLOR008888;{★支撑1:}压力2:=DRAWLINE(WS3,H,WS2,H,1),COLOR888000; {★压力2:}支撑2:=DRAWLINE(WU3,L,WU2,L,1),COLOR888000;{★支撑2:}压力3:=DRAWLINE(WS4,H,WS3,H,1),COLOR0000CC;{★压力3:}支撑3:=DRAWLINE(WU4,L,WU3,L,1),COLOR0000CC;{★支撑3:};BSC:=CONST(MAX(BARSLAST(WS4),BARSLAST(WU4))*3),NODRAW;IF(BETWEEN(压力1,MMA,MMB),压力1,DRAWNULL),COLOR008888,LINETHICK1;IF(BETWEEN(支撑1,MMA,MMB),支撑1,DRAWNULL),COLOR008888,LINETHICK1;IF(BETWEEN(压力2,MMA,MMB),压力2,DRAWNULL),COLOR888000,LINETHICK1;IF(BETWEEN(支撑2,MMA,MMB),支撑2,DRAWNULL),COLOR888000,LINETHICK1;IF(BETWEEN(压力3,MMA,MMB),压力3,DRAWNULL),COLOR0000CC,LINETHICK1;IF(BETWEEN(支撑3,MMA,MMB),支撑3,DRAWNULL),COLOR0000CC,LINETHICK1;底:=SUM(MA(CLOSE,10),9)/11.114;DRAWTEXT(CROSS(LOW,底) AND REF(底,1)>REF(HIGH,1) OR CROSS(HIGH,底),L,'---铁底'),COLOR00FF00;X1:=(3*CLOSE+HIGH+LOW+OPEN)/6;X2:=EMA(X1,10);X3:=REF(X2,1);X4:=(REF(HIGH,1)+REF(LOW,1))/2;X5:=MA(CLOSE,21)+2*STD(CLOSE,21);X6:=REF(CLOSE,1);X7:=(SMA(MAX(CLOSE-X6,0),7,1))/(SMA(ABS(CLOSE-X6),7,1))*100;X8:=CROSS(79,X7);X9:=FILTER(X8,4);WZ1:=POW(MA(CLOSE,5),2)+MA(CLOSE,5);WZ2:=POW(MA(LOW,5),2)+MA(LOW,5);WZ3:=POW(MA(HIGH,5),2)+MA(HIGH,5);WZ4:=(WZ1-LLV(WZ2,9))/(HHV(WZ3,9)-LLV(WZ2,9))*150+65;DK:=SMA(WZ4,3,1)*1.5;DD:=SMA(DK,3,1);DJ:=3*DK-2*DD;WZ5:=EMA(CLOSE,12)-EMA(CLOSE,26);WZ6:=EMA(WZ5,9);WZ7:=2*(WZ5-WZ6);WZ8:=REF(WZ7,1);WZ9:=CROSS(WZ8,WZ7) AND WZ8>0;VAR1T:=EMA(CLOSE,8);VAR2T:=EMA(VAR1T,20);VAR3T:=CROSS(VAR1T,VAR2T);VAR4T:=VAR1T<MA(CLOSE,120);VAR5T:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;VAR6T:=SMA(VAR5T,5,1);VAR7T:=SMA(VAR6T,8,1);VAR8T:=CROSS(VAR6T,VAR7T) AND VAR7T<20;VAR9T:=CLOSE>LLV(CLOSE,60)+0.3*LLV(CLOSE,60) AND VAR8T; VARA:=IF(CLOSE>1000,VAR8T,VAR9T);起步:=VAR3T AND VAR4T;逃遁:=VARA;XL1:=EMA(CLOSE,10)/100;XL2:=MA((XL1-REF(XL1,10))/REF(XL1,10),3)*100;XL3:=MA(XL2,3);XL4:=SMA((CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100,3,1); DRAWTEXT(IF(CROSS(3*XL4-2*SMA(XL4,3,1),8),87,0) AND X2>X3,LOW,'←反弹'),COLOR0000FF;DRAWTEXT(IF(CROSS((VAR1T-LLV(VAR1T,4))/(HHV(VAR1T,4)-LLV(VAR1T,4)) *4*25,87.5) AND VAR1T<40,87,0) AND X2>X3,LOW,'←短买'),COLOR0000AA; DRAWTEXT(IF(CROSS(2*(EMA((CLOSE*2+HIGH+LOW)/4,12)-EMA((CLOSE*2 +HIGH+LOW)/4,26)-(EMA(EMA((CLOSE*2+HIGH+LOW)/4,12)-EMA((CLOSE* 2+HIGH+LOW)/4,26),2)))*5.8,0.47),LOW,0) AND X2>X3,LOW,'←加仓'),COLORFF5ED8;DRAWTEXT(CROSS(X4,X5),HIGH+C*0.01,'←减'),COLORB4FF00; DRAWTEXT(FILTER((WZ9 AND DJ>250) OR X9 ,5),HIGH+C*0.02,'←跑'),COLORBCFF8B;STICKLINE(起步>0,HIGH,LOW,0.8,0),COLOR00FFFF;STICKLINE(起步>0,OPEN,CLOSE,5,0),COLOR00FFFF;DRAWTEXT(逃遁>0,HIGH,'●←逃'),COLOR7FFFD6;X1P:=(C+L+H)/3;BB13:=ATAN(EMA(X1P,13)-REF(EMA(X1P,13),1))*3.1416*10;EMA8:=EMA(C,8);DRAWTEXT(FILTER(BB13>1 ANDEMA(X1P,13)>REF(EMA(X1P,8),1),10),EMA8,'∠45上升'),COLORWHITE; VAR3AA:=IF((CLOSE>REF(CLOSE,1)),88,0);VAR4AA:=IF(((CLOSE)/(REF(CLOSE,1))>1.05) AND ((HIGH)/(CLOSE)<1.01) AND (VAR3AA>0),91,0);DRAWTEXT(FILTER((VAR4AA>90),45),(LOW),'★大胆搏'),COLOR00FFFF;L23:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20; L24:=(HIGH+LOW+CLOSE)/3;L25:=(L24-MA(L24,14))/(0.015*AVEDEV(L24,14));L26:=(L24-MA(L24,70))/(0.015*AVEDEV(L24,70));L27:=IF(L25>=150 AND L25<200 AND L26>=150 AND L26<200,10,0);L28:=IF(L25<=-150 AND L25>-200 AND L26<=-150 AND L26>-200,-10,L27); L29:=100-ABS((CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100);L30:=IF(L29<90,L29,100);L31:=IF(L23>0,L23,0);XL11:=(IF(L28>=200 AND L25>=150,15,IF(L26<=-200 ANDL25<=-150,-15,L28)))+60;XL22:=L31>48 AND XL11>60 AND L30<100;DRAWTEXT(XL22 AND COUNT(XL22,30)=1,L,'大笔买入'),COLORFF00FF; VAR3TD:=100-3*SMA((CLOSE-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))* 100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42)) *100,20,1),15,1);VAR4TD:=100-3*SMA((OPEN-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*1 00,20,1)+2*SMA(SMA((OPEN-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*1 00,20,1),15,1);VAR2TD:=VAR3TD<REF(VAR4TD,1) AND VOL>REF(VOL,1) ANDCLOSE>REF(CLOSE,1);DRAWTEXT(VAR2TD AND COUNT(VAR2TD,30)=1,L,'大资金进场'),COLORFF00FF;DRAWTEXT_FIX(1,0,0,0,'市盈率:'),COLORYELLOW;DRAWNUMBER_FIX(1,0.08,0,0,CONST(DYNAINFO(39))),COLORYELLOW; DRAWTEXT_FIX(1,0.16,0,0,'每股收益(元):'),COLOR0080FF; DRAWNUMBER_FIX(1,0.29,0,0,CONST(FINANCE(33))),COLOR0080FF; DRAWTEXT_FIX(1,0.36,0,0,'莸利比例:'),COLORYELLOW; DRAWNUMBER_FIX(1,0.46,0,0,CONST(WINNER(C )*100)),COLORYELLOW; DRAWTEXT_FIX(1,0,0.05,0,'总股本(万股):'),COLORMAGENTA; DRAWNUMBER_FIX(1,0.13,0.05,0,CONST(FINANCE(1)/10000)),COLORMAGE NTA;DRAWTEXT_FIX(1,0,0.1,0,'所属板块:'),COLORYELLOW;DRAWTEXT_FIX(1,0.1,0.1,0,HYBLOCK),COLOR0080FF;DRAWTEXT_FIX(1,0.21,0.1,0,DYBLOCK),COLOR0080FF;{量能饱和}SAT:=IF((AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100>100,100,(AMOU NT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100);DRAWTEXT_FIX(1,0.35,0.9,0,'量能饱和度:')COLOR00FFFF; DRAWNUMBER_FIX(1,0.48,0.9,0,CONST(SAT)),COLORYELLOW;。

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

【通达信】牛股启动(加速度、强势狙击、加仓)-指标公式源码AA05:MA(C,5),COLOR0099CC;五日乖离率:=(C-AA05)/AA05*100;BB05:=ATAN((AA05/REF(AA05,1)-1)*100)*180/3.1416;速度5:=SMA(EMA((AA05-REF(AA05,1))/REF(AA05,1),3)*100,3,1);加速度5:=EMA((速度5-REF(速度5,1)),3);AA10:=MA(C,10),COLOR00FF00;AA20:=MA(C,20);BB10:=ATAN((AA10/REF(AA10,1 )-1)*100)*180/3.1416;AA30:=MA(C,30);三拾日乖离率:=(C-AA30)/AA30*100;VAR1:=(AA20-AA30)>REF((AA20-AA30),1)AND AA20>REF(AA20,1) AND AA30>REF(AA30,1);VAR2:=(AA30-AA20)<REF((AA30-AA20),1) AND AA20<REF(AA20,1) ANDAA30<REF(AA30,1);BB30:=ATAN((AA30/REF(AA30,1)-1)*100)*180/3.1416;强势狙击:=FILTER(BB30>30 AND BB10>45 AND CROSS(BB05,60),10);加仓:=FILTER(COUNT(CROSS(BB05,30),5)>=1 AND AA05>REF(AA05,1) AND 三拾日乖离率>REF(三拾日乖离率,1) AND AA10>REF(AA10,1) AND 加速度5>REF(加速度5,1) AND 速度5>REF(速度5,1) ,10) ;清仓:=FILTER(COUNT(CROSS(30,BB05),5)>=1 AND (C>AA30 OR O>AA30) ANDAA05<REF(AA05,1) AND 三拾日乖离率<REF(三拾日乖离率,1) ANDAA10<REF(AA10,1),10);DRAWTEXT(加仓,LOW*0.98,'←加仓'),COLORRED;JC:=CROSS(0,五日乖离率) AND 三拾日乖离率<REF(三拾日乖离率,1) ANDAA10>REF(AA10,1) ;减仓:=FILTER(JC,10);MR:=COUNT(CROSS(五日乖离率,0),3)>=1 AND 三拾日乖离率>REF(三拾日乖离率,1) AND AA05>REF(AA05,1) AND (C/REF(C,1)-1)*100>5 AND REF(C,1)<AA30; 买入:=FILTER(MR,10);DRAWTEXT(减仓,HIGH*1.02,'←减仓'),COLORCYAN; DRAWTEXT(买入,LOW*0.98,'←买入'),COLORYELLOW;DRAWTEXT(清仓 ,HIGH*1.02,'←清仓'),COLORGREEN;DRAWTEXT(强势狙击,LOW*0.98,'←牛股启动'),COLORYELLOW;【通达信】牛股启动(加速度、强势狙击、加仓)-指标公式效果图(文档来源:若水财经社区)爆炸启动选股公式VAR0:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100;VAR3:=SMA(VAR0,3,1);VAR1:=SMA(VAR3,4,1)-10;VAR4:=(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))*100;VAR5:=SMA(VAR4,3,1);VAR2:=SMA(VAR5,4,1)-90;STICKLINE(REF(VAR1,1)<VAR1,VAR1,REF(VAR1,1),10,0),COLOR0000FF;0, CIRCLEDOT; STICKLINE(REF(VAR1,1)>VAR1,VAR1,REF(VAR1,1),5,0),COLOR00FF00; STICKLINE(REF(VAR2,1)>VAR2,VAR2,REF(VAR2,1),10,0),COLOR0000FF; STICKLINE(REF(VAR2,1)<VAR2,VAR2,REF(VAR2,1),5,0),COLOR00FF00;0,COLOR0000FF;自动划线公式HIGHN:=10;LOWN:=10;HIGHDISPLAY:=0;LOWDISPLAY:=0;ZGDISPLAY:=0;MADISPLA Y:=0;AA:=REF(H,HIGHN)=HHV(H,2*HIGHN+1);QY:=BACKSET(AA,HIGHN+1);CC:=FILTER(QY,HIGHN) AND H=HHV(H,HIGHN+1);DRAWICON(CC,H*1.02,2);DDD:=BARSLAST(CC);GDTS:=IF(CC,CURRBARSCOUNT,0);DINGBU:=IF(DDD,REF(H,DDD),H);{顶部}DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);DINGBU1:=REF(DINGBU,DDD+1);GDCS1:=CONST(DINGBUTS);DINGBUTS1:=REF(DINGBUTS,DDD+1);GDCS2:=CONST(DINGBUTS1);DINGBU2:=REF(DINGBU1,DDD+1);MM:=IF(CURRBARSCOUNT>GDCS2,0,1);高点压力:DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1) COLORGREEN,LINETHICK2;DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H,GDCS2-1),1),COLOR0055F F,POINTDOT;DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COLORYELLO W,POINTDOT;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,LINETHICK2;ZGSTAR:=(高点压力+低点支撑)/2;ZGEND:=CONST((高点压力+低点支撑)/2);STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);中轨:DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR,ZGEND,1),COLORFF55 BB,LINETHICK2;DRAWLINE(CURRBARSCOUNT=DDCS1,L,ISLASTBAR,REF(L,DDCS1-1),1),COLORMAGEN TA,POINTDOT,;DRAWLINE(CURRBARSCOUNT=DDCS2,L,ISLASTBAR,REF(L,DDCS2-1),1),COLORCYAN, POINTDOT;EMA13:=EMA(C,13),COLORWHITE;EMA21:=EMA(C,21),COLORYELLOW;EMA34:=EMA(C,34),COLORFF00FF;EMA60:=MA(C,60),COLORFFCC66;VAR2:=(2*CLOSE+HIGH+LOW)/4;VAR3:=IF(YEAR>=2099 AND MONTH>2,0,1);VAR4:=LLV(LOW,5); VAR5:=HHV(HIGH,4);散户:=EMA((VAR2-VAR4)/(VAR5-VAR4)*100,4)*VAR3;庄家:=EMA(0.667*REF(散户,1)+0.333*散户,2)*VAR3;DRAWTEXT(CROSS(散户,庄家) AND 散户<30,L-0.05,'←低吸'),COLORLIRED; DRAWTEXT(CROSS(庄家,散户) AND 散户>70,H+0.05,'←高抛'),COLORGREEN; DRAWICON(CROSS(散户,庄家) AND 散户<30,L-0.05,1);DRAWICON(CROSS(庄家,散户) AND 散户>70,H+0.05,2);VAR9:=CLOSE-REF(CLOSE,5);VARA:=EMA(EMA(VAR9,5),5)/EMA(EMA(ABS(VAR9),5),5);VARC:=EMA(EMA(VAR9,20),20)/EMA(EMA(ABS(VAR9),20),20);卖出:=IF(VARA>0 AND CROSS(VARC,VARA),90,100);DRAWICON(卖出<0,H+0.05,2); 买线:=EMA(CLOSE,2);卖线:=EMA(SLOPE(CLOSE,21)*20+CLOSE,42);B1:IF(CROSS(买线,卖线),L-0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORMAGENTA;S1:IF(CROSS(80,RSI)*30,H+0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORYELL OW;VC:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/MA(CLOS E,24)*100+(CLOSE-MA (CLOSE,32))/MA(CLOSE,32)*100)/3;S2:=IF(VC>20 AND FILTER(VC< REF(VC,1),5),H+0.02,DRAWNULL),CIRCLEDOT,LINETHICK3,COLORGREEN;A0:=(L+H+C*2)/4;A1:EMA(A0,14)COLORBLUE,LINETHICK2;A2:=EMA(A0,25)COLORLIBLUE,LINETHICK2;A1X:=(A1-REF(A1,1))/REF(A1,1)*100,NODRAW;A2X:=(A2-REF(A2,1))/REF(A2,1)*100,NODRAW;看多:IF(A1X>=0 AND BARSLAST(CROSS(A1X,0))>0,REF((C+O)/2,BARSLAST(CROSS(A1X,0))),DRAWNULL ),COLORMAGENTA{,LINETHICK2};逃顶:IF(A1X<0 AND BARSLAST(CROSS(0,A1X))>0,REF((C+O)/2,BARSLAST(CROSS(0,A1X))),DRAWNULL ),COLORCYAN,{LINETHICK2};买入持股:IF(A1X>=0,A1,DRAWNULL)COLORRED,LINETHICK3;卖出空仓:IF(A1X<0 AND A2X<0,A1,DRAWNULL)COLORGREEN,LINETHICK3; STICKLINE(CROSS(A1X,0),H,L,0,0 ),COLOR9933FF;STICKLINE(CROSS(A1X,0),C,O,3,0 ),COLOR0000CC;STICKLINE(CROSS(A1X,0),C,O,1,0 ),COLOR0033FF;STICKLINE(CROSS(0,A1X),L,H,0,0 ),COLOR66CC33;十九强技术V5:=MA(VOL,5);V10:=MA(VOL,10);V20:=MA(VOL,20);LDAY1:=BARSLAST(CROSS(V5,V10));LDAY2:=BARSLAST(CROSS(V5,V20));LDAY3:=BARSLAST(CROSS(V10,V20));LTJ1:=(LDAY1>LDAY2 OR LDAY1=LDAY2) {AND COUNT(CROSS(V5,V20),LDAY1)=1} AND LDAY2=0 AND V10<V20;LTJ2:=(C>O AND REF(C,1)<REF(O,1) AND REF(C,2)>REF(O,2) AND C>REF(C,2)); LTJ:=LTJ1 AND LTJ2;LTJ0:=LTJ1 AND V10>REF(V10,1);MA5:MA(C,5),COLORWHITE;MA10:MA(C,10),COLORCYAN;MA20:MA(C,20),COLORRED;MA40:MA(C,40),LINETHICK2,POINTDOT,COLORBLUE;MA60:MA(C,60),LINETHICK2,POINTDOT,COLORGREEN;PDAY1 := BARSLAST(CROSS(MA5,MA60));{5日均线上穿60日均线}PDAY2 := BARSLAST(CROSS(MA10,MA60));{10日均线上穿60日均线,至此形成鸭颈部}{股票软件整理}PDAY3 := BARSLAST(REF(HIGH=HHV(HIGH,PDAY2),1));{形成头部,要下跌} PDAY4 := BARSLAST(CROSS(MA10,MA5){ OR (REF(MA10,1)<REF(MA5,1) AND MA5=MA10)});{下跌后,5日均线和10日均线死叉}PDAY5 := BARSLAST(CROSS(MA5,MA10){ OR (REF(MA5,1)=REF(MA10,1) AND MA5>MA10)});{回落不久,5日均线和10日均线形成金叉,形成部}A1:= PDAY1>PDAY2 AND PDAY2>PDAY3 AND PDAY3>PDAY4 AND PDAY4>PDAY5 AND PDAY5<5;A2:= COUNT(CROSS(MA10,MA5),PDAY2)=1;A3:=MA5>MA60 AND MA10>MA60;{JT:=CROSS(MA20,MA60) AND C>O AND REF(C,1)<REF(O,1) AND REF(C,2)>REF(O,2);CSFR:=CROSS(C,MA20) AND CROSS(C,MA40) AND CROSS(C,MA60);STICKLINE(JT,H,L,1,0),COLORYELLOW;STICKLINE(JT,O,C,8,0),COLORYELLOW;STICKLINE(CSFR,H,L,1,0),COLORWHITE;STICKLINE(CSFR,O,C,8,0),COLORWHITE;DRAWTEXT(CSFR,H,'出水芙蓉'),COLORYELLOW;DRAWTEXT(JT ,L, '价托'),COLORRED;}CSFR:=CROSS(C,MA20) AND CROSS(C,MA40) AND CROSS(C,MA60);YDAY1:=BARSLAST(CROSS(MA5,MA10));YDAY2:=BARSLAST(CROSS(MA5,MA20));YDAY3:=BARSLAST(CROSS(MA10,MA20));YJZZ:=(YDAY1=YDAY2 AND YDAY2=YDAY3 OR (YDAY1-YDAY2=1 OR YDAY2-YDAY3=1)) AND REF(MA5,2)<REF(MA10,2) AND REF(MA10,2)<REF(MA20,2) AND MA5>MA10 AND MA10>MA20 ;YJZZ1:=YDAY1=YDAY2 AND YDAY2=YDAY3 AND MA5>MA10 AND MA10>MA20 AND YDAY1=1;YJT:=YDAY1>=YDAY2 AND YDAY2=0 AND MA10<MA20;DAY1:=BARSLAST(CROSS(MA20,MA40));DAY2:=BARSLAST(CROSS(MA20,MA60));DAY3:=BARSLAST(CROSS(MA40,MA60));TJ0:=DAY1>=DAY2 AND DAY3<5;短顶:MA(REF(HHV(H,40),1),1);头顶:MA(REF(HHV(H,60),1),1);年顶:MA(REF(HHV(H,0),1),1),LINETHICK2,POINTDOT,COLORWHITE;JZZ:=DAY1=DAY2 AND DAY2=DAY3 AND REF(MA20,1)<REF(MA40,1) AND REF(MA40,1)<REF(MA60,1) AND MA20>MA40 AND MA40>MA60;TJ1:=DAY1>=DAY2 AND COUNT(CROSS(MA20,MA60),DAY1)=1{AND (DAY1-DAY2)<10};TJ2:=C>O AND CROSS(C,头顶);TJ21:=C>O AND CROSS(C,短顶);{TJ22:=C>O AND CROSS(C,年顶) AND VOL<V5;换手率小12%}TJ3:=VOL>REF(VOL,1);TJ4:=MA20>MA60 AND MA40>REF(MA40,1) AND MA40<MA60;TJ5:=DAY1>=DAY2 AND DAY2=0 AND MA40<MA60;{TJ:=(TJ2 AND TJ3) OR (TJ21 AND TJ3);}TJ:=DYNAINFO(4)>0AND HHV(HIGH,10)/LLV(LOW,10)<1.25AND REF(CLOSE,1)<(LLV(LOW,15)+(HHV(HIGH,15)-LLV(LOW,15))*0.85)AND CLOSE>OPENAND CLOSE>=HHV(HIGH,10);STICKLINE(LTJ0,H,L,1,0),COLORGREEN;STICKLINE(LTJ0,O,C,8,0),COLORGREEN;STICKLINE(TJ,H,L,1,0),COLORYELLOW;STICKLINE(TJ,O,C,8,0),COLORYELLOW;{STICKLINE(TJ22,H,L,1,0),COLORYELLOW;STICKLINE(TJ22,O,C,8,0),COLORYELLOW;}STICKLINE(LTJ,H,L,1,0),COLORRED;STICKLINE(LTJ,O,C,8,0),COLORRED;STICKLINE(CSFR,H,L,1,0),COLORWHITE;STICKLINE(CSFR,O,C,8,0),COLORWHITE;DRAWTEXT(CSFR,H,'出水芙蓉'),COLORYELLOW;DRAWTEXT(TJ,L-0.2, '放量突破'),COLORRED;{DRAWTEXT(TJ22,H+0.2, '轻松过顶'),COLORWHITE;}DRAWTEXT(LTJ,H+0.5,'量托+多方炮'),COLORYELLOW;DRAWTEXT(LTJ0,H+0.5,'量托'),COLORYELLOW;DRAWTEXT(TJ5,MA60-0.2,'季价托'),COLORYELLOW;DRAWTEXT(YJT,MA20-0.5,'月价托'),COLORYELLOW;DRAWTEXT(JZZ,MA60-0.2,'金蜘蛛'),COLORYELLOW;DRAWTEXT(YJZZ OR YJZZ1,MA20-0.2,'月金蜘蛛'),COLORYELLOW;老鸭头:=(A1 AND A2 AND A3) AND FILTER(A1 AND A2 AND A3 ,5); DRAWTEXT(老鸭头,L,'老鸭头'),COLORGREEN;STICKLINE(老鸭头,H,L,0.5,0),COLORGREEN;STICKLINE(老鸭头,O,C,6,1),COLORGREEN,LINETHICK3主图划线公式DRAWBAND(MA(CLOSE,60),RGB(80,0,0),MA(CLOSE,120),RGB(0,91,0));DRAWBAND(MA(CLOSE,5),RGB(155,50,50),MA(CLOSE,10),RGB(83,123,68));DRAWKLINE(H,O,L,C);MA5:=MA(CLOSE,5),COLORWHITE;MA10:=MA(CLOSE,10),COLORYELLOW;MA30:=MA(CLOSE,30),COLORMAGENTA;MA60:=MA(CLOSE,60),COLORGREEN;MA120:=MA(CLOSE,120),COLORLIMAGENTA;MA240:=MA(CLOSE,240),COLORBLUE,NODRAW;VOL5:=MA(VOL,5),COLORWHITE;VOL10:=MA(VOL,10),COLORYELLOW;VOL40:=MA(VOL,40),COLORFF00FF ;量托:=VOL5>=VOL40 AND CROSS(VOL10,VOL40) AND REF(VOL10,1)<REF(VOL40,1);DRAWTEXT(量托,L-0.012,'量托'),COLORWHITE; AA1:=BARSLAST(MA60>MA30 AND (MA30=MA10 OR MA30>MA10)); BB1:=REF(COUNT(C<MA60,AA1)=AA1,1);CC1:=CROSS(C,MA60) AND VOL>MA(VOL,5) AND (C-REF(C,1))/REF(C,1)*100>3;芙蓉出水:=BB1 AND CC1,COLOR00FF00; DRAWTEXT(芙蓉出水,H+0.3,'芙蓉出水'),COLORFF00FF; STICKLINE(芙蓉出水,H,L,1,1),COLORFF00FF; STICKLINE(芙蓉出水,O,C,3,1),LINETHICK2,COLORFF00FF; MA1:=MA(CLOSE,5);MA2:=MA(CLOSE,10);MA3:=MA(CLOSE,20);ZJ:=AMOUNT/10000;{资金} TM:=V-MA(V,10);{量填满} 一穿三:=MA1>O AND MA2>O AND MA3>O AND MA1<C AND MA2<C AND MA3<C AND CLOSE>OPEN ; DRAWTEXT(一穿三,L-0.012,'一穿三'),COLORFF00FF; STICKLINE(一穿三,OPEN,CLOSE,1,0),COLORFF00FF; TY:=C;A1:=REF(TY,10)=HHV(TY,2*10+1); B1:=FILTER(A1,10); C1:=BACKSET(B1,10+1); HD:=FILTER(C1,10);A2:=REF(TY,10)=LLV(TY,2*10+1); B2:=FILTER(A2,10); C2:=BACKSET(B2,10+1); LD:=FILTER(C2,10);前期高位:REF(C,BARSLAST(HD)),COLORBLUE,POINTDOT; STICKLINE(C,前期高位,前期高位,8,0),COLORBLUE; {高点:=(C/REF(C,BARSLAST(HD))-1)*100,NODRAW;STICKLINE((HIGH-MAX(CLOSE,OPEN))/(HIGH-LOW)>0.667,H,C,0.8,0),COLORBLUE;} 三日不破:=MIN(MIN(L,REF(L,1)),REF(L,2))>=REF(L,3);三日量缩:=(MAX(MAX(V,REF(V,1)),REF(V,2))<REF(V,3));三日价涨A:=C>=REF(C,1);三日价涨B:=C<REF(C,1);三日价涨C:=MIN(MIN(C,REF(C,1)),REF(C,2))>=REF(L,3); TIM:=IF(DATE<1140214,1,0);缩倍柱:=(VOL*1.95<=REF(VOL,1))*TIM;百日低量:=(VOL=LLV(VOL,100))*TIM;倍量柱:=C>REF(C,1)*1.04 AND (VOL>=1.9*REF(VOL,1))*TIM;四日前倍量柱:=(REF(VOL,3)>1.9*REF(VOL,4))*TIM; 四日前高量柱:=(REF(VOL,3)>=REF(VOL,4) AND REF(VOL,3)<1.9*REF(VOL,4) AND 三日量缩)*TIM; 前三引用不成立:=COUNT(REF(四日前倍量柱,1) AND (REF(三日不破,1) OR REF(三日价涨C,1)),3)=0 AND COUNT(REF(四日前高量柱,1) AND (REF(三日不破,1) OR REF(三日价涨C,1)),3)=0; 倍量黄金柱:=四日前倍量柱AND 三日量缩AND 三日不破AND 三日价涨A AND 前三引用不成立; 高量黄金柱:=四日前高量柱AND 三日量缩AND 三日不破AND 三日价涨A AND 前三引用不成立;黄金柱:=倍量黄金柱OR 高量黄金柱; 次倍量黄金柱:=NOT(黄金柱) AND 四日前倍量柱AND 三日量缩AND 三日不破AND 三日价涨 B AND 前三引用不成立; 次高量黄金柱:=NOT(黄金柱) AND 四日前高量柱AND 三日量缩AND 三日不破AND 三日价涨 B AND 前三引用不成立;次黄金柱:=次倍量黄金柱OR 次高量黄金柱; 准倍量黄金柱:=NOT(黄金柱OR 次黄金柱) AND 四日前倍量柱AND ((三日量缩AND 三日价涨C) OR (COUNT(倍量柱,3)>=1 AND 三日不破)) AND 前三引用不成立; 准高量黄金柱:=NOT(黄金柱OR 次黄金柱) AND 四日前高量柱AND (三日量缩AND 三日价涨C) AND 前三引用不成立;准黄金柱:=准倍量黄金柱OR 准高量黄金柱; 倍量将军柱:=NOT(黄金柱OR 次黄金柱OR 准黄金柱) AND 四日前倍量柱AND 三日不破AND 三日价涨 A AND 前三引用不成立; 高量将军柱:=NOT(黄金柱OR 次黄金柱OR 准黄金柱) AND 四日前高量柱AND 三日不破AND 三日价涨 A AND 前三引用不成立;将军柱:=倍量将军柱OR 高量将军柱; 次倍量将军柱:=NOT(黄金柱OR 次黄金柱OR 准黄金柱OR 将军柱) AND 四日前倍量柱AND 三日不破AND 三日价涨 B AND 前三引用不成立; 次高量将军柱:=NOT(黄金柱OR 次黄金柱OR 准黄金柱OR 将军柱) AND 四日前高量柱AND 三日不破AND 三日价涨 B AND 前三引用不成立;次将军柱:=次倍量将军柱OR 次高量将军柱; 准倍量将军柱:=NOT(黄金柱OR 次黄金柱OR 准黄金柱OR 将军柱OR 次将军柱) AND 四日前倍量柱AND 三日价涨 C AND 前三引用不成立; 准高量将军柱:=NOT(黄金柱OR 次黄金柱OR 准黄金柱OR 将军柱OR 次将军柱)AND 四日前高量柱AND 三日价涨 C AND 前三引用不成立;准将军柱:=准倍量将军柱OR 准高量将军柱; BACKSET100:=BACKSET(黄金柱OR 次黄金柱OR 准黄金柱OR 将军柱OR 次将军柱OR 准将军柱,4); FILTER100:=FILTER(BACKSET100,3),NODRAW;BACKSET101:=BACKSET(黄金柱,4); FILTER101:=FILTER(BACKSET101,3);BACKSET102:=BACKSET(次黄金柱,4); FILTER102:=FILTER(BACKSET102,3);BACKSET103:=BACKSET(准黄金柱,4); FILTER103:=FILTER(BACKSET103,3);BACKSET104:=BACKSET(将军柱,4); FILTER104:=FILTER(BACKSET104,3);BACKSET105:=BACKSET(次将军柱,4); FILTER105:=FILTER(BACKSET105,3);BACKSET106:=BACKSET(准将军柱,4); FILTER106:=FILTER(BACKSET106,3);黄金线下影线:=REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))<=REF(L,3);黄金线实体下端:=REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))<=MIN(REF(C,3),REF(O,3)) AND MIN(MIN(L,REF(L,1)),REF(L,2))>REF(L,3),LINETHICK0;黄金线上影线:=REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))>=REF(H,3);黄金线实体上端:=REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))>=MAX(REF(C,3),REF(O,3)) AND REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))<REF(H,3);黄金线实体中间:=REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))<MAX(REF(C,3),REF(O,3)) AND REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))>MIN(REF(C,3),REF(O,3));黄金线实体中间1:=REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))<MAX(REF(C,3),REF(O,3)) AND REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))>MIN(REF(C,3),REF(O,3)) AND REF(L,2)=MIN(MIN(L,REF(L,1)),REF(L,2));黄金线实体中间2:=REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))<MAX(REF(C,3),REF(O,3)) AND REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))>MIN(REF(C,3),REF(O,3)) AND REF(L,1)=MIN(MIN(L,REF(L,1)),REF(L,2));黄金线实体中间3:=REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))<MAX(REF(C,3),REF(O,3)) AND REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))>MIN(REF(C,3),REF(O,3)) AND L=MIN(MIN(L,REF(L,1)),REF(L,2));BACKSET201:=BACKSET(黄金线下影线,4); FILTER201:=FILTER(BACKSET201,3),NODRAW;BACKSET202:=BACKSET(黄金线实体下端,4); FILTER202:=FILTER(BACKSET202,3),NODRAW;BACKSET203:=BACKSET(黄金线上影线,4); FILTER203:=FILTER(BACKSET203,3),NODRAW;BACKSET204:=BACKSET(黄金线实体上端,4); FILTER204:=FILTER(BACKSET204,3),NODRAW;BACKSET205:=BACKSET(黄金线实体中间,4); FILTER205:=FILTER(BACKSET205,3),NODRAW;BACKSET2051:=BACKSET(黄金线实体中间1,4); FILTER2051:=FILTER(BACKSET2051,3),NODRAW;BACKSET2052:=BACKSET(黄金线实体中间2,4); FILTER2052:=FILTER(BACKSET2052,3),NODRAW;BACKSET2053:=BACKSET(黄金线实体中间3,4); FILTER2053:=FILTER(BACKSET2053,3),NODRAW;BT201:=IF(BARSLAST(FILTER201)=DRAWNULL,BARSCOUNT(CLOSE),BARSLAST( FILTER201));BT202:=IF(BARSLAST(FILTER202)=DRAWNULL,BARSCOUNT(CLOSE),BARSLAST( FILTER202));BT203:=IF(BARSLAST(FILTER203)=DRAWNULL,BARSCOUNT(CLOSE),BARSLAST( FILTER203));BT204:=IF(BARSLAST(FILTER204)=DRAWNULL,BARSCOUNT(CLOSE),BARSLAST( FILTER204));BT205:=IF(BARSLAST(FILTER205)=DRAWNULL,BARSCOUNT(CLOSE),BARSLAST( FILTER205));BT2051:=IF(BARSLAST(FILTER2051)=DRAWNULL,BARSCOUNT(CLOSE),BARSLAS T(FILTER2051));BT2052:=IF(BARSLAST(FILTER2052)=DRAWNULL,BARSCOUNT(CLOSE),BARSLAS T(FILTER2052));BT2053:=IF(BARSLAST(FILTER2053)=DRAWNULL,BARSCOUNT(CLOSE),BARSLAS T(FILTER2053));最近黄金线:=MIN(MIN(MIN(MIN(MIN(MIN(BT201,BT202),BT203),BT204),BT2051),BT2052),BT20 53);DAY1:=SUMBARS(FILTER100,1),NODRAW;HJX1_1:=IF(SUMBARS(FILTER201,1)=DAY1,IF(DAY1=1,LOW,REF(LOW,DAY1-1)),0), NODRAW;HJX1_2:=IF(SUMBARS(FILTER202,1)=DAY1,IF(DAY1=1,MIN(C,O),MIN(REF(C,DAY1-1),REF(OPEN,DAY1-1))),0),NODRAW;HJX1_3:=IF(SUMBARS(FILTER203,1)=DAY1,IF(DAY1=1,HIGH,REF(HIGH,DAY1-1)),0) ,NODRAW;HJX1_4:=IF(SUMBARS(FILTER204,1)=DAY1,IF(DAY1=1,MAX(C,O),MAX(REF(C,DAY1 -1),REF(OPEN,DAY1-1))),0),NODRAW;HJX1_51:=IF(SUMBARS(FILTER2051,1)=DAY1,IF(DAY1=2,LOW,IF(DAY1<2,DRAWN ULL,REF(LOW,DAY1-2))),0),NODRAW;HJX1_52:=IF(SUMBARS(FILTER2052,1)=DAY1,IF(DAY1=3,LOW,IF(DAY1<3,DRAWN ULL,REF(LOW,DAY1-3))),0),NODRAW;HJX1_53:=IF(SUMBARS(FILTER2053,1)=DAY1,IF(DAY1=4,LOW,IF(DAY1<4,DRAWN ULL,REF(LOW,DAY1-4))),0),NODRAW;黄金线:=HJX1_1+HJX1_2+HJX1_3+HJX1_4+HJX1_51+HJX1_52+HJX1_53,COLORYELLO W,NODRAW;立桩量:=VOL=HHV(VOL,40) AND VOL>1.9*REF(VOL,1);立桩量三日突破:=IF(BARSLAST(立桩量)=1 AND CLOSE>REF(HIGH,1),1,IF(BARSLAST(立桩量)=2 AND CLOSE>REF(HIGH,2),1,IF(BARSLAST(立桩量)=3 AND CLOSE>REF(HIGH,3),1,0)));立桩量三日不破:=BARSLAST(立桩量)=3 AND REF(LOW,3)<=MIN(MIN(C,REF(C,1)),REF(C,2));BACKSET300:=BACKSET(立桩量三日不破,4); BACKSET301:=BACKSET(立桩量三日突破,4); 立桩量成立:=FILTER(BACKSET300,3) AND BACKSET301 AND 立桩量; DRAWTEXT(立桩量成立,HIGH*1.01,'↙立桩量'),COLOR00FF00; DRAWTEXT(FILTER101,LOW*0.986,'↖黄金柱'),COLORYELLOW; STICKLINE(FILTER101,OPEN,CLOSE,0.5,0),COLORYELLOW;DRAWTEXT(FILTER102,LOW*0.986,'↖次黄金柱'),COLORYELLOW; DRAWTEXT(FILTER104,LOW*0.986,'↖将军柱'),COLORYELLOW; STICKLINE(FILTER104,OPEN,CLOSE,1.5,0),COLORYELLOW;K1:=SUMBARS(FILTER104,1);STICKLINE(K1,REF(L,K1-2),REF(L,K1-2),10,0),COLORYELLOW;K2:=SUMBARS(FILTER101,1);STICKLINE(K2,REF(L,K2-2),REF(L,K2-2),10,0),COLORYELLOW;主图划线公式HIGHN:=10;LOWN:=10;HIGHDISPLAY:=0;LOWDISPLAY:=0;ZGDISPLAY:=0;MADISPL AY:=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,GDCS2-1),1),COLO R0055FF,DOTLINE;压力B:DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COLO RYELLOW,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),POIN TDOT,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;划线公式DRAWGBK(C>0, RGB(40,120,20),RGB(00,00,00),0,0,1),LINETHICK2;{箱体}N:=13;BC:=(H*0.382+L*0.618+O*0.382+C*0.618)/2;LJ:=IF(INDEXC=C,BC,(BC+AMOUNT/(V*100))/2),COLORGRAY;HT:=REF((HHV(LJ,N*0.691)+HHV(LJ,N)+HHV(LJ,N*1.309))/3,1),LINETHICK,COLORRED; LT:=REF((LLV(LJ,N*0.691)+LLV(LJ,N)+LLV(LJ,N*1.309))/3,1),LINETHICK,COLORGREEN; ZT:=(HT+LT)/2,LINETHICK,COLORYELLOW;STICKLINE(ISLASTBAR=1 AND LJ<ZT,HT,LT,N*8,0),COLORBLUE;STICKLINE(ISLASTBAR=1 AND LJ=ZT,HT,LT,N*8,0),COLORGRAY;STICKLINE(ISLASTBAR=1 AND LJ>ZT,HT,LT,N*8,1),COLORWHITE;STICKLINE(ISLASTBAR=1,ZT,ZT,N*8,0),COLORWHITE;箱顶:HT,COLORWHITE,NODRAW;箱中:ZT,COLORWHITE,NODRAW;DRAWKLINE(H,O,L,C);{短期支撑压力线}N1:=5;A1:=REF(H,N1)=HHV(H,2*N1+1);B1:=FILTER(A1,N1);C1:=BACKSET(B1,N1+1);D1:=FILTER(C1,N1);A2:=REF(L,N1)=LLV(L,2*N1+1);B2:=FILTER(A2,N1);C2:=BACKSET(B2,N1+1);D2:=FILTER(C2,N1);E1:=(REF(LLV(L,2*N1),1)+REF(HHV(H,2*N1),1))/2;E2:=(H+L)/2;H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(C)=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,L,10000),X1));G1:=F1>REF(F1,1);I1:=BACKSET(G1,2);LD:=I1>REF(I1,1);L2:=LD OR ISLASTBAR OR BARSCOUNT(C)=1;X2:=REF(BARSLAST(L2),1)+1;F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,H,0),X2));G2:=F2>REF(F2,1);I2:=BACKSET(G2,2);HD:=I2>REF(I2,1);R1:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);S1:=R1>REF(R1,1);T1:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);U1:=T1>REF(T1,1);R2:=BACKSET(S1,REF(BARSLAST(HD),1)+2);S2:=R2>REF(R2,1);T2:=BACKSET(U1,REF(BARSLAST(LD),1)+2);U2:=T2>REF(T2,1);短压力线:DRAWLINE(S2,H,S1,H,1),COLORGREEN,LINETHICK2;短支撑线:DRAWLINE(U2,L,U1,L,1),COLORRED,LINETHICK2;降△边:DRAWLINE(HIGH>=HHV(HIGH,10),HIGH,LOW<=LLV(LOW,3),HHV(HIGH,3),1),COLORCYA N,DOTLINE;涨△边:DRAWLINE(LOW<=LLV(LOW,10),LOW,HIGH>=HHV(HIGH,3),LLV(LOW,3),1),COLORCYAN, DOTLINE;{中期趋势回归划线}UR:=6;LR:=UR;TC1:=IF(H=HHV(H,8*UR),H,DRAWNULL);TC2:=CONST(BARSLAST(TC1=H))+1;UPPER:=CONST(IF(TC2=1,H,REF(H,TC2-1)));BC1:=IF(L=LLV(L,8*LR),L,DRAWNULL);BC2:=CONST(BARSLAST(BC1=L))+1;LOWER:=CONST(IF(BC2=1,L,REF(L,BC2-1)));LP:=CURRBARSCOUNT<=BC2 AND L=LOWER;{低点定位}HP:=CURRBARSCOUNT<=TC2 AND H=UPPER;{高点定位}STICKLINE(IF(BC2>TC2,HP,LP),LOWER,UPPER,0,0),COLOR628962;STICKLINE(IF(BC2>TC2,LP,HP),LOWER,UPPER,0,0),COLOR628962;NOD:=(IF(TC2>BC2,TC2,BC2)-IF(TC2>BC2,BC2,TC2));{用时}LR1:=FORCAST(C,NOD+1);NP:IF(CURRBARSCOUNT<=MAX(BC2,TC2),CONST(IF(MIN(TC2,BC2)=1,LR1,REF(LR1,MIN( TC2,BC2)-1))),DRAWNULL),POINTDOT,COLOR93BDA8;{近点}LR2:=SLOPE(C,NOD+1);LR3:=CONST(IF(MIN(TC2,BC2)=1,LR2,REF(LR2,MIN(TC2,BC2)-1)));FP:NP-LR3*(NOD),POINTDOT,COLOR93BDA8;{远点}EQU:(NP+FP)/2,POINTDOT,COLOR93BDA8;AD:=ABS(NP-FP);{高差};DBL:=BARSLAST(BC1!=DRAWNULL)+1;DBH:=BARSLAST(TC1!=DRAWNULL)+1;BSP:=IF(BC2>TC2,DBL,DBH)-1;LRL:=IF(NP>FP,FP+AD/NOD*BSP,FP-AD/NOD*BSP);AT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND H>LRL,H,LRL);AT2:=HHV(AT1-LRL,MAX(BC2,TC2));AT3:=CONST(BARSLAST(AT1-LRL=AT2));AT4:=CONST(IF(AT3=0,H,REF(H,AT3)));AT5:=CONST(IF(AT3=0,AT1-LRL,REF(AT1-LRL,AT3)));ATL:=LRL+AT5;UT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND L<LRL,L,LRL);UT2:=HHV(LRL-UT1,MAX(BC2,TC2));UT3:=CONST(BARSLAST(LRL-UT1=UT2));UT4:=CONST(IF(UT3=0,H,REF(H,UT3)));UT5:=CONST(IF(UT3=0,LRL-UT1,REF(LRL-UT1,UT3)));UTL:=LRL-UT5;RH:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,ATL,CONST(REF(ATL,MIN(BC2,TC2)-11)));{限制高}RL:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,UTL,CONST(REF(UTL,MIN(BC2,TC2)-11)));{限制低}中期中轨:IF(NP>FP,IF(LRL<=RH,LRL,DRAWNULL),IF(LRL>=RL,LRL,DRAWNULL)),COLOR628962,LI NETHICK2;中期上轨:IF(NP>FP,IF(ATL<=RH,ATL,DRAWNULL),IF(ATL>=RL,ATL,DRAWNULL)),COLOR628962,LI NETHICK2;中期下轨:IF(NP>FP,IF(UTL<=RH,UTL,DRAWNULL),IF(UTL>=RL,UTL,DRAWNULL)),,COLOR628962,L INETHICK2;{彩色K线}TYX3:=MA(REF(HHV((C+L+O+H)/4,30),1),3);TYX4:=MA((C+L+O+H)/4,13);TYX5:=EMA((C+L+O+H)/4,21);{空心红}STICKLINE(C<TYX5 AND C>O,H,L,0,0),COLORRED;STICKLINE(C<TYX5 AND C>O,C,O,3,1),COLORRED;{深绿}STICKLINE(C<TYX5 AND C<O,H,L,0,0),COLOR00AA00;STICKLINE(C<TYX5 AND C<O,C,O,3,0),COLOR00BB00;STICKLINE(C<TYX5 AND C<O,C,O,2,0),COLOR00DD00;STICKLINE(C<TYX5 AND C<O,C,O,1,0),COLOR00FF00;{蓝}STICKLINE(C>TYX5 AND C<O,H,L,0,0),COLORFFDD44;STICKLINE(C>TYX5 AND C<O,C,O,3,0 ),COLORFF7700;STICKLINE(C>TYX5 AND C<O,C,O,2,0 ),COLORFFAA22;STICKLINE(C>TYX5 AND C<O,C,O,1 ,0 ),COLORFFDD44;{黄}STICKLINE(C>TYX5 AND C>O,H,L,0,0 ),COLOR00EEFF;STICKLINE(C>TYX5 AND C>O,C,O,3,0 ),COLOR00AAFF;STICKLINE(C>TYX5 AND C>O,C,O,2,0 ),COLOR00CCFF;STICKLINE(C>TYX5 AND C>O,C,O,1,0 ),COLOR00EEFF;{粉红}STICKLINE(C>TYX4 AND C>O,H,L,0,0),COLORFF66AA;STICKLINE(C>TYX4 AND C>O,C,O,3,0 ),COLORFF11FF;STICKLINE(C>TYX4 AND C>O,C,O,2,0 ),COLORFF44FF;STICKLINE(C>TYX4 AND C>O,C,O,1,0 ),COLORFF66FF;{亮灰}STICKLINE(C>TYX4 AND C<O,H,L,0,0),COLOR999999;STICKLINE(C>TYX4 AND C<O,C,O,3,0),COLOR555555;STICKLINE(C>TYX4 AND C<O,C,O,2,0),COLOR777777;STICKLINE(C>TYX4 AND C<O,C,O,1,0),COLOR999999;{深红}STICKLINE(C>TYX3 AND C>O,H,L,0,0),COLOR0000DD;STICKLINE(C>TYX3 AND C>O,C,O,3,0),COLOR000099;STICKLINE(C>TYX3 AND C>O,C,O,2,0),COLOR0000BB;STICKLINE(C>TYX3 AND C>O,C,O,1,0),COLOR0000DD;{涨跌停K线}STICKLINE((C-REF(C,1))*100/REF(C,1)>=(10-0.01*100/REF(C,1)),OPEN,CLOSE,1,0),COLOR YELLOW;STICKLINE((REF(C,1)-C)*100/REF(C,1)>=(10-0.01*100/REF(C,1)),OPEN,CLOSE,1,0),COLOR WHITE;{突破}STICKLINE(REF(COUNT(C<TYX3,5)=5,1) AND C>TYX3 AND C>O,C,O,1,0),COLOR00CCFF; {红绿三角【副图】}A10304:=REF(HIGH,3)=HHV(HIGH,2*3+1);B10304:=FILTER(A10304,3);C10304:=BACKSET(B10304,3+1);D10304:=FILTER(C10304,3);{高点}A20304:=REF(LOW,3)=LLV(LOW,2*3+1);B20304:=FILTER(A20304,3);C20304:=BACKSET(B20304,3+1);D20304:=FILTER(C20304,3);{低点}E10304:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2;E20304:=(HIGH+LOW)/2;{高低点出现在同一K线上时可作取舍}H10304:=(D10304 AND NOT(D20304 AND E10304>=E20304)) OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;L10304:=(D20304 AND NOT(D10304 AND E10304=E20304));X10304:=REF(BARSLAST(H10304),1)+1;F10304:=BACKSET(H10304 ANDCOUNT(L10304,X10304)>0,LLVBARS(IF(L10304,LOW,10000),X10304));G10304:=F10304>REF(F10304,1);I10304:=BACKSET(G10304,2);LD0304:=I10304>REF(I10304,1);{过滤后低点}L20304:=LD0304 OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;X20304:=REF(BARSLAST(L20304),1)+1;F20304:=BACKSET(L20304 ANDCOUNT(H10304,X20304)>0,HHVBARS(IF(H10304,HIGH,0),X20304));G20304:=F20304>REF(F20304,1);I20304:=BACKSET(G20304,2);HD0304:=I20304>REF(I20304,1);{过滤后高点}UU0304:=BACKSET(BARSTATUS=2,BARSLAST(LD0304)+1);VV0304:=UU0304>REF(UU0304,1);UU20304:=BACKSET(BARSTATUS=2,BARSLAST(HD0304)+1);VV20304:=UU20304>REF(UU20304,1);{以下语句为三角形部分}底:REF(L,BARSLAST(VV0304)),COLORYELLOW,LINETHICK2;顶:REF(H,BARSLAST(VV20304)),COLORYELLOW,LINETHICK1;{下跌三角形:绿色三角形画完介入}STICKLINE(VV0304,顶,底,0,0),COLORGREEN,LINETHICK2;DRAWLINE(VV20304,H,VV0304,L,0),COLORGREEN,LINETHICK2;{斜}DRAWLINE(VV20304,H,VV0304,顶,0),COLORGREEN,LINETHICK2;{上涨三角形:红色三角形画完出局}STICKLINE(VV20304 ,顶,底,0,0),COLOR009AFF,LINETHICK2;DRAWLINE(VV0304,L,VV20304,H,0),COLOR009AFF,LINETHICK2;{斜}DRAWLINE(VV0304,L,VV20304,底,0),COLOR009AFF,LINETHICK2;NN:=10;T11:=CONST(HHVBARS(V,NN));M:=10;Q1:=CONST(REF(HHVBARS(V,M),T11+1)+T11+1);Q0:IF(CURRBARSCOUNT<=T1+M+3 ANDCURRBARSCOUNT>=T1+1,CONST(REF(C,Q1)),DRAWNULL),COLORBLUE,LINETHICK3;DRAWTEXT(ISLASTBAR,Q0,' 位置')COLORBLUE,LINETHICK3;IF(CURRBARSCOUNT=Q1+1,Q0,DRAWNULL)LINETHICK5,COLORMAGENTA;M1:=CONST(LLVBARS(V,M));M0:IF(CURRBARSCOUNT<=M+7,CONST(IF(M1=0,O,REF(O,M1))),DRAWNULL)LINETHICK3, COLORMAGENTA;IF(CURRBARSCOUNT=M1+1,M0,DRAWNULL)LINETHICK3,COLORYELLOW;DRAWTEXT(ISLASTBAR,M0,' 纵轴1位置')COLORLIMAGENTA;DRAWTEXT(ISLASTBAR,MA2,'关注均线角度');。

相关文档
最新文档