通达信指标公式源码概况:指标类别: 通达信指标公式授权方式: 免费版指标评级: ★★★★★指标分类: 策略画线方法: 副图一、通达信通道线指标公式 MID_TDMS:=(3*C+L+H)/5; 波动中枢:=EMA(EMA(EMA(MID_TDMS,20),2),2),POINTDOT; BDUP:=REF(HHV(100*(HIGH-波动中枢)/波动中枢,120),1),NODRAW; BDDN:=REF(LLV(100*(LOW-波动中枢)/波动中枢,120),1),NODRAW; 顶:=EMA(EMA(EMA(REF(波动中枢,1)*(1+BDUP/100),2),2),2); 底:=EMA(EMA(EMA(REF(波动中枢,1)*(1+BDDN/100),2),2),2); 地线:=底; 中线:=REF(波动中枢,1); 天线:=顶; 绘图范围:=IFF(BARSCOUNT(CLOSE) 120,1,0); STICKLINE(绘图范围,地线,地线+(中线-地线)*(20/20),11,0),COLOR000000; STICKLINE(绘图范围,地线,地线+(中线-地线)*(19/20),11,0),COLOR000008; STICKLINE(绘图范围,地线,地线+(中线-地线)*(18/20),11,0),COLOR000010; STICKLINE(绘图范围,地线,地线+(中线-地线)*(17/20),11,0),COLOR000018; STICKLINE(绘图范围,地线,地线+(中线-地线)*(16/20),11,0),COLOR000020; STICKLINE(绘图范围,地线,地线+(中线-地线)*(15/20),11,0),COLOR000028; STICKLINE(绘图范围,地线,地线+(中线-地线)*(14/20),11,0),COLOR000030; STICKLINE(绘图范围,地线,地线+(中线-地线)*(13/20),11,0),COLOR000038; STICKLINE(绘图范围,地线,地线+(中线-地线)*(12/20),11,0),COLOR000040; STICKLINE(绘图范围,地线,地线+(中线-地线)*(11/20),11,0),COLOR000048; STICKLINE(绘图范围,地线,地线+(中线-地线)*(10/20),11,0),COLOR000050; STICKLINE(绘图范围,地线,地线+(中线-地线)*(9/20),11,0),COLOR000058; STICKLINE(绘图范围,地线,地线+(中线-地线)*(8/20),11,0),COLOR000060; STICKLINE(绘图范围,地线,地线+(中线-地线)*(7/20),11,0),COLOR000068; STICKLINE(绘图范围,地线,地线+(中线-地线)*(6/20),11,0),COLOR000070; STICKLINE(绘图范围,地线,地线+(中线-地线)*(5/20),11,0),COLOR000078; STICKLINE(绘图范围,地线,地线+(中线-地线)*(4/20),11,0),COLOR000080; STICKLINE(绘图范围,地线,地线+(中线-地线)*(3/20),11,0),COLOR000088; STICKLINE(绘图范围,地线,地线+(中线-地线)*(2/20),11,0),COLOR000090; STICKLINE(绘图范围,地线,地线+(中线-地线)*(1/20),11,0),COLOR000098; STICKLINE(绘图范围,天线,天线-(天线-中线)*(20/20),11,0),COLOR000000; STICKLINE(绘图范围,天线,天线-(天线-中线)*(19/20),11,0),COLOR080800; STICKLINE(绘图范围,天线,天线-(天线-中线)*(18/20),11,0),COLOR101000; STICKLINE(绘图范围,天线,天线-(天线-中线)*(17/20),11,0),COLOR181800; STICKLINE(绘图范围,天线,天线-(天线-中线)*(16/20),11,0),COLOR202000; STICKLINE(绘图范围,天线,天线-(天线-中线)*(15/20),11,0),COLOR282800; STICKLINE(绘图范围,天线,天线-(天线-中线)*(14/20),11,0),COLOR303000; STICKLINE(绘图范围,天线,天线-(天线-中线)*(13/20),11,0),COLOR383800; STICKLINE(绘图范围,天线,天线-(天线-中线)*(12/20),11,0),COLOR404000; STICKLINE(绘图范围,天线,天线-(天线-中线)*(11/20),11,0),COLOR484800; STICKLINE(绘图范围,天线,天线-(天线-中线)*(10/20),11,0),COLOR505000; STICKLINE(绘图范围,天线,天线-(天线-中线)*(9/20),11,0),COLOR585800; STICKLINE(绘图范围,天线,天线-(天线-中线)*(8/20),11,0),COLOR606000; STICKLINE(绘图范围,天线,天线-(天线-中线)*(7/20),11,0),COLOR686800; STICKLINE(绘图范围,天线,天线-(天线-中线)*(6/20),11,0),COLOR707000; STICKLINE(绘图范围,天线,天线-(天线-中线)*(5/20),11,0),COLOR787800; STICKLINE(绘图范围,天线,天线-(天线-中线)*(4/20),11,0),COLOR808000; STICKLINE(绘图范围,天线,天线-(天线-中线)*(3/20),11,0),COLOR888800; STICKLINE(绘图范围,天线,天线-(天线-中线)*(2/20),11,0),COLOR909000; STICKLINE(绘图范围,天线,天线-(天线-中线)*(1/20),11,0),COLOR989800; 回归上限:IFF(绘图范围,天线,DRAWNULL),COLOR989800,LINETHICK2; 回归下限:IFF(绘图范围,地线,DRAWNULL),COLOR000098,LINETHICK2; 上涨偏离度:=100*(HIGH-波动中枢)/波动中枢,NODRAW; 下跌偏离度:=100*(LOW-波动中枢)/波动中枢,NODRAW; STICKLINE(绘图范围ANDCLOSE OPEN,HIGH,CLOSE,0,0),COLORRED; STICKLINE(绘图范围ANDCLOSE OPEN,LOW,OPEN,0,0),COLORRED; STICKLINE(绘图范围ANDCLOSE OPEN,CLOSE,OPEN,3,1),COLORRED; STICKLINE(绘图范围ANDCLOSE==OPEN,HIGH,LOW,0,0),COLORWHITE; STICKLINE(绘图范围ANDCLOSE==OPEN,CLOSE,OPEN,3,0),COLORWHITE; STICKLINE(绘图范围ANDCLOSE OPEN,HIGH,LOW,0,0),COLORGREEN; STICKLINE(绘图范围ANDCLOSE OPEN,CLOSE,OPEN,3,0),COLORGREEN; 波动敞口:((回归上限-波动中枢)/波动中枢+(波动中枢-回归下限)/波动中 枢)*100,NODRAW,COLOR00C6FF; 涨过头:=IFF(HIGH 回归上限,1,0); 跌过头:=IFF(LOW 回归下限,1,0); 风险标记:IFF(涨过头,CLOSE,DRAWNULL),NODRAW,COLORCYAN; 机会标记:IFF(跌过头,CLOSE,DRAWNULL),NODRAW,COLORYELLOW; DRAWICON(涨过头,HIGH*1.01,2); DRAWICON(跌过头,LOW*0.99,1); VARC:=SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*10 0; 逃顶:=IFF(CROSS(84,VARC)AND上涨偏离度 20,1,0),NODRAW; VAR1:=(HIGH+LOW+OPEN+2*CLOSE)/5; VAR2:=REF(VAR1,1); VAR3:=SMA(MAX(VAR1-VAR2,0),10,1)/SMA(ABS(VAR1-VAR2),10,1)*100; VAR4:=FILTER(IFF(COUNT(VAR3 20,5) =1ANDCOUNT(VAR1==LLV(VAR1,10),10) =1 ANDCLOSE =OPEN*1.038ANDVOL MA(VOL,5)*1.2,1,0),5); 抄底:=IFF(VAR4ANDEXIST(下跌偏离度*(-1) 15,3),1,0); DRAWICON(绘图范围AND逃顶,HIGH*1.02,14); DRAWICON(绘图范围AND抄底,LOW*0.98,13); DRAWTEXT(绘图范围AND逃顶,MAX(H*1.05,回归上限*1.03), 逃 ),COLORCYAN; DRAWTEXT(绘图范围AND抄底,MIN(LOW*0.995,回归下限), 抄 ),COLORYELLOW; 突破:REF(SMA(C,13,3),1); A1X:=(FORCAST(C,8)-突破)/突破*100; 多方:=IF(A1X =0,REF(EMA(C,8),BARSLAST(CROSS(A1X,0))+1),DRAWNULL); 空方:=IF(A1X 0,REF(EMA(C,8),BARSLAST(CROSS(0,A1X))+1),DRAWNULL); STICKLINE(A1X =0,多方,突破,1,1),COLORMAGENTA; STICKLINE(A1X 0,空方,突破,1,1),COLORGREEN; N:=102; M:=7; AA:=MA((2*CLOSE+HIGH+LOW)/4,5); 通道1:AA*N/100; 通道2:AA*(200-N)/100; CC:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20); DD:=DMA(CLOSE,CC); 通道3:(1+M/100)*DD; 通道4:(1-M/100)*DD; DRAWTEXT_FIX(1,0.00,0.00,0, 所属地区: )COLOR00FFFF; DRAWTEXT_FIX(1,0.07,0.00,0,DYBLOCK)COLOR00FFFF; DRAWTEXT_FIX(1,0.00,0.05,0, 所属行业: )COLOR0080FF; DRAWTEXT_FIX(1,0.07,0.05,0,HYBLOCK)COLOR0080FF; DRAWTEXT_FIX(1,0.00,0.10,0, 主营业务: )COLORFF00FF; DRAWTEXT_FIX(1,0.07,0.10,0,EXTERNSTR(0,1))COLORFF00FF; DRAWTEXT_FIX(1,0.00,0.15,0, 大事件: )COLOR00FFFF; DRAWTEXT_FIX(1,0.07,0.15,0,EXTERNSTR(0,2))COLOR00FFFF; DRAWTEXT_FIX(1,0.00,0.20,0, 投资主题: )COLOR0000FF; DRAWTEXT_FIX(1,0.07,0.20,0,EXTERNSTR(0,3))COLOR0000FF; DRAWTEXT_FIX(1,0.00,0.25,0, 投资概念: )COLORFF88FF; DRAWTEXT_FIX(1,0.07,0.25,0,GNBLOCK)COLORFF88FF; DRAWTEXT_FIX(1,0.00,0.30,0, 风格板块: ),COLOR00FFFF; DRAWTEXT_FIX(1,0.07,0.30,0,FGBLOCK),COLOR00FFFF;二、最新的通达信指标公式 A100:=0; B200:=0; C300:=0; D400:=0; EMA13:MA(C,13),COLORYELLOW,LINETHICK2; EMA34:MA(C,34),COLORGREEN; EMA55:MA(C,55),COLORRED; {101红杏出墙} HX1:=EMA13 EMA34ANDEMA34 EMA55;{股价长期下跌,并且远离长期均线} HX2:=BARSLAST((C-EMA13)/EMA13*100 {收盘价在13均线%6到现在的天数} HX3:=ABS(1-EMA55/REF(C,1)) HX6:=BARSLAST(CROSS(EMA55,EMA34)) {13日均线下降趋于走平} HX4:=ABS(1-REF(EMA13,1)/EMA13) 0.004ANDC EMA34; HX5:=REF(C,1)EMA13ANDC HX7:=HX1{ANDHX3}ANDHX4ANDHX5; HX8:=HX7ANDFILTER(HX7,10);{满足后10天内不标记} 红杏出墙:=HX8; DRAWTEXT(红杏出墙,L*0.98, 101红杏出墙 ),COLORYELLOW; A101:红杏出墙*A100,COLORYELLOW,NODRAW; {102蚂蚁上树} BR1:=COUNT(BETWEEN(((C-O)/O)*100,0,5),5)=5;{5日内收盘价都比前日收盘价高} BR2:=(ABS(EMA13-EMA34)+ABS(EMA34-EMA55))/C {主均线相距很近或基本持平} BR3:=C EMA55ANDCOUNT(L=1;{股价送上55日均线} MYSS:=BR1ANDBR2ANDBR3; 蚂蚁上树:=MYSSANDFILTER(MYSS,5); DRAWTEXT(蚂蚁上树,L*0.99, 102蚂蚁上树 ),COLORYELLOW; A102:蚂蚁上树*A100,COLORYELLOW,NODRAW; {103马失前蹄} MSQT1:=EMA55/EMA13 1.04ANDEMA13/C 1.03; MSQT2:=O =ref(l,1)andref(o,1) 1.03; MSQT:=MSQT1ANDMSQT2; DRAWTEXT(MSQT,L*0.98, 103 ),COLORYELLOW; {104绝处逢生} JCFS1:=EMA55 EMA13ANDEMA13 JCFS2:=O =ref(l,1)andc o= 1.05; JCFS:=JCFS1ANDJCFS2; DRAWTEXT(JCFS,L*0.98, 104 ),COLORYELLOW; {105金屋藏娇} JWCJ1:=C OANDREF(C,1) REF(O,1); JWCJ2:=O =ref(c,1)andl =REF(L,1); JWCJ3:=REF(C,1)/REF(L,1) 1.02; JWCJ4:=EMA13 EMA34OREMA13 EMA55; JWCJ:=JWCJ1ANDJWCJ2ANDJWCJ3ANDJWCJ4; DRAWTEXT(JWCJ,L*0.98, 105 ),COLORYELLOW; {106日月合璧} RYHB1:=REF(O,1) =REF(C,2)ANDREF(C,1) REF(O,1)ANDABS(1-REF(C,1)/REF(L,1)) 0.02; RYHB2:=C OANDABS(1-C/REF(O,1)) 0.025ANDABS(1-O/REF(C,1)) 0.025; RYHB3:=EMA13 REF(EMA13,1)ORABS(1-EMA13/REF(EMA13,1)) 0.01AND(EMA13 EMA34OREMA13 EMA55); RYHB4:=REF(L,1) =LLV(REF(L,1),10); RYHB:=RYHB1ANDRYHB2ANDRYHB3ANDRYHB4; DRAWTEXT(RYHB,L*0.98, 106 ),COLORYELLOW; {107破镜重圆} PJCY1:=REF(O,1)/REF(C,1) 1.02; PJCY2:=O =ref(c,1)andc =REF(O,1); PJCY3:=(ABS(1-REF(C,1)/EMA55) 0.05ORABS(1-C/EMA55) 0.05ORABS(1-MA(C,2)/EMA55) 0.05); PJCY4:=EMA13 EMA55OREMA13 MA(EMA13,5); PJCY:=PJCY1ANDPJCY2ANDPJCY3ANDPJCY4; DRAWTEXT(PJCY,L*0.98, 107 ),COLORYELLOW; {108步步高} BBG1:=C =REF(C,1)ANDREF(C,1) =REF(C,2);{3日内收盘价都比前日收盘价高} BBG2:=V =REF(V,1)ANDREF(V,1) =REF(V,2);{3日内量都比前日量高} BBG3:=COUNT(C =O,3)=3; BBG:=BBG1ANDBBG2ANDBBG3; DRAWTEXT(BBGANDFILTER(BBG,3),L*0.98, 108 ),COLORYELLOW; {201黑客点击} DJ1:=EMA13 EMA34ANDEMA34 EMA55;{13日均线大于34日均线,34日均线小于55日均线} DJ2:=O EMA55;{开盘价大于55日均线} DJ3:=CROSS(EMA13,EMA55)ORABS(1-EMA13/EMA55) 0.002; DJ4:=O CANDC REF(C,1); HKDJ:=DJ2ANDDJ3ANDDJ4; DRAWTEXT(HKDJANDFILTER(HKDJ,10),L*0.97, 201 ),COLORRED; {202红衣侠女} XN1:=ABS(1-HHV(EMA55,5)/LLV(EMA55,5)) 0.02; XN2:=CROSS(EMA13,EMA55)ORABS(1-EMA13/EMA55) 0.002; XN3:=C OANDV REF(V,1)ANDC EMA55; HYXN:=XN1ANDXN2ANDXN3; DRAWTEXT(HYXNANDFILTER(HYXN,5),L*0.993, 202红衣侠女 ),COLORRED; {203海底捞月} LY1:=COUNT(ABS(1-EMA55/EMA34) 0.1,20) LY2:=COUNT(CROSS(EMA34,EMA13),40) =1ANDCOUNT(CROSS(EMA55,EMA13),40) LY3:=CROSS(EMA13,EMA55); HDLY:=LY1ANDLY2ANDLY3; DRAWTEXT(HDLYANDFILTER(HDLY,5),L*0.97, 203 ),COLORRED; {204均线互换} JXHH:=BARSLAST(REF(CROSS(EMA55,EMA34),1))ANDCROSS(EMA34,EMA55); DRAWTEXT(JXHH,L, 204均线互换 ),COLORRED; {205梅开二度} MKED1:=BARSLAST(REF(CROSS(EMA34,EMA13),1)); MKED2:=COUNT(H =EMA55,MKED1)=MKED1; MKED:=MKED2ANDCROSS(EMA13,EMA34); DRAWTEXT(MKED,L, 205梅开二度 ),COLORRED; {206一阳三线} YY1:=C EMA13ANDO EMA13; YY2:=C EMA34ANDO EMA34; YY3:=C EMA55ANDO EMA55; YYSX:=YY1ANDYY2ANDYY3; DRAWTEXT(YYSX,L*0.97, 206 ),COLORRED; {207揭竿而起} MAX3:=MAX(MAX(EMA13,EMA34),EMA55); MIN3:=MIN(MIN(EMA13,EMA34),EMA55); JG1:=ABS(EMA13-EMA34) C*0.05;{13线34线55线接近} JG2:=ABS(EMA34-EMA55) C*0.05; JG3:=C =O*1.03ANDC MAX3;{阳线3%} JG4:=O MIN3ANDO MAX3; JG5:=C REF(H,5); JG6:=(C-EMA34)/EMA34 =0.15;{控制价高} JG7:=V MA(V,5)ANDMA(V,10); JGEQ:=JG1ANDJG2ANDJG3ANDJG4ANDJG5ANDJG6ANDJG7; DRAWTEXT(JGEQ,L, 207揭竿而起 ),COLORRED; {208三线推进} MAX4:=MAX(MAX(MAX(EMA13,EMA34),EMA55),H); MIN4:=MIN(MIN(MIN(EMA13,EMA34),EMA55),L); SXTJ1:=HHV(MAX4,60); SXTJ2:=LLV(MIN4,60); SXTJ3:=EVERY(ABS(1-SXTJ1/SXTJ2) 0.3,20); SXTJ:=SXTJ3AND(YYSXORJGEQ); DRAWTEXT(SXTJANDFILTER(SXTJ,10),L*0.97, 208三线推进 ),COLORRED; {209双蹄并进} STBJ1:=CROSS(DMI.PDI,DMI.MDI); STBJ2:=ABS(1-DMI.ADX/DMI.ADXR) STBJ:=STBJ1ANDSTBJ2; DRAWTEXT(STBJ,L*0.97, 209 ),COLORRED; {210投石问路} TSWL1:=CROSS(EMA13,EMA34)ANDEMA13 EMA55; DRAWTEXT(TSWL1,L*0.97, 210 ),COLORRED; {211三军集结} SJJJ3:=REF(EMA55,1) REF(EMA13,1); SJJJ4:=ABS(1-(MAX(MAX(EMA34,EMA55),EMA13)/MIN(MIN(EMA13,EMA34),EMA55))) 0.005; SJJJ:=SJJJ3ANDSJJJ4; DRAWTEXT(SJJJANDFILTER(SJJJ,5),L, 211三军集结 ),COLORRED; {301浪子回头} LZ1:=REF(C,2) REF(O,2)ANDREF(C,1) REF(O,1)ANDC LZ2:=C =REF(C,1)ANDREF(C,1) =REF(C,2); LZ3:=MA(V,3) REF(V,3); LZ4:=REF(C,3) EMA13AND(C EMA55ORABS(1-C/EMA55) 0.01); LZHT:=LZ1ANDLZ2ANDLZ3ANDLZ4; DRAWTEXT(LZHTANDFILTER(LZHT,5),H*1.01, 301 ),COLORBLUE; {302走四方} ZSF1:=REF(C,4) REF(O,4)AND(REF(C,4) EMA13ORREF(C,4) EMA34)AND(ABS(1-REF(EMA55,4)/EMA55) 0.01orma(ema55,4) REF(EMA55,5)); ZSF2:=COUNT(ABS((1-REF(C,1)/C)*100) 3,4)=4ANDMA(V,4) REF(V,4)*0.8; ZSF:=ZSF1ANDZSF2; DRAWTEXT(ZSFANDFILTER(ZSF,4),H*1.01, 302 ),COLORBLUE; {303暗度陈仓} ADCC1:=O/C 1.05ANDEMA13/EMA55 1.1andema13 MA(EMA13,5); ADCC2:=O/REF(C,1) 1.03;{V HHV(REF(V,1),5)ANDV/MA(REF(V,1),5) ADCC:=ADCC1ANDADCC2; DRAWTEXT(ADCC,H*1.01, 303 ),COLORBLUE; {304一石二鸟} YSEN1:=REF(C,2) REF(O,2)ANDREF(C,1) REF(O,1)ANDC YSEN2:=REF(C,2) EMA55ANDEMA13 EMA55ANDEMA13 =MA(EMA13,5); YSEN3:=REF(V,2) REF(V,1)ANDREF(V,2) YSEN:=YSEN1ANDYSEN2ANDYSEN3; DRAWTEXT(YSEN,H*1.01, 304 ),COLORBLUE; {305双飞燕} SFY1:=EMA13 EMA34ANDEMA34 EMA55; SFY2:=REF(O,1) =REF(C,2)ANDO =REF(C,1)ANDREF(C,2) =REF(O,2); SFY3:=COUNT(C OANDC/O 1.02,2)=2ORCOUNT(C OANDO/C 1.02,2)=2; SFY4:=V REF(V,1); SFY:=SFY1ANDSFY2ANDSFY3ANDSFY4; DRAWTEXT(SFYANDFILTER(SFY,2),H*1.01, 305 ),COLORBLUE; {306三剑客} SJK1:=EMA13 EMA34ANDEMA34 EMA55; SJK2:=COUNT(C =OANDO/C 1.03,3)=3ANDCOUNT(ABS(1-REF(C,1)/C) 1.03,2)=2; SJK:=SJK1ANDSJK2; DRAWTEXT(SJKANDFILTER(SJK,3),H*1.01, 306 ),COLORBLUE; {307四星望月} SXWY1:=COUNT(C =OANDC/O 1.03,4)=4; SXWY2:=(ABS(EMA13-EMA34)+ABS(EMA34-EMA55))/C {主均线相距很近或基本持平} SXWY3:=EMA13 EMA55; SXWY:=SXWY1ANDSXWY2ANDSXWY3; DRAWTEXT(SXWYANDFILTER(SXWY,5),H*1.01, 307 ),COLORBLUE; {308星星点灯} XXDD1:=ABS(1-C/O)*100 =2.5andh 1.03ANDREF(C,1)/REF(O,1) 1.05; XXDD2:=O =REF(C,1)ANDABS(1-REF(EMA13,1)/EMA55) XXDD:=XXDD1ANDXXDD2; DRAWTEXT(XXDD,H*1.01, 308 ),COLORBLUE; {309小鸟依人} XNYR1:=REF(C,1)/REF(O,1) 1.05; XNYR2:=O =REF(C,1)ANDABS(1-C/O) 0.02; XNYR3:=COUNT(JGEQORYYSXORHYXN,10) =1ANDCOUNT(JGEQORYYSXORHYXN,2)=0; XNYR:=XNYR1ANDXNYR2ANDXNYR3; DRAWTEXT(XNYR,H*1.01, 309 ),COLORBLUE; {310立竿见影} LGJY1:=O =REF(C,1)ANDV REF(V,1)ANDC LGJY2:=COUNT(JGEQORYYSXORHYXN,2)=1; LGJY:=LGJY1ANDLGJY2; DRAWTEXT(LGJY,H*1.01, 310 ),COLORBLUE; {401一阴三线} YYSX1:=CEMA13;{一阴三线} YYSX2:=CEMA34; YYSX3:=CEMA55; YYYSX:=YYSX1ANDYYSX2ANDYYSX3; DRAWTEXT(YYYSX,H, 401 ),COLORGREEN; {402落井下石} LJXS1:=O1.05ANDC DRAWTEXT(LJXS1,H, 402 ),COLORGREEN; {403晨钟暮鼓} CZMG1:=REF(C,1)/REF(O,1) 1.05ANDREF(V,1)/REF(V,2) 2ANDHSL CZMG2:=C OANDV REF(V,1); CZMG:=CZMG1ANDCZMG2; DRAWTEXT(CZMG,H, 403晨钟暮鼓 ),COLORGREEN; {404见好就收} Y:=(EMA13-EMA55)/EMA13*100; JHJX:=REF(Y,1) =10andy {DRAWICON(JHJX,H,1);} DRAWTEXT(JHJX,H, 404 ),COLORGREEN; {405一枝独秀} YZ1:=C/O 1.01ANDH/C 1.025;{收阳有上影} YZ2:=EMA13 MAX(EMA34,EMA55)ANDC 1.05*EMA13ANDO MA(C,11);{昨收阳今大于均线} YZDX:=YZ1ANDYZ2; DRAWTEXT(YZDX,H, 405一枝独秀 ),COLORGREEN; {406独上高楼} DSGL1:=REF(C,1) =REF(O,1); DSGL2:=O/REF(C,1) 1.029ANDO/C 1.03ANDO/MAX(EMA13,EMA55) 1.03; DSGL:=DSGL1ANDDSGL2; DRAWTEXT(DSGL,H, 406独上高楼 ),COLORGREEN; {407分道扬镳} FDYB:=CROSS(EMA34,EMA13)ANDEMA34 EMA55; DRAWTEXT(FDYB,H*1.01, 407分道扬镳 ),COLORGREEN; {408突出重围} TCCW1:=REF(EMA55,1) REF(EMA13,1); TCCW2:=EMA13 LLV(REF(EMA13,1),5)ANDABS(1-(MAX(MAX(EMA34,EMA55),EMA13)/MIN(MIN(EMA13,EMA34),EMA55))) 0.008; TCCW:=TCCW1ANDTCCW2; DRAWTEXT(TCCWANDFILTER(TCCW,5),H, 408 ),COLORGREEN; {409明修栈道} MXZD1:=C/O 1.07; MXZD2:=EMA13 HHV(REF(EMA13,1),5)ANDV HHV(REF(V,1),10)ANDV/MA(REF(V,1),5) MXZD:=MXZD1ANDMXZD2; DRAWTEXT(MXZD,H, 409 ),COLORGREEN; {410拖泥带水} TNDS1:=O/REF(C,1) 1.05ANDMIN(C,O)/L 1.03; TNDS2:=C/MAX(EMA13,EMA55) 1.03ANDC REF(C,1); TNDS:=TNDS1ANDTNDS2; DRAWTEXT(TNDS,H, 410 ),COLORGREEN; {411金蝉脱壳} JCTQ1:=C1.1OR(C/MIN(EMA13,EMA55) 1.1))ANDEMA13 MA(EMA13,5); JCTQ2:=REF(O,1) =REF(C,2)ANDREF(C,1) REF(O,1)ANDO =ref(c,1)andc REF(O,1); JCTQ:=JCTQ1ANDJCTQ2; DRAWTEXT(JCTQ,H, 411 ),COLORGREEN; {412一箭穿心} YJCX:=CROSS(EMA55,EMA13); DRAWTEXT(YJCX,H, 412 ),COLORGREEN; {413过河拆桥} GHCQ1:=C=1.04; GHCQ2:=O EMA13ANDC EMA13; GHCQ3:=EMA13/EMA55 1.1ANDABS(1-EMA13/MA(EMA13,3)) 0.02; GHCQ:=GHCQ1ANDGHCQ2ANDGHCQ3; DRAWTEXT(GHCQ,H, 413 ),COLORGREEN; {414狗急跳墙} GJTQ1:=O/REF(C,1) 1.02ANDL REF(C,1); GJTQ2:=V MA(V,5); GJTQ3:=EMA13/EMA55 GJTQ:=GJTQ1ANDGJTQ2ANDGJTQ3; DRAWTEXT(GJTQ,H, 414 ),COLORGREEN; {415一剑封喉} YJFH1:=REF(C,1) =REF(O,1); YJFH2:=H/MAX(C,O) =1.035; YJFH3:=V/MA(REF(V,1),11) 3ANDEMA13/EMA55 1.05; YJFH:=YJFH1ANDYJFH2ANDYJFH3; DRAWTEXT(YJFH,H, 415 ),COLORGREEN; {416节外生枝} JWSZ1:=EMA13 MAX(EMA34,EMA55)ANDEMA13/EMA55 1.1ANDREF(C,1) 1.04*EMA13ANDREF(C,1)/REF(O,1) 1.04; JWSZ2:=ABS(1-C/O) 0.015ANDABS(1-REF(C,1)/C) 0.02; JWSZ:=JWSZ1ANDJWSZ2; DRAWTEXT(JWSZ,H, 416 ),COLORGREEN; {417笑里藏刀} XLCD1:=REF(H,1)/MAX(REF(C,1),REF(O,1)) 1.04; XLCD2:=H=REF(C,1); XLCD3:=EMA13/EMA55 1.05ANDC/EMA13 1.03; XLCD:=XLCD1ANDXLCD2ANDXLCD3; DRAWTEXT(XLCD,H, 417 ),COLORGREEN; DRAWTEXT_FIX(1,0.01,0.01,0, 黄101红杏出墙102蚂蚁上树103马失前蹄104绝处逢生 ),COLORYELLOW; DRAWTEXT_FIX(1,0.01,0.04,0, 黄105金屋藏娇106日月合壁107破镜重圆108步步高 ),COLORYELLOW; DRAWTEXT_FIX(1,0.01,0.10,0, 红201黑客点击202红衣侠女203海底捞月204均线互换 ),COLORRED; DRAWTEXT_FIX(1,0.01,0.13,0, 红205梅开二度206益阳三线207揭竿而起208三线推进 ),COLORRED; DRAWTEXT_FIX(1,0.01,0.16,0, 红209双蹄并进210投石问路211三军集结 ),COLORRED; DRAWTEXT_FIX(1,0.3,0.01,0, 蓝301浪子回头302走四方303暗度陈仓304一石二鸟 ),COLORBLUE; DRAWTEXT_FIX(1,0.3,0.04,0, 蓝305双飞燕306三剑客307四星望月308星星点灯 ),COLORBLUE; DRAWTEXT_FIX(1,0.3,0.07,0, 蓝309小鸟依人310立竿见影 ),COLORBLUE; DRAWTEXT_FIX(1,0.6,0.01,0, 绿401一阴三线402落井下石403晨钟暮鼓404见好就收 ),COLORGREEN; DRAWTEXT_FIX(1,0.6,0.04,0, 绿405一枝独秀406独上高楼407分道扬镳408突破重围 ),COLORGREEN; DRAWTEXT_FIX(1,0.6,0.07,0, 绿409明修饯道410拖泥带水411金蝉脱壳412一箭穿心 ),COLORGREEN; DRAWTEXT_FIX(1,0.6,0.11,0, 绿413过河拆桥414狗急跳墙415一剑封喉416节外生枝417笑里藏刀 ),COLORGREEN; REFLINE:0;20;50;80;100; VAR1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1); VAR2:=SMA(ABS(LOW-VAR1),13,1)/SMA(MAX(LOW-VAR1,0),10,1); VAR3:=EMA(VAR2,10); VAR4:=LLV(LOW,33); VAR5:=EMA(IF(LOW =VAR4,VAR3,0),3); R:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; 快速:SMA(R,3,1),COLORRED; 慢速:SMA(快速,3,1),COLORYELLOW; (快速);慢速,COLORYELLOW; 主力进场:STICKLINE(VAR5 REF(VAR5,1),0,VAR5,4,1),COLORRED; 洗盘:STICKLINE(VAR5 REF(VAR5,1),0,VAR5,4,1),COLORFF9933; N:=9; M1:=3; M2:=3; RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100,LINETHICK2; K:SMA(RSV,3,1),LINETHICK1; D:SMA(K,3,1),LINETHICK1; J:3*K-2*D,COLORFF00FF,LINETHICK2; IF(J 0,J,DRAWNULL),COLORGREEN,LINETHICK2; IF(J 100,J,DRAWNULL),COLORGREEN,LINETHICK2; IF(K 90,K,DRAWNULL),COLOR0000FF,LINETHICK2; IF(D 85,D,DRAWNULL),COLORFFFF11,LINETHICK2; DRAWICON(CROSS(J,2),J,1); DRAWICON(K 80ANDD 80ANDCROSS(D,K),D,2); 中:50,LINETHICK1,COLORC0C0C0; 必买:IF(TROUGHBARS(3,15,1)=1ANDHIGH LOW+0.01,20,-1),COLORYELLOW,LINETHICK1; 必卖:IF(PEAKBARS(3,15,1)=1,80,100),COLORGREEN,LINETHICK1;[源码注释]通达信公式动态公式解读当满足条件收盘价时,在90和90位置之间画柱状线,宽度为0.9,0.9不为0则画空心柱.,COLOR883333当满足条件收盘价时,在10和10位置之间画柱状线,宽度为0.9,0.9不为0则画空心柱.,COLOR883333散户赋值: 100*(60日内最高价的最高值-收盘价)/(60日内最高价的最高值-60日内最低价的最低值)RSV赋值:(收盘价-30日内最低价的最低值)/(30日内最高价的最高值-30日内最低价的最低值)*100RSV1赋值:(收盘价-收盘价的4日简单移动平均)/收盘价的4日简单移动平均*100VAR2赋值:1日前的最低价VAR3赋值:最低价-VAR2的绝对值的3日[1日权重]移动平均/最低价-VAR2和0的较大值的3日[1日权重]移动平均*100VAR4赋值:如果收盘价*1.3,返回VAR3*10,否则返回VAR3/10的3日指数移动平均VAR5赋值:30日内最低价的最低值VAR6赋值:30日内VAR4的最高值VAR7赋值:如果收盘价的58日简单移动平均,返回1,否则返回0VAR8赋值:如果最低价 =VAR5,返回(VAR4+VAR6*2)/2,否则返回0的3日指数移动平均/618*VAR7VAR9赋值:如果VAR8 100,返回100,否则返回VAR8K赋值:RSV的5日[1日权重]移动平均D赋值:K的3日[1日权重]移动平均J赋值:3*K-2*D主力赋值:J的6日指数移动平均,画黄色AA3赋值:(21日内最高价的最高值-收盘价)/(21日内最高价的最高值-21日内最低价的最低值)*100-10AA4赋值:(收盘价-21日内最低价的最低值)/(21日内最高价的最高值-21日内最低价的最低值)*100AA5赋值:AA4的13日[8日权重]移动平均走势赋值:AA5的13日[8日权重]移动平均的向上舍入,画红色,线宽为2AA6赋值:AA3的21日[8日权重]移动平均输出买观注: 当满足条件走势-AA6 -65时,在0和7位置之间画柱状线,宽度为15,1不为0则画空心柱.当满足条件J 1日前的JAND走势 =1日前的走势AND走势 25的5日过滤时,在走势位置画1号图标输出卖观注: 当满足条件走势-AA6 85时,在98和90位置之间画柱状线,宽度为15,1不为0则画空心柱.,COLORFFFF00当满足条件J 1日前的JAND走势 =1日前的走势andj 85的5日过滤时,在J位置画2号图标输出吸筹:当满足条件VAR9 -120时,在50和50+(VAR9/2)位置之间画柱状线,宽度为8,1不为0则画空心柱.,画红色输出CDMA:RSV1的7日指数移动平均的7日指数移动平均*8,NODRAW,画白色当满足条件CDMA =0ANDCDMA =1日前的CDMA时,在50和50+CDMA位置之间画柱状线,宽度为2.5,0不为0则画空心柱.,COLORDD55CC当满足条件CDMA =0ANDCDMA =1日前的CDMA时,在50和50+CDMA位置之间画柱状线,宽度为2.5,1不为0则画空心柱.,COLORDD55CC当满足条件CDMA =0andcdma =1日前的CDMA时,在50和50+CDMA位置之间画柱状线,宽度为2.5,1不为0则画空心柱.,COLOR00D080当满足条件CDMA =0ANDCDMA =1日前的CDMA时,在50和50+CDMA位置之间画柱状线,宽度为2.5,0不为0则画空心柱.,COLOR00D080输出快线:(收盘价-9日内最低价的最低值)/(9日内最高价的最高值-9日内最低价的最低值)*100,线宽为2,COLOR333333输出云数据指标:散户,COLORFFFFFF,线宽为1输出主力线:主力,画黄色输出走势线:走势,画红色,线宽为3当满足条件是否最后一个周期时,在散户线位置书写文字,COLORFFFFFF当满足条件是否最后一个周期时,在主力线位置书写文字,画黄色当满足条件是否最后一个周期时,在走势线位置书写文字,画红色输出关注低买:如果90 散户ANDCROSS(90,散户),返回98,否则返回0,画洋红色,STICK,NODRAW输出风险:统计3日中满足 RSI的RSI1 (6,12,24) 80的天数=3 AND RSI的RSI2 (6,12,24)上穿79.5,NODRAW输出观注顶:(散户 8 and= 90 AND 走势 90 AND CDMA =1日前的CDMAAND 散户线),画绿色,NODRAW当满足条件观注顶时,在-1位置书写文字,画绿色当满足条件风险时,在95位置书写文字,COLOR00FFFF当满足条件关注低买时,在0和100位置之间画柱状线,宽度为0,-1不为0则画空心柱.,画洋红色推荐阅读:通达信中线指标 XA_1:=MA(AMOUNT,5)/MA(VOL,5)/100; XA_2:=(XA_1-MA(AMOUNT,125)/MA(VOL,125)/100)/XA_1; XA_3:=MA((LLV(LOW,45)-CLOSE)/(HHV(HIGH,45)-LLV(LOW,45))*100,3); 反转追击短线:CROSS((-5),XA_3)ANDXA_2 (-0.15)andxa_2 (-0.25),NODRAW,COLORWHITE; XA_4:=EMA(CLOSE,12)-EMA(CLOSE,26); XA_5:=EMA(XA_4,9); XA_6:=2*(XA_4-XA_5); XA_7:=BARSLAST(REF(CROSS(XA_4,XA_5),1)); XA_8:=REF(CLOSE,XA_7+1) CLOSEANDREF(XA_4,XA_7+1) XA_4ANDCROSS(XA_4,XA_5)ANDXA_5 XA_9:=FILTER(XA_8 0,5); 反转追击中线:CROSS(XA_4,XA_5)ANDXA_4 (-0.25),NODRAW,COLORYELLOW; 反转追击长线:XA_9,NODRAW,COLORLIMAGENTA; STICKLINE(反转追击短线,0,1,6,0),COLORWHITE; STICKLINE(反转追击中线,0,2,6,0),COLORYELLOW; STICKLINE(反转追击长线,0,3,6,0),COLORRED; NOTEXT连续信号:COUNT(反转追击短线OR反转追击中线OR反转追击长线,10) =3,NODRAW; ZB1:=EMA(C,34);{原为55或65} 长期趋势:EMA(ZB1,13),LINETHICK2,COLORRED;{原为34或55} 生命线:EMA(SLOPE(C,21)*20+C,42);{股价在上持,在下空仓} 止损:=EMA(C,5);{红持股绿持币黄观望} 短线:XMA(H,20);{此函数仅做参考线,为提前趋势预测线,上涨途中向下见顶,下跌途中向上 见底}; RSV:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100; GS0:SMA(RSV,3,1),COLORRED,LINETHICK1; GS1:SMA(GS0,3,1),COLORYELLOW,LINETHICK1; RSV1:=(CLOSE-LLV(LOW,38))/(HHV(HIGH,38)-LLV(LOW,38))*100; GS2:SMA(RSV1,5,1),COLORFF00FF,LINETHICK1; GS3:SMA(GS2,10,1),COLORGREEN,LINETHICK1; 超卖:18,COLORWHITE; 超买:85,COLORBLUE; STICKLINE(GS0 GS1,GS0,GS1,1,0),COLORRED; STICKLINE(GS0 =GS1,GS0,GS1,1,0),COLORYELLOW; STICKLINE(GS2 GS3,GS2,GS3,1,0),COLORFF00FF; STICKLINE(GS2 =GS3,GS2,GS3,1,0),COLORGREEN; R1:=(CLOSE-LLV(LOW,90))/(HHV(HIGH,90)-LLV(LOW,90))*200; R2:=EMA((CLOSE-(LLV(LOW,5)))/((HHV(HIGH,5))-(LLV(LOW,5)))*100,4)*2; R3:=EMA(0.618*REF(R2,1)+0.382*R2,2); R4:=POW(MA(CLOSE,5),2)+MA(CLOSE,5); R5:=POW(MA(LOW,5),2)+MA(LOW,5); R6:=POW(MA(HIGH,5),2)+MA(HIGH,5); R7:=(R4-LLV(R5,64))/(HHV(R6,64)-LLV(R5,64))*150+65-10; R8:=SMA((SMA(R7,3,1)*1.5-100),3,1); R9:=3*(SMA(R7,3,1)*1.5-100)-2*R8; R10:=(HIGH+LOW+CLOSE*2)/4; R11:=(R10-(EMA(R10,13)))*100/(STD(R10,13)); R12:=EMA((EMA(R11,5)),13)+200-100; R13:=(SMA(R1,3,1))+R2+(SMA(R7,3,1)*1.5-100)+R12; R14:=(SMA((SMA(R1,3,1)),3,1))+R3+R8+(EMA(R12,10)); R15:=(3*(SMA(R1,3,1))-2*(SMA((SMA(R1,3,1)),3,1)))+(3*R12-2*(EMA(R12,10)))+ R9+(3*R12-2*(EMA(R12,10))); R16:=(HIGH+LOW+CLOSE)/3; R17:=(R16-MA(R16,34))/(0.015*AVEDEV(R16,34)); R18:=(HIGH+LOW+CLOSE+R16)/4; R19:=(R18-(EMA(R18,24)))/(STD(R18,24))*100; R20:=(R16-MA(R16,24))/(0.015*AVEDEV(R16,24)); R21:=(((EMA(R19,5))+R20+R17)/3+165)/4; R22:=(R13+R14+R15*30)/32/5-15; A1:=EMA(EMA(CLOSE,13),13); A2:=(A1-REF(A1,1))/REF(A1,1)*6400; A3:=100*WINNER(CLOSE*0.95); 买卖:EMA(((R21+R22)/2/1.1),1),COLORRED,LINETHICK2; AR1:=EMA(OPEN,7); AR2:=EMA(AR1,21); AR3:=CROSS(AR1,AR2); AR5:=EMA(SMA((CLOSE-LLV(LOW,20))/(HHV(HIGH,16)-LLV(LOW,20))*100,8,1),3); 短买:IF(TROUGHBARS(1,6,1)=0ANDHIGH LOW+0,50,20),COLORLIBLUE; 短卖:IF(PEAKBARS(2,9,1)=1,50,80),COLORMAGENTA; 中买:IF(TROUGHBARS(3,18,1)=0ANDHIGH LOW+0.1,20,0),COLORLIMAGENTA,LINETHICK2; 中卖:IF(PEAKBARS(2,15,1)=0,80,100),COLORRED; 全买:(ZIG(3,35) REF(ZIG(3,35),1)ANDREF(ZIG(3,35),1) REF(ZIG(3,35),2)) *90,STICK,COLORRED,LINETHICK3; 全卖:(ZIG(3,35)REF(ZIG(3,35),2)) *90,STICK,COLORGREEN,LINETHICK3; 中线:50,COLORWHITE;