通达信指标公式源码 画线主图(抓主主升 胜利在望)
通达信三角突破抓主升浪(主图 源码)
通达信三角突破抓主升浪(主图源码)HM1:=ABS(((3.48*CLOSE+HIGH+LOW+O)/5-EMA(CLOSE, 20))/EMA(CLOSE,20));HM2:=DMA(((2.15*CLOSE+LOW+HIGH + O)/5),HM1);妖股线:=EMA(HM2,200)*1.26 ,LINETHICK2,COLORGREEN;牛熊线:=EMA(HM2,200)*1.18 ,LINETHICK2,COLORGREEN;Q1:=MA((L+H+C)/3,5);压力:=HHV(Q1,60),COLORCYAN,LINETHICK2;A:IF((压力>REF(压力,1)),压力,DRAWNULL),COLORCYAN,DOTLINE,LINETHICK2;AHC1:=CLOSE*VOL;AHC2:=EMA((EXPMA(AHC1,3)/EXPMA(VOL,3)+EXPMA( AHC1,6)/EXPMA(VOL,6)+EXPMA(AHC1,12)/EXPMA(VOL, 12)+EXPMA(AHC1,24)/EXPMA(VOL,24))/4,13),COLORYEL LOW;上轨:=1.06*AHC2,LINETHICK2,COLORWHITE;顶:1.13*AHC2,LINETHICK2,COLORWHITE;MM:=MIN(A,妖股线);MM2:=MIN(上轨,妖股线);DRAWBAND(MM,RGB(250,0,250),MM2,0 );KK:=MIN(A,牛熊线);KK2:=MIN(上轨,牛熊线);DRAWBAND(KK,0,KK2,0);IF((妖股线<= REF(妖股线,1)),妖股线,DRAWNULL),COLORGREEN,DOTLINE,LINETHICK2;IF((妖股线>= REF(妖股线,1)),妖股线,DRAWNULL),COLORGREEN,DOTLINE,LINETHICK2;IF((压力<= REF(压力,1)),压力,DRAWNULL),COLORGREEN,DOTLINE,LINETHICK2;IF((压力>= REF(压力,1)),压力,DRAWNULL),COLORCYAN,DOTLINE,LINETHICK2;IF((上轨<= REF(上轨,1)),上轨,DRAWNULL),COLORGREEN,DOTLINE,LINETHICK2;IF((上轨>= REF(上轨,1)),上轨,DRAWNULL),COLORWHITE,DOTLINE,LINETHICK2; DRAWKLINE(HIGH,OPEN,LOW,CLOSE);ZT:=REF(C,1)*1.1-C<0.01 AND H=C;启爆1:=CROSS(C,上轨) AND ZT;DRAWTEXT(启爆1,L*0.98,'启爆'),COLORYELLOW; 超牛:=CROSS(C,顶) AND ZT;DRAWTEXT(超牛,L*0.98,'超牛'),COLORRED;。
通达信主图很准(附源码)
通达信主图很准(附源码)通达信主图很准(附源码)MA5:MA(CLOSE,5);MA10:MA(CLOSE,10);MA20:MA(CLOSE,20);MA60:MA(CLOSE,60);BB:=REF(INDEXC,1)<REF(INDEXC,2) AND REF(C,2)*0.95>=REF(C,1) AND REF(O,1)/REF(C,1)>=1.05 AND REF(C,1)<REF(O,1) AND C>O AND C/O>=1.05 AND C>REF(O,1)AND REF(VOL,1)<REF(VOL,2);STICKLINE(BB,O,C,4,0),COLORRED;STICKLINE(BB,O,H,0,0),COLORRED;STICKLINE(BB,L,C,0,0),COLORRED;DRAWTEXT(BB,L*0.95,'追!'),COLORYELLOW;VAR1:=4*SMA((CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100,5,1)-3*SMA(SMA((CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100,5,1),3.2,1);VAR2:=8;CC:=CROSS(VAR1,VAR2);DRAWTEXT(CC,L*0.95,'买!'),COLOR0099FF;TYP:=(H+L+C)/3;TYP1:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14))<=20 AND REF(MA(C,21),1)<MA(C,21);TJ1:=O<MAX(REF(C,1),REF(O,1));TJ2:=REF(C,1)>=MA(C,21) AND L/MA(C,21)>=1.015 AND MA(C,144)>MA(C,250) AND V<MA(V,10) AND MIN(REF(V,2),REF(V,1))>V;TJ3:=REF(MA(C,250),90)<REF(MA(C,144),90) AND MA(C,144)>MA(C,250) AND O>MA(C,250);TJ4:=MAX(REF(H,10)AND REF(H,9)AND REF(H,8)AND REF(H,7), REF(H,6));TOUJI:=TYP1 AND TJ1 AND TJ2 AND REF(C,2)/REF(O,2)<1.06 AND C/O<=1.05 AND HHV(H,5)/LLV(L,30)>=1.65 AND REF(H,5)/REF(L,1)>=1.15 AND REF(C,1)/REF(O,1)<=0.995 AND (L<REF(L,2) OR (REF(H,2)-REF(L,2))/(H-L)>=2) AND O/REF(L,1)<=1.04OR TYP1 AND TJ1 AND O/REF(L,1)<1.05 AND REF(L,1)/REF(O,4)<=0.85 AND REF(C,1)/REF(O,1)<=1.03 AND O<REF(C,1) AND HHV(H,5)/LLV(L,35)>1.35 AND V<MA(V,10);TOUJI2:=TYP1 AND TJ1 AND TJ2 AND O/REF(L,1)<1.05 AND O/LLV(L,3)<1.1 AND REF(C,1)/REF(0,1)<=1.05 AND HHV(H,4)/LLV(L,16)>=1.35 AND REF(O,4)/REF(C,2)>=1.08 AND REF(C,2)/REF(O,2)<=0.995 AND (REF(L,2)<REF(L,3) OR (REF(H,3)-REF(L,3))/(REF(H,1)-REF(L,1))>=2) AND L<MIN(REF(C,1),REF(O,1))OR TYP1 AND TJ1 AND HHV(H,10)/LLV(L,25)>=1.3 AND REF(C,5)<REF(H,5) AND REF(C,4)<REF(C,5) AND REF(C,3)<REF(C,4) AND REF(C,2)<REF(C,3) AND REF(C,1)<REF(C,2) AND L<REF(L,1) AND MA5/O<1.1;DATOUJI:=TYP1 AND TJ3 AND O<REF(C,5) AND O<=REF(C,1) AND REF(H,10)/O>=1.17 AND HHV(H,10)/LLV(L,30)>1.4 AND (MA(V,10)/HHV(V,10)>0.5 AND V/HHV(V,10)>0.2 AND V/HHV(V,10)<0.4 OR REF(V,3)>REF(V,2) AND REF(V,2)>REF(V,1)) AND REF(C,1)/REF(C,2)<=1.02;DATOUJI1:=TYP1 AND TJ3 AND O<REF(L,6) AND O<MIN(REF(C,5)AND REF(O,5),5) ;DRAWTEXT(TOUJI OR TOUJI2 OR DATOUJI ORDATOUJI1,L*0.98,'△'),COLORYELLOW;DRAWTEXT(CROSS(MA(VOL,10),MA(VOL,20)) AND MA(VOL,5)>MA(VOL,10) AND L<MA(C,20) AND C>=MA(C,20),L*0.98,'量托'),COLORWHITE;卖出:=CROSS(90,SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100);DRAWTEXT(卖出,H*1.05,'短卖'),COLORGREEN;C3:=REF(C,1);涨停:=IF((C-C3)*100/C3>=(10-0.01*100/C3),1,0);STICKLINE(涨停,OPEN,CLOSE,2,0),COLORRED;跌停:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0);STICKLINE(跌停,OPEN,CLOSE,2,0),COLORGREEN;W1:=C=HHV(C,20);W2:=BARSLAST(W1);W3:=IF(W2>0,REF(C,W2),REF(C,W2));W4:=CROSS(C,REF(W3,1));突破盘整:=W4 AND COUNT(W4,5)=1;DRAWICON(突破盘整,L-0.0,1);。
通达信指标公式源码 精准的K线主图公式源码
BBI:(MA(C,3)+MA(C,6)+MA(C,12)+MA(C,24))/4;MA(C,N1);MA(C,N2);MA(C,N3),LINETHICK2;MA(C,N4),COLORLIRED,LINETHICK2; 买线:=EMA(C,2);卖线:=EMA(SLOPE(C,21)*20+C,42);中:=(MA(CLOSE,30)+MA(C,72))/2,COLOR999999,LINETHICK0;HLY1:=中*1.1,POINTDOT,COLOR999999,LINETHICK0;VAR61:=(CLOSE*2+HIGH+LOW)/4;VAR62:=EMA(VAR61,3);VAR63:=EMA(VAR62,6);L1:=EMA(VAR61,3),LINETHICK0;L2:=EMA(VAR62,4),LINETHICK0;L3:=EMA(VAR63,5),LINETHICK0;{正常上涨}STICKLINE(C>=O,H,L,0,0 ),COLOR0000FF; {红色}STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,3.2,0) ,COLOR000055;STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,2.6,0) ,COLOR000077;STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,1.9,0) ,COLOR000099;STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,1.1,0) ,COLOR0000BB;STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,0.2,0) ,COLOR0000FF; {STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.2,0) ,COLOR0000EE;STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.4,0) ,COLOR0000FF;}{正常下跌}STICKLINE(OPEN>=CLOSE,H,L,0,0 ),COLORFFFF00; {天蓝}STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3.2,0 ),COLORFF5500;STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2.6,0 ),COLORFF7700;STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1.9,0 ),COLORFF9900;STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1.1,0 ),COLORFFBB00;STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0.2,0 ),COLORFFDD00; {STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1.2,0 ),COLORFFEE00; STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0.4,0 ),COLORFFFF00;}{整理下跌区}{STICKLINE(L1<L2,H,LOW,0 ,0 ),COLORFFFFFF;{灰色}{STICKLINE(L1<L2,CLOSE ,OPEN,3.0,0 ),COLOR555555;STICKLINE(L1<L2,CLOSE ,OPEN,2.5,0 ),COLOR777777;STICKLINE(L1<L2,CLOSE ,OPEN,1.9,0 ),COLOR999999;STICKLINE(L1<L2,CLOSE ,OPEN,1.2,0 ),COLORBBBBBB;STICKLINE(L1<L2,CLOSE ,OPEN,0.4,0 ),COLORDDDDDD;}{STICKLINE(L1<L2,CLOSE ,OPEN,3,0 ),COLORFFEE00;STICKLINE(L1<L2,CLOSE ,OPEN,2,0 ),COLORFFFF00;}{下跌开始}VAR44:=REF(L1,1)>L1 AND L1>L2;STICKLINE(VAR44,H,LOW,0,0 ),COLORFF0000; {蓝色}{STICKLINE(VAR44,CLOSE,OPEN,3.0,0) ,COLOR550000;STICKLINE(VAR44,CLOSE,OPEN,2.5,0) ,COLOR660000;}STICKLINE(VAR44,CLOSE,OPEN,3.2,0) ,COLOR660000;STICKLINE(VAR44,CLOSE,OPEN,2.6,0) ,COLORAA0000;STICKLINE(VAR44,CLOSE,OPEN,1.9,0) ,COLOREE1100;STICKLINE(VAR44,CLOSE,OPEN,1.1,0) ,COLORFF3300;STICKLINE(VAR44,CLOSE,OPEN,0.2,0) ,COLORFF5500;{顶部钝化区}STICKLINE((CLOSE >= HLY1),H,LOW,0 ,0),COLORFF00FF;{粉色}STICKLINE((CLOSE >= HLY1),CLOSE ,OPEN,3.2,0),COLOR770077;STICKLINE((CLOSE >= HLY1),CLOSE ,OPEN,2.6,0),COLORAA00AA;STICKLINE((CLOSE >= HLY1),CLOSE ,OPEN,1.9,0),COLORDD00DD;STICKLINE((CLOSE >= HLY1),CLOSE ,OPEN,1.1,0),COLORFF22FF;STICKLINE((CLOSE >= HLY1),CLOSE ,OPEN,0.2,0),COLORFF66FF;{STICKLINE((CLOSE >= HLY1),CLOSE ,OPEN,3,0),COLORFFDDFF;STICKLINE((CLOSE >= HLY1),CLOSE ,OPEN,2,0),COLORFFEEFF;}{单边下跌}STICKLINE(买线<卖线,H,LOW,0,0 ),COLOR00FF00; {绿色}STICKLINE(买线<卖线,CLOSE ,OPEN,3.2,0),COLOR004400;STICKLINE(买线<卖线,CLOSE ,OPEN,2.6,0),COLOR005500;STICKLINE(买线<卖线,CLOSE ,OPEN,1.9,0),COLOR007700;STICKLINE(买线<卖线,CLOSE ,OPEN,1.1,0),COLOR009900;STICKLINE(买线<卖线,CLOSE ,OPEN,0.2,0),COLOR00CC00;{STICKLINE(买线<卖线,CLOSE ,OPEN,3,0),COLOR00DD00;STICKLINE(买线<卖线,CLOSE ,OPEN,2,0),COLOR00FF00;}{向上变盘}STICKLINE(CROSS(买线,卖线),H,L,0,0),COLOR0033DD;{橘黄}STICKLINE(CROSS(买线,卖线),C,OPEN,3.2,0),COLOR000077;STICKLINE(CROSS(买线,卖线),C,OPEN,2.6,0),COLOR003399;STICKLINE(CROSS(买线,卖线),C,OPEN,1.9,0),COLOR0033DD;STICKLINE(CROSS(买线,卖线),C,OPEN,1.1,0),COLOR0055FF;STICKLINE(CROSS(买线,卖线),C,OPEN,0.2,0),COLOR0099FF;{向下变盘}STICKLINE(CROSS(卖线,买线),H,L,0,0),COLOR00FFFF;{黄色}STICKLINE(CROSS(卖线,买线),C,OPEN,3.2,0),COLOR008888;STICKLINE(CROSS(卖线,买线),C,OPEN,2.6,0),COLOR00AAAA;STICKLINE(CROSS(卖线,买线),C,OPEN,1.9,0),COLOR00CCCC;STICKLINE(CROSS(卖线,买线),C,OPEN,1.1,0),COLOR00EEEE;STICKLINE(CROSS(卖线,买线),C,OPEN,0.2,0),COLOR44FFFF;N1,N2,N3,N4:分别为:5,10,30,60。
通达信指标公式源码工作线 主图源码
公式名称:分析家操盘线公式说明:线上操作,线下休息。
红色操作,绿色休息。
线上阴线买,线下阳线卖。
{JSXGWGZX}七天线:MA(C,7),COLORGRAY;工作线:(EMA(C,14)),POINTDOT,LINETHICK4,COLORYELLOW;生命线:(MA(C,25)),LINETHICK2,COLORMAGENTA;{不惑线:(MA(C,40)),COLORCYAN; }姊妹线:(EMA(C,56)),POINTDOT,COLORWHITE;A3:=EMA((((SLOPE(C,21)) * 20) + C),68);A4:=EMA(C,10);A5:=REF(C,2);A6:=((SMA((MAX((C - A5),0)),6,1)) / (SMA(ABS((C - A5)),6,1))) * 100;A7:=IF(((A6 < (REF(A6,1))) AND (A6 > 79)),A6,0);A8:=LLV(L,21);A9:=HHV(H,21);A10:=EMA((((CLOSE - A8) / (A9 - A8)) * 100),5);A11:=EMA((((CLOSE - A8) / (A9 - A8)) * 50),13);A12:=EMA(((0.667 * (REF(A10,1))) + (0.333 * A10)),2);A13:=LLV(L,55);A14:=HHV(H,34);A15:=EMA((((C - A13) / (A14 - A13)) * 100),3);A16:=(A11 + A15) / 2;A17:=EMA(((0.667 * (REF(A15,1))) + (0.333 * A10)),2);A18:=EMA(A16,5);A19:=EMA(((0.667 * (REF(A18,1))) + (0.333 * A18)),2);A20:=CROSS(A10,A11);A21:=(CROSS(A10,A19)) AND (A19 < 30);A22:=A21 * 0.6;A23:=((C + L) + H) / 3;A24:=EMA(A23,6);A25:=EMA(A24,5);A26:=CROSS(A24,A25);DRAWICON(A26,(LOW / 1.015),1),LINETHICK2,COLORMAGENTA; DRAWTEXT(CROSS(A4,A3),L*0.9,'线上阴线买|线下阳线卖|黑马'),LINETHICK4,COLORYELLOW;STICKLINE(((C >= 工作线) AND (C >= O)),H,L,0,1),COLORRED; STICKLINE(((C >= 工作线) AND (C >= O)),O,C,2,1),COLORRED; STICKLINE(((C >= 工作线) AND (C <= O)),H,L,0,0),COLORRED; STICKLINE(((C >= 工作线) AND (C <= O)),O,C,2,0),COLORRED; STICKLINE(((C < 工作线) AND (C >= O)),H,L,0,1),COLORGREEN; STICKLINE(((C < 工作线) AND (C >= O)),O,C,2,1),COLORGREEN; STICKLINE(((C < 工作线) AND (C <= O)),H,L,0,0),COLORGREEN; STICKLINE(((C < 工作线) AND (C <= O)),O,C,2,0),COLORGREEN;所属地域:DRAWTEXT_FIX(ISLASTBAR ,0.05,1,1,DYBLOCK),COLORYELLOW; 所属行业:DRAWTEXT_FIX(ISLASTBAR ,0.06,1,0,HYBLOCK),COLORYELLOW; DRAWTEXT_FIX(1,0.11,1,0,EXTERNSTR(0,6)),COLORYELLOW; DRAWTEXT_FIX(1,0.12,1,0,EXTERNSTR(0,1))COLORYELLOW; DRAWTEXT_FIX(1,0.006,0.82,0,'主营业务')COLORFF00FF;DRAWTEXT_FIX(1,0.06,0.82,0,EXTERNSTR(0,2))COLORFF00FF; DRAWTEXT_FIX(1,0.006,0.71,0,'主题概念')COLORFF88FF;DRAWTEXT_FIX(1,0.06,0.71,0,EXTERNSTR(0,3))COLORFF88FF;。
通达信上升阻力划线主图指标公式程序源码和编程思路破译
通达信上升阻力划线主图指标公式程序源码和编程思路破译编程思路破译填充背景K线HD赋值:若5日前的最高价=13日内最高价的最高值的5日过滤则将最近5+1周期置为1的6日过滤LD赋值:若5日前的最低价=21日内最低价的最低值的6日过滤则将最近6周期置为1的5日过滤当满足条件LD时,在最低价位置画直线起点,当满足条件HD时,在最高价位置画直线终点,0表示是否延长.,画红色,线宽为2 当满足条件HD时,在最高价位置画直线起点,当满足条件LD时,在最低价位置画直线终点,0表示是否延长.,画绿色J1赋值:若到最后交易的周期=2则将最近上次HD距今天数和上次LD距今天数的较小值+1周期置为1J2赋值:J1>1日前的J1当满足条件J2时,在如果HD,返回最高价,否则返回最低价位置画直线起点,当满足条件到最后交易的周期=2时,在如果上次HD距今天数>上次LD距今天数,返回最高价,否则返回最低价位置画直线终点,0表示是否延长.,DOTLINE,画白色C点赋值:上次LD距今天数当满足条件LDANDBARSLAST(HD)<上次1日前的LD距今天数时,在最低价-0.1位置书写文字,画红色当满足条件HD时,在最高价+0.1位置书写文字,画绿色波1赋值:12PLZ赋值:上次最高价在0日前的25天内第1个最高价的最后一日取值设为常数=最高价距今天数的最后一日取值设为常数+1 输出高25:如果PLZ=1,返回最高价,否则返回PLZ-1日前的最高价的最后一日取值设为常数,画绿色,DOTLINEPLL赋值:上次最低价在0日前的100天内第1个最低价的最后一日取值设为常数=最低价距今天数的最后一日取值设为常数+1 输出低100:如果PLL=1,返回最低价,否则返回PLL-1日前的最低价的最后一日取值设为常数,画绿色,DOTLINE波动速率赋值:100*((高25-低100)/(如果PLL>PLZ,返回低100,否则返回高25))/(PLL-PLZ)BPURC赋值:最高价在0日前的(如果波1>0,返回波1,否则返回如果PLZ<PLL,返回5,否则返回10)*5天内第1个最高价的最后一日取值设为常数BPLZ赋值:上次BPURC=最高价距今天数的最后一日取值设为常数+1BQQT赋值:最低价在0日前的(如果波1>0,返回波1,否则返回如果PLZ<PLL,返回5,否则返回10)*5天内第1个最低价的最后一日取值设为常数BPLL赋值:上次BQQT=最低价距今天数的最后一日取值设为常数+1BLC顶X赋值:如果BPLZ=1,返回最高价,否则返回BPLZ-1日前的最高价的最后一日取值设为常数BLC低X赋值:如果BPLL=1,返回最低价,否则返回BPLL-1日前的最低价的最后一日取值设为常数BASE赋值:如果波动速率<0,返回BLC顶X,否则返回BLC低XBLCZ赋值:(高25-低100)*(如果PLL>PLZ,返回1,否则返回-1)B12赋值:BASE+(BLCZ*1.382)B14赋值:BASE+(BLCZ*1.618)B200赋值:BASE+(BLCZ*2)XZDD赋值:如果PLL>PLZ,返回BPLL,否则返回BPLZ当满足条件到最后交易的周期=XZDD时,在BASE和B200位置之间画柱状线,宽度为0,0不为0则画空心柱.,画绿色当满足条件到最后交易的周期=XZDD时,在B12位置书写文字COLORC0FF7F当满足条件到最后交易的周期=XZDD时,在B14位置书写文字画黄色当满足条件到最后交易的周期=XZDD时,在B200位置书写文字画绿色当满足条件到最后交易的周期=10时,在B12位置书写文字,COLORC0FF7F当满足条件到最后交易的周期=10时,在B14位置书写文字,画黄色当满足条件到最后交易的周期=10时,在B200位置书写文字,画绿色当满足条件到最后交易的周期=10时,在B200位置书写文字,画绿色B121赋值:BASE+(BLCZ*0.775)画红色B141赋值:BASE+(BLCZ*0.868)画红色B2001赋值:BASE+(BLCZ*1)画红色XZDD1赋值:如果PLL>PLZ,返回BPLL,否则返回BPLZ当满足条件到最后交易的周期=XZDD1时,在BASE和B2001位置之间画柱状线,宽度为0,0不为0则画空心柱.,画绿色当满足条件到最后交易的周期=XZDD1时,在B121位置书写文字COLORC0FF7F当满足条件到最后交易的周期=XZDD1时,在B141位置书写文字画黄色当满足条件到最后交易的周期=XZDD1时,在B2001位置书写文字画绿色当满足条件到最后交易的周期=10时,在B121位置书写文字,COLORC0FF7F当满足条件到最后交易的周期=10时,在B141位置书写文字,画黄色当满足条件到最后交易的周期=10时,在B2001位置书写文字,画绿色当满足条件到最后交易的周期=10时,在B2001位置书写文字,画绿色程序源码DRAWGBK(C>0, RGB(0,0,20),RGB(00,0,0),0,0,1);DRAWKLINE(H,O,L,C);{HD LD ZIG}HD:=FILTER(BACKSET(FILTER(REF(H,5)=HHV(H,13),5),5+1),6) ;{高点}LD:=FILTER(BACKSET(FILTER(REF(L,5)=LLV(L,21),6),6),5);{低点} DRAWLINE(LD,L,HD,H,0),COLORRED,LINETHICK2;DRAWLINE(HD,H,LD,L,0),COLORGREEN;{----------------------------------------------}{A B C}J1:=BACKSET(CURRBARSCOUNT=2 ,MIN(BARSLAST(HD),BA RSLAST(LD))+1);J2:=J1>REF(J1,1);DRAWLINE(J2,IF(HD,H,L),CURRBARSCOUNT=2 ,IF(BARSLAST (HD)>BARSLAST(LD),H,L),0),DOTLINE,COLORWHITE;C点:=BARSLAST(LD);DRAWTEXT(LD AND BARSLAST(HD)<BARSLAST(REF(LD,1)) ,L-0.1,'A'),COLORRED;DRAWTEXT(HD,H+0.1,'B'),COLORGREEN;{25T高 100T低}波1:=12;PLZ:=CONST(BARSLAST(CONST(FINDHIGH(H,0,25,1))=H))+ 1;高25:CONST(IF(PLZ=1,H,REF(H,PLZ-1))),COLORGREEN,DOTLINE;PLL:=CONST(BARSLAST(CONST(FINDLOW(L,0,100,1))=L))+1;低100:CONST(IF(PLL=1,L,REF(L,PLL-1))),COLORGREEN,DOTLINE;波动速率:=100*((高25-低100)/(IF(PLL>PLZ,低100,高25)))/(PLL-PLZ);BPURC:=CONST(FINDHIGH(H,0,(IF(波1>0,波1,IF(PLZ<PLL,5,10)))*5,1));BPLZ:=CONST(BARSLAST(BPURC=H))+1;BQQT:=CONST(FINDLOW(L,0,(IF(波1>0,波1,IF(PLZ<PLL,5,10)))*5,1));BPLL:=CONST(BARSLAST(BQQT=L))+1;BLC顶X:=CONST(IF(BPLZ=1,H,REF(H,BPLZ-1)));BLC低X:=CONST(IF(BPLL=1,L,REF(L,BPLL-1)));BASE:=IF(波动速率<0,BLC顶X,BLC低X);BLCZ:=(高25-低100)*(IF(PLL>PLZ,1,-1));B12:=BASE+(BLCZ*1.382);B14:=BASE+(BLCZ*1.618);B200:=BASE+(BLCZ*2);XZDD:=IF(PLL>PLZ,BPLL,BPLZ);STICKLINE(CURRBARSCOUNT=XZDD ,BASE,B200,0,0),COLO RGREEN;DRAWTEXT(CURRBARSCOUNT=XZDD,B12,'---------------------------------------------------------------C1')COLORC0FF7F;DRAWTEXT(CURRBARSCOUNT=XZDD,B14,'---------------------------------------------------------------C2')COLORYELLOW;DRAWTEXT(CURRBARSCOUNT=XZDD,B200,'--------------------------------------------------------------C3')COLORGREEN;DRAWTEXT(CURRBARSCOUNT=10,B12,CON2STR(B12,2)),C OLORC0FF7F;DRAWTEXT(CURRBARSCOUNT=10,B14,CON2STR(B14,2)),C OLORYELLOW;DRAWTEXT(CURRBARSCOUNT=10,B200,CON2STR(B200,2)), COLORGREEN;DRAWTEXT(CURRBARSCOUNT=10,B200,CON2STR(B200,2)),COLORGREEN;B121:=BASE+(BLCZ*0.775)COLORRED;B141:=BASE+(BLCZ*0.868)COLORRED;B2001:=BASE+(BLCZ*1)COLORRED;XZDD1:=IF(PLL>PLZ,BPLL,BPLZ);STICKLINE(CURRBARSCOUNT=XZDD1 ,BASE,B2001,0,0),COL ORGREEN;DRAWTEXT(CURRBARSCOUNT=XZDD1,B121,'---------------------------C1')COLORC0FF7F;DRAWTEXT(CURRBARSCOUNT=XZDD1,B141,'---------------------------C2')COLORYELLOW;DRAWTEXT(CURRBARSCOUNT=XZDD1,B2001,'--------------------------C3')COLORGREEN;DRAWTEXT(CURRBARSCOUNT=10,B121,CON2STR(B121,2)), COLORC0FF7F;DRAWTEXT(CURRBARSCOUNT=10,B141,CON2STR(B141,2)), COLORYELLOW;DRAWTEXT(CURRBARSCOUNT=10,B2001,CON2STR(B2001, 2)),COLORGREEN;DRAWTEXT(CURRBARSCOUNT=10,B2001,CON2STR(B2001, 2)),COLORGREEN;注:馆内各种公式为学习编程而保存,实战使用前一定要看其中是否有未来函数并自己亲自测试成功率,决不能依据公式名称的描述和形容去投资,据此入市造成投资损失由投资者自己承担。
通达信指标公式源码自用的主图
强势区域:EMA(C,250),COLORYELLOW,DOTLINE;AA:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,30))/MA(CLOSE,30);JAX:=DMA((2*CLOSE+LOW+HIGH)/4,AA);压力:(1+9/100)*JAX,COLORLIRED;支撑:(1-9/100)*JAX,COLORLIRED;顶:(1+13/100)*JAX,COLORLIRED;底:(1-13/100)*JAX,COLORLIRED;下降压力线:DRAWLINE(HIGH>=HHV(HIGH,10),HIGH,LOW<=LLV(LOW,3),HHV(HIGH,3),1),COLOR YELLOW;DRAWBAND(MA(C,13),RGB(155,50,50),MA(C,21),RGB(83,123,68));DRAWKLINE(H,O,L,C);主力线:MA(C,13),COLORLIRED;工作线:MA(C,21),COLORLIRED;生命线:EMA(CLOSE,60),COLORRED, LINETHICK1;强势判定:EMA(C,250),COLORRED,DOTLINE;ELE:=(((REF(HIGH,1))+(REF(LOW,1))+(REF(OPEN,1))+2*(REF(CLOSE,1)))/5);突破价:=(ELE+((REF(HIGH,1))-(REF(LOW,1)))),NODRAW;阻力价:=(2*ELE-(REF(LOW,1))),NODRAW;DRAWTEXT(ISLASTBAR,强势判定,'←强势判定'),COLORFFCC10,COLORMAGENTA; DRAWTEXT(ISLASTBAR,生命线,'←生命线'),COLORFFCC10,COLORMAGENTA; DRAWTEXT(ISLASTBAR,压力,'←压力'),COLORFFCC10,COLORYELLOW;DRAWTEXT(ISLASTBAR,支撑,'←支撑'),COLORFFCC10,COLORYELLOW;DRAWTEXT(ISLASTBAR,顶,'←落袋为安'),COLORFFCC10,COLORYELLOW; DRAWTEXT(ISLASTBAR,底,'←底.短线机会'),COLORFFCC10,COLORYELLOW; DRAWTEXT(ISLASTBAR,主力线,'←主力线'),COLORFFCC10,COLORYELLOW; DRAWTEXT(ISLASTBAR,工作线,'←工作线'),COLORFFCC10,COLORYELLOW;IF(主力线<=REF(主力线,1),主力线,DRAWNULL),COLORGREEN;IF(工作线<=REF(工作线,1),工作线,DRAWNULL),COLORGREEN;IF(压力<=REF(压力,1),压力,DRAWNULL),COLORGREEN;IF(支撑<=REF(支撑,1),支撑,DRAWNULL),COLORGREEN;IF(顶<=REF(顶,1),顶,DRAWNULL),COLORGREEN;IF(底<=REF(底,1),底,DRAWNULL),COLORGREEN;IF(生命线<=REF(生命线,1),生命线,DRAWNULL),COLORGREEN;IF(强势判定<=REF(强势判定,1),强势判定,DRAWNULL),COLORGREEN;。
主图画线通达信指标公式源码
N1:=6;限时日:=11711201;限时:=IF(DATE<限时日,1,1);重心:(2*C+H+L)/4* 限时,COLOR00FFFF,LINETHICK0;SJ:=WMA((重心-LLV(L,5))/(HHV(H,5)-LLV(L,5))*100,2)* 限时;ZJ:=WMA(0.618*REF(SJ,1)+0.382*SJ,2)* 限时;DRAWTEXT(CROSS(SJ,ZJ) AND SJ<30* 限时,L-0.1* 限时,'←低吸')* 限时,COLOR00FF00;DRAWTEXT(CROSS(ZJ,SJ) AND SJ>70,H+0.1* 限时,'←高抛')* 限时,COLOR0077FF; A1:=EMA(C,14)* 限时,COLORWHITE,LINETHICK1;A1X:=(A1-REF(A1,1))/REF(A1,1)*100* 限时,NODRAW;突破:REF(EMA(C,14),1)* 限时,NODRAW;距离:(C-突破)/突破*100* 限时,NODRAW;出击:IF(A1X>=0,REF(EMA(C,14),BARSLAST(CROSS(A1X,0))+1)* 限时,DRAWNULL)COLORRED,LINETHICK1;休假:IF(A1X<0,REF(EMA(C,14),BARSLAST(CROSS(0,A1X))+1)* 限时,DRAWNULL)COLORGREEN,LINETHICK1;涨幅:IF(A1X>=0,(C-出击)/出击*100* 限时,DRAWNULL)NODRAW;跌幅:IF(A1X<0,(C-休假)/休假*100* 限时,DRAWNULL)NODRAW;IF(H>=出击*1.1,出击*1.1,DRAWNULL)* 限时,COLORRED,POINTDOT,LINETHICK4; IF(H>=出击*1.2,出击*1.2,DRAWNULL)* 限时,COLORRED,POINTDOT,LINETHICK4; IF(H>=出击*1.3,出击*1.3,DRAWNULL)* 限时,COLORRED,POINTDOT,LINETHICK4; IF(L<休假*0.9,休假*0.9,DRAWNULL)* 限时,COLORGREEN,POINTDOT,LINETHICK4; IF(L<休假*0.8,休假*0.8,DRAWNULL)* 限时,COLORGREEN,POINTDOT,LINETHICK4; IF(L<休假*0.7,休假*0.7,DRAWNULL)* 限时,COLORGREEN,POINTDOT,LINETHICK4;STICKLINE(CROSS(A1X,0),C,O,2,0)* 限时,COLORYELLOW;STICKLINE(CROSS(0,A1X),C,O,2,0)* 限时,COLORGREEN;STICKLINE(CROSS(A1X,0)ORCROSS(0,A1X),REF(EMA(C,14),1),REF(EMA(C,14),1)*0.998,2,0)* 限时,COLORWHITE; STICKLINE(ISLASTBAR,REF(EMA(C,14),1),REF(EMA(C,14),1)*0.998,5,0)* 限时,COLORWHITE;A11:DRAWLINE(HIGH>=HHV(HIGH,5),HIGH,LOW<=LLV(LOW,5),LOW,0)* 限时;B1:DRAWLINE(LOW<=LLV(LOW,5),LOW,HIGH>=HHV(HIGH,5),HIGH,0)* 限时;A2:DRAWLINE(HIGH>=HHV(HIGH,13),HIGH,LOW<=LLV(LOW,13),LOW,0)* 限时,COLORCYAN;B2:DRAWLINE(LOW<=LLV(LOW,13),LOW,HIGH>=HHV(HIGH,13),HIGH,0)* 限时;A3:DRAWLINE(HIGH>=HHV(HIGH,34),HIGH,LOW<=LLV(LOW,34),LOW,0)* 限时;B3:DRAWLINE(LOW<=LLV(LOW,34),LOW,HIGH>=HHV(HIGH,34),HIGH,0)* 限时;A4:DRAWLINE(HIGH>=HHV(HIGH,55),HIGH,LOW<=LLV(LOW,55),LOW,0)* 限时;B4:DRAWLINE(LOW<=LLV(LOW,55),LOW,HIGH>=HHV(HIGH,55),HIGH,0)* 限时; MTM:=C-REF(C,1);ZLGJ:=100*EMA(EMA(MTM,N1),N1)/EMA(EMA(ABS(MTM),N1),N1);买1:=IF(LLV(ZLGJ,2)=LLV(ZLGJ,7) AND COUNT(ZLGJ<0,2) ANDCROSS(ZLGJ,MA(ZLGJ,2)),1,0)* 限时;卖1:=IF(HHV(ZLGJ,2)=HHV(ZLGJ,7) AND COUNT(ZLGJ>50,2) ANDCROSS(MA(ZLGJ,2),ZLGJ),1,0)* 限时;DRAWICON(FILTER(买1=1,5),LOW*0.99,7)* 限时,COLORRED;STICKLINE(FILTER(买1=1,5),C,O,1,0)* 限时,COLORRED;DRAWICON(FILTER(卖1=1,1),H*1.01,8)* 限时,COLOR00FF00;STICKLINE(FILTER(卖1=1,1),C,O,1,0)* 限时,COLOR00FF00;RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D;BDGD:=HHV(J,2)=HHV(J,8) AND J>80;注意:=IF(CROSS(REF(J-0.01,1),J) AND REF(BDGD,1),1,0)* 限时;DRAWTEXT(注意AND 卖1<1,HIGH*1.01,'J')* 限时,COLOR00FF00,LINETHICK3; STICKLINE(注意AND 卖1<1,O,CLOSE,1,0)* 限时,COLORYELLOW,LINETHICK2;时间窗口01:=FILTER(IF(HHVBARS(HIGH,5),0,H),5)* 限时,COLORFFFF00; DRAWTEXT(时间窗口01,HIGH*0.99,'5');时间窗口02:=FILTER(IF(LLVBARS(LOW,5),0,L),5)* 限时,COLOR00FFFF; DRAWTEXT(时间窗口02,LOW*0.99,'5');时间窗口1:=FILTER(IF(HHVBARS(HIGH,13),0,1),13)* 限时,COLOR00FF00; DRAWTEXT(时间窗口1,HIGH*0.99,'13');时间窗口2:=FILTER(IF(LLVBARS(LOW,13),0,1),13)* 限时,COLOR0000FF; DRAWTEXT(时间窗口2,LOW*0.99,'13');时间窗口3:=FILTER(IF(HHVBARS(HIGH,34),0,2),34)* 限时,COLOR55FF55; DRAWTEXT(时间窗口3,HIGH*0.99,'34');时间窗口4:=FILTER(IF(LLVBARS(LOW,34),0,2),34)* 限时,COLOR5555FF;DRAWTEXT(时间窗口4,LOW*0.99,'34');时间窗口5:=FILTER(IF(HHVBARS(HIGH,55),0,30),55)* 限时,COLOR99FF99; DRAWTEXT(时间窗口5,HIGH*0.99,'55');时间窗口6:=FILTER(IF(LLVBARS(LOW,55),0,30),55)* 限时,COLORDD00FF; DRAWTEXT(时间窗口6,LOW*0.99,'55');时间窗口7:=FILTER(IF(HHVBARS(HIGH,89),0,40),89)* 限时,COLORDDFFDD; DRAWTEXT(时间窗口7,HIGH*0.99,'89');时间窗口8:=FILTER(IF(LLVBARS(LOW,89),0,40),89)* 限时,COLOR0055FF; DRAWTEXT(时间窗口8,LOW*0.99,'89');时间窗口9:=FILTER(IF(HHVBARS(HIGH,144),0,50),144)* 限时,COLORDDFF00; DRAWTEXT(时间窗口9,HIGH*0.99,'144');时间窗口10:=FILTER(IF(LLVBARS(LOW,144),0,50),144)* 限时,COLOR9955FF; DRAWTEXT(时间窗口10,LOW*0.99,'144');时间窗口11:=FILTER(IF(HHVBARS(HIGH,233),0,60),233* 限时),COLORDDFFFF; DRAWTEXT(时间窗口11,HIGH*0.99,'233');时间窗口12:=FILTER(IF(LLVBARS(LOW,233),0,60),233)* 限时,COLORFF55FF; DRAWTEXT(时间窗口12,LOW*0.99,'233')* 限时;DRAWTEXT_FIX(CROSS(DATE,限时日) OR DATE=限时日,0.5,0.9,0,'★★QQ:1713415707★★'),COLOR0000FF;。
通达信量能主升捕捉黑马主图公式源码
通达信量能主升捕捉黑马主图公式
这是我自己常用的成交量买卖公式,经常会抓到你想要的牛股
公式原理:一支股票好与不好,成交量是关键,放量了股价也创新高了,这样的股票做中长线百分之百不亏,直到在顶部放巨量了赶紧跑吧,不管后面再如何涨,都是主力在为了出货而拉升股价
关注量爆出现后突破量爆的最高价
ZT:=REF(C,1)*1.1-C<0.01 AND H=C;
STICKLINE( ZT,C,O,2,0),COLORYELLOW;
走强线:EMA(COST(99),181),COLORYELLOW,LINETHICK2;
巨量平台:REF(H,BARSLAST(V=HHV(VOL,120))),COLORRED,LINETHICK2;
XG:= NOT(REF(巨量平台,1)=巨量平台) AND ZT;
DRAWTEXT(XG,L,'量爆'),COLORCYAN;
主升:=CROSS(C,巨量平台);
DRAWTEXT(主升,L,'↖主升'),COLORYELLOW;
DRAWTEXT(主升AND ZT,L,'↖超级主升'),COLORRED;。
通达信指标公式源码K线主图 主图指标 源码
源码如下:M5:MA(CLOSE,5);M10:MA(CLOSE,10);M20:MA(CLOSE,20);M30:MA(CLOSE,30);M60:MA(CLOSE,60);M120:MA(CLOSE,120);M250:MA(CLOSE,250);中线【买入】:=COUNT(CLOSE<M20,5)=4 AND CLOSE/M20>1.004 AND CROSS(CLOSE,M20) AND M20>=REF(M20,1),LINETHICK,COLORRED;DRAWTEXT(中线【买入】,LOW*0.95,' 中线【买入】'),COLORRED;VL:=REF(LOW,1);VAR112:=(SMA(ABS(LOW-VL),13,1))/(SMA(MAX(LOW-VL,0),13,1))*100;VAR114:=MA(VAR112,13);VAR115:=LLV(LOW,34);VAR118:=EMA(IF(LOW<=VAR115,VAR114,0),3);VAR110:=SMA(SMA((CLOSE-LLV(LOW,54))/(HHV(HIGH,54)-LLV(LOW,54))*100,7,1),5,1); VAR111:=SMA((CLOSE-LLV(LOW,54))/(HHV(HIGH,54)-LLV(LOW,54))*100,7,1)*16.18-VAR 110*10.9;T:=FILTER(IF(VAR111<=VAR110 AND VAR118>REF(VAR118,1),VAR118*8,0),20); DRAWTEXT(T,LOW-0.5,'←洗盘结束'),COLORFF00FF;DRAWTEXT(T,LOW-0.3,'|'),COLORFF00FF;VAR21:=(CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100;VAR22:=SMA(VAR21,3,1);VAR23:=SMA(VAR22,3,1);VAR24:=SMA(VAR23,3,1);VAR25:=CROSS(VAR23,VAR24) AND VAR23<20;DRAWTEXT(FILTER(VAR25,10)=1,LOW-0.5,'←抄底'),COLORRED;DRAWTEXT(FILTER(VAR25,10)=1,LOW-0.3,'|'),COLORRED;VAR29:=CROSS(VAR24,VAR23) AND VAR23>80;DRAWTEXT(FILTER(VAR29,5)=1,HIGH+0.5,'←逃'),COLORGREEN;JG:=CROSS(M5,M10);VOLUME:=VOL,VOLSTICK;MAVOL1:=MA(VOLUME,5);MAVOL2:=MA(VOLUME,10);NL:=CROSS(MAVOL1,MAVOL2);DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIF,9);MACD:=(DIF-DEA)*2,COLORSTICK;NA:=CROSS(DIF,DEA);RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,9,1);D:=SMA(K,9,1);J:=3*K-2*D;KD:=CROSS(K,D) AND CROSS(J,D);一招定乾坤:DRAWTEXT((JG AND NL AND NA) OR (JG AND NL AND KD) OR(JG AND NA AND KD) OR (NL AND NA AND KD),L*0.95,'←一招定乾坤'),COLORYELLOW; X:=LLV(J,2)=LLV(J,8);Y:=IF(CROSS(J,REF(J+0.01,1)) AND X AND J<20,30,0);DRAWTEXT(CROSS(J,REF(J+0.01,1)) AND X AND J<20,LOW*0.98,'←短进'),COLORLIMAGENTA;空:=EMA(C,5);均衡:=EMA(空,5);中轨:=HHV(MA(H,13),13);VAR5:=FILTER(均衡>REF(均衡,1)AND 中轨<REF(中轨,1)AND C>REF(C,1),11); DRAWTEXT(VAR5,L*0.98,'←追涨'),COLORRED;PT:=EMA(H,20);PAN:=EMA(CLOSE,7);RUO:=MEMA(CLOSE,3);DRAWICON(LONGCROSS(PAN,RUO,0.25) AND PT>H ,L*0.98,1);VARC:=SMA(MAX(C-REF(C,1),0),6,1)/SMA(ABS(C-REF(C,1)),6,1)*100;DRAWTEXT(CROSS(84,VARC),H*1.01,'逃'),COLORYELLOW ;AAA:=CONST(HHV(H,90));R1:=MA(CLOSE,1);R2:=MA(CLOSE,3);R3:=(MA(R2,1)*1);R4:=(MA(R2,3)*1);DRAWTEXT(CROSS(R3,R4),(LOW-0.1),'进场'),COLORYELLOW;A51:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA((C-LLV(L,55))/(HHV (H,55)-LLV(L,55))*100,5,1);LC:=REF(CLOSE,1);RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);FF:=EMA(CLOSE,3);MA15:=EMA(CLOSE,21);DRAWTEXT(CROSS(88,RSI),(HIGH * 1.02),'出局'),COLORGREEN;VARE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;VAR12:=(HIGH+LOW+CLOSE)/3;VAR13:=(VAR12-MA(VAR12,14))/(0.015*AVEDEV(VAR12,14));VAR14:=(VAR12-MA(VAR12,70))/(0.015*AVEDEV(VAR12,70));VAR15:=IF(VAR13>=150 AND VAR13<200 AND VAR14>=150 AND VAR14<200,10,0); VAR16:=IF(VAR13<=-150 AND VAR13>-200 AND VAR14<=-150 AND VAR14>-200,-10,VAR15);VAR17:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;VAR18:=100-ABS(VAR17);VAR19:=IF(VAR18<90,VAR18,100);VAR1A:=IF(VARE>0,VARE,0);VAR1B:=IF(VAR14>=200 AND VAR13>=150,15,IF(VAR14<=-200 AND VAR13<=-150,-15,VAR16))+60;VAR1C:=VAR1A>48 AND VAR1B>60 AND VAR19<100;DRAWTEXT(VAR1C AND COUNT(VAR1C,30)=1,HIGH*1.02,'大笔出货'),LINETHICK1,COLORFFCC66;AA1:=AMOUNT/V;BB1:=L<AA1*0.9;CC1:=(C-REF(C,1))/REF(C,1)*100>1.2;DD1:=L<MA(C,5)*0.921;EE1:=V<MA(V,5)*1.5;老鼠仓:=BB1 AND CC1 AND DD1 AND EE1,LINETHICK0;DRAWTEXT(老鼠仓,(LOW* 0.99),'老鼠仓'),COLOR40CCFF;A75:=(CLOSE > M5);A76:=(M5 > M10);A77:=(CLOSE > M10);A78:=(M5 > M20);A79:=(CLOSE > M20);A710:=REF(M20,1);A711:=(M20 > A710);AVX:=(((((IF(A75,10,(0 - 10)) + IF(A76,10,(0 - 10))) + IF(A77,10,(0 - 10)))+ IF(A78,10,(0 - 10))) + IF(A79,10,(0 - 10))) + IF(A711,10,(0 - 10)));DSLX:=(CLOSE / INDEXC);DSLX1:=MA(DSLX,5);DSLX2:=MA(DSLX,10);V1:=MA(VOL,5);V2:=MA(VOL,10);T1:=CONST(IF(C<200 AND ((CROSS(AVX,1) AND (V1 >= V2)) AND (DSLX >= DSLX1)),1,0));T2:=CONST(IF(C<200 AND ((CROSS(AVX,1) AND (V1 < V2)) AND (DSLX >= DSLX1)),1,0));T3:=CONST(IF(C<200 AND ((CROSS(AVX,1) AND (V1 > V2)) AND (DSLX < DSLX1)),1,0));T4:=CONST(IF(C<200 AND ((CROSS(AVX,1) AND (V1 <= V2)) AND (DSLX < DSLX1)),1,0));T5:=CONST(IF(C<200 AND ((CROSS(1,AVX) AND (V1 >= V2)) AND (DSLX >= DSLX1)),1,0));T6:=CONST(IF(C<200 AND ((CROSS(1,AVX) AND (V1 < V2)) AND (DSLX >= DSLX1)),1,0));T7:=CONST(IF(C<200 AND ((CROSS(1,AVX) AND (V1 >= V2)) AND (DSLX < DSLX1)),1,0));T8:=CONST(IF(C<200 AND ((CROSS(1,AVX) AND (V1 < V2)) AND (DSLX < DSLX1)),1,0));T9:=CONST(IF(C<200 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 >= V2)) AND (DSLX >= DSLX1)),1,0));T10:=CONST(IF(C<200 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 < V2)) AND (DSLX >= DSLX1)),1,0));T11:=CONST(IF(C<200 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 >= V2)) AND (DSLX < DSLX1)),1,0));T12:=CONST(IF(C<200 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 < V2)) AND (DSLX < DSLX1)),1,0));T13:=CONST(IF(C<200 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 >= V2)) AND (DSLX >= DSLX1)),1,0));T14:=CONST(IF( C<200 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 < V2)) AND (DSLX >= DSLX1)),1,0));T15:=CONST(IF(C<200 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 >= V2)) AND (DSLX < DSLX1)),1,0));T16:=CONST(IF(C<200 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 < V2)) AND (DSLX < DSLX1)),1,0));T17:=CONST(IF(C>200 AND (CROSS(AVX,1) AND (V1 >= V2)),1,0));T18:=CONST(IF(C>200 AND (CROSS(AVX,1) AND (V1 >= V2)),1,0));T19:=CONST(IF(C>200 AND (CROSS(AVX,1) AND (V1 < V2)),1,0));T20:=CONST(IF(C>200 AND (CROSS(1,AVX) AND (V1 >= V2)),1,0));T21:=CONST(IF(C>200 AND (CROSS(1,AVX) AND (V1 < V2)),1,0));T22:=CONST(IF(C>200 AND (((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 >= V2)),1,0));T23:=CONST(IF(C>200 AND (((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 < V2)),1,0)); T24:=CONST(IF(C>200 AND (((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 >= V2)),1,0)); T25:=CONST(IF(C>200 AND (((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 < V2)),1,0)); DRAWTEXT(T1=1 AND CURRBARSCOUNT=70,AAA-(AAA*0.03),'量能理想,明显走强,中线参与,仓位在2/3左右。
通达信稳定盈利主图源码通达信指标源码
自用指标感觉不错,上传分享给大家。
红色箭头买入,绿色箭头卖出。
买线:=EMA(C,2);卖线:=EMA(SLOPE(C,21)*20+C,42);BU:=CROSS(买线,卖线);SEL:=CROSS(卖线,买线);DRAWICON(BU,L-0.1,1);DRAWICON(SEL,H+0.1,2);STICKLINE(买线>=卖线,LOW,HIGH,0.0,1),COLORRED;STICKLINE(买线>=卖线,CLOSE,OPEN,2,1),COLORRED;STICKLINE(买线<卖线,LOW,HIGH,0.0,1),COLORGREEN;STICKLINE(买线<卖线,CLOSE,OPEN,2,1),COLORGREEN;散户:EMA(CLOSE,5),COLORWHITE;{}操盘:MA(CLOSE,9),COLORCYAN,LINETHICK2;界点:MA(CLOSE,20),COLORMAGENTA;LC:=REF(CLOSE,1);RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);FF:=EMA(CLOSE,3);MA15:=EMA(CLOSE,21);日:=150;昨前:=3;高1:=REF(HHV(H,日),昨前);低1:=REF(LLV(L,日),昨前);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),COLORRED;一0.809:REFDATE(H1,DATE),COLORYELLOW;二0.618:REFDATE(H2,DATE),COLORMAGENTA;三0.500:REFDATE(H3,DATE),COLORWHITE;四0.382:REFDATE(H4,DATE),COLORGREEN;五0.191:REFDATE(H5,DATE),COLORYELLOW;低:REFDATE(低1,DATE),COLORRED;DRAWICON(C<MA(C,250) AND C>MA(C,10) AND REF(C,1)<REF(O,1)*0.97 AND C/O>1.03 AND V/CAPITAL>0.03,L*0.97,9);。
通达信指标公式源码专做主升行情的指标
通达信指标公式源码专做主升行情的指标通达信是一种常用的股票分析软件,它提供了许多指标公式用于技术分析。
在主升行情中,投资者通常希望找到股票走势的强势点,以便进行买入操作。
下面是一些适用于主升行情的通达信指标公式源码。
1.MACD指标源码:```EMA12:=(2*CLOSE+11*EMA12[1])/13;EMA26:=(2*CLOSE+25*EMA26[1])/27;DIF:=(EMA12-EMA26);DEA:=(2*DIF+8*DEA[1])/10;MACD:=(DIF-DEA)*2;```MACD指标是一个常用的趋势指标,通过计算长短期指数移动平均线的差异,来判断股票走势的强弱。
当MACD指标向上穿越零轴时,为买入信号。
2.KDJ指标源码:```RSVP:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;RSV:EMA(CLOSE,9);K:(2*RSVP+2*K[1])/3;D:(2*K+2*D[1])/3;J:3*K-2*D;```KDJ指标是一种反映价格走势的动力的指标,通过计算最近9日内收盘价在最高价和最低价之间所占比例,来判断股票的超买和超卖情况。
当KDJ指标向上穿越20线时,为买入信号。
3.RSI指标源码:```RSI1:SMA(MAX(CLOSE-REF(CLOSE,1),0),14,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),14,1)*100;RSI2:SMA(MAX(CLOSE-REF(CLOSE,1),0),7,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)*100;RSI3:SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100;```RSI指标是一种反映股票市场超买和超卖情况的指标,通过计算一段时间内收盘价上涨幅度占总幅度的比例,来判断市场的买入和卖出力量。
通达信指标公式源码 自动画线主图指标公式
N1:=10;N2:=10;DISP:=2;K:=IF(PERIOD=5,1,{日}IF(PERIOD=6,1,{周}IF(PERIOD=7,1,{月}IF(PERIOD=8,1,{多分钟}IF(PERIOD=9,1,{多日}IF(PERIOD=10,1,{季}IF(PERIOD=11,2,{年}IF(PERIOD=4,1,{60F}IF(PERIOD=3,1,{30F}IF(PERIOD=2,1,{15F}IF(PERIOD=1,1{5F},1{1F})))))))))))/10;P1:=PEAK(1,K*N1,1);P2:=PEAK(1,K*N1,2);WP1:=PEAKBARS(1,K*N1,1);WP2:=PEAKBARS(1,K*N1,2);T1:=TROUGH(2,K*N2,1);T2:=TROUGH(2,K*N2,2);WT1:=TROUGHBARS(2,K*N2,1);WT2:=TROUGHBARS(2,K*N2,2);TJ1:=P1>T1 AND P2>T2 ;ZD:=MAX(T1,T2);ZG:=MIN(P1,P2);LL:=MIN(T1,T2);HH:=MAX(P1,P2);TJ2:=FILTER(ZG>ZD,2);TJ3:=ZG=REF(ZG,BARSLAST(TJ2)) OR ZD=REF(ZD,BARSLAST(TJ2));TJ4:=TJ1&&TJ2&&NOT(TJ3);TJ5:=BETWEEN(ZD,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST( TJ4),1)));TJ6:=BETWEEN(ZG,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST( TJ4),1)));TJ7:=ZG>REF(ZG,REF(BARSLAST(TJ4),1))&&ZD<REF(ZD,REF(BARSLAST(TJ4 ),1));TJ8:=TJ4&&NOT(TJ5 OR TJ6 OR TJ7);ZSD:=IF(TJ8,ZD,DRAWNULL);ZSG:=IF(TJ8,ZG,DRAWNULL);ZSH:=IF(TJ8,HH,DRAWNULL);ZSL:=IF(TJ8,LL,DRAWNULL);STICKLINE(TJ8,ZSH,ZSL,0,-1),COLORMAGENTA;STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),COLORMAGENTA; DRAWTEXT(DISP=2,ZSH,'中枢'),COLORWHITE;中枢高:=PLOYLINE(DISP=2,REF(ZSD,BARSLAST(TJ8))),CIRCLEDOT,COLORLIRED; 中枢低:=PLOYLINE(DISP=2,REF(ZSG,BARSLAST(TJ8))),CIRCLEDOT,COLORLIGRE EN;{中枢最高:PLOYLINE(DISP=2,REF(ZSH,BARSLAST(TJ8))),POINTDOT,COLORRED;中枢最低:PLOYLINE(DISP=2,REF(ZSL,BARSLAST(TJ8))),POINTDOT,COLORGREEN;} 趋势高:=PLOYLINE(DISP=3,ZIG(1,K*N1)),COLORLIBLUE;趋势低:=PLOYLINE(DISP=3,ZIG(2,K*N2)),COLORLIBLUE;局部低点预选A:=BACKSET(LLV(L,5)<REF(LLV(L,4),1),4);局部低点预选B:=BACKSET(局部低点预选A=0 AND REF(局部低点预选A,1)=1,2);局部低点预选C:=IF(局部低点预选B=1 AND REF(局部低点预选B,1)=0,-1,0); 局部高点预选A:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4);局部高点预选B:=BACKSET(局部高点预选A=0 AND REF(局部高点预选A,1)=1,2);局部高点预选C:=IF(局部高点预选B=1 AND REF(局部高点预选B,1)=0,1,0); 缺口判断:=IF(L>REF(H,1),1,IF(H<REF(L,1),-1,0));距前高天:=BARSLAST(局部高点预选C=1);距前低天:=BARSLAST(局部低点预选C=-1);小值周期:=LOWRANGE(L);大值周期:=TOPRANGE(H);低保留AA:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);低保留AB:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR LLV(L,距前低天+2)<REF(LLV(L,距前低天+1),1)),-1,0);低保留S:=IF((低保留AA=-1 OR 低保留AB=-1) AND L<REF(H,距前高天+1),-1,0);预判:=IF((距前低天<4 AND HHV(缺口判断,距前低天)!=1) OR REF(低保留S,距前低天)=0,1,0);判断:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND 预判=1 AND 大值周期>REF(小值周期,距前低天+1) AND 大值周期>REF(小值周期,距前低天) AND 大值周期>REF(大值周期,距前高天),1,0);高保留A:=IF(局部高点预选C=1 AND REF(距前低天,1)>REF(距前高天,1) AND HHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0);高保留B:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND REF(低保留S,距前低天)=-1 AND (距前低天>=4 OR HHV(缺口判断,距前低天)=1),1,0);高保留:=IF((高保留A=1 OR 高保留B=1 OR 判断=1) AND H>REF(L,距前低天+1),1,0);预判A:=IF((距前高天<4 AND HHV(缺口判断,距前高天)!=1) OR REF(高保留,距前高天)=0,1,0);判断A:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND 预判A=1 AND 小值周期>REF(大值周期,距前高天+1) AND 小值周期>REF(大值周期,距前高天) AND 小值周期>REF(小值周期,距前低天),-1,0);低保留A:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);低保留B:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR 判断A=-1),-1,0);低保留:=IF((低保留A=-1 OR 低保留B=-1) AND L<REF(H,距前高天+1),-1,0); 距前高天A:=BARSLAST(高保留=1);距前低天A:=BARSLAST(低保留=-1);预判X:=IF((距前低天A<4 AND HHV(缺口判断,距前低天A)!=1) OR REF(低保留,距前低天A)=0,1,0);判断X:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND 预判X=1 AND 大值周期>REF(小值周期,距前低天A+1) AND 大值周期>REF(小值周期,距前低天A) AND 大值周期>REF(大值周期,距前高天A),1,0); 高保留XA:=IF(局部高点预选C=1 AND REF(距前低天A,1)>REF(距前高天A,1) AND HHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0);高保留XB:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND REF(低保留,距前低天A)=-1 AND (距前低天A>=4 OR HHV(缺口判断,距前低天A)=1),1,0);高保留X:=IF((高保留XA=1 OR 高保留XB=1 OR 判断X=1) AND H>REF(L,距前低天A+1),1,0);预判XA:=IF((距前高天A<4 AND HHV(缺口判断,距前高天A)!=1) OR REF(高保留XA,距前高天A)=0,1,0);判断XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND 预判XA=1 AND 小值周期>REF(大值周期,距前高天A+1) AND 小值周期>REF(大值周期,距前高天A) AND 小值周期>REF(小值周期,距前低天A),-1,0); 低保留XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)>REF(距前低天A,1) AND LLV(L,距前高天A+1)<REF(LLV(L,距前高天A+1),1),-1,0);低保留XB:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND (距前高天A>=4 OR LLV(缺口判断,距前高天A)=-1 OR 判断XA=-1),-1,0);低保留X:=IF((低保留XA=-1 OR 低保留XB=-1) AND L<REF(H,距前高天A+1),-1,0);距前高天YA:=BARSLAST(高保留X=1);距前低天YA:=BARSLAST(低保留X=-1);预判YX:=IF((距前低天YA<4 AND HHV(缺口判断,距前低天YA)!=1) OR REF(低保留X,距前低天YA)=0,1,0);判断YX:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND 预判YX=1 AND 大值周期>REF(小值周期,距前低天YA+1) AND 大值周期>REF(小值周期,距前低天YA) AND 大值周期>REF(大值周期,距前高天YA),1,0);高保留YXA:=IF(局部高点预选C=1 AND REF(距前低天YA,1)>REF(距前高天YA,1) AND HHV(H,距前低天YA+1)>REF(HHV(H,距前低天YA+1),1),1,0);高保留YXB:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND REF(低保留X,距前低天YA)=-1 AND (距前低天YA>=4 OR HHV(缺口判断,距前低天YA)=1),1,0);高保留YX:=IF((高保留YXA=1 OR 高保留YXB=1 OR 判断YX=1) ANDH>REF(L,距前低天YA+1),1,0);预判YXA:=IF((距前高天YA<4 AND HHV(缺口判断,距前高天YA)!=1) ORREF(高保留YXA,距前高天YA)=0,1,0);判断YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND 预判YXA=1 AND 小值周期>REF(大值周期,距前高天YA+1) AND小值周期>REF(大值周期,距前高天YA) AND 小值周期>REF(小值周期,距前低天YA),-1,0);低保留YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)>REF(距前低天YA,1) AND LLV(L,距前高天YA+1)<REF(LLV(L,距前高天YA+1),1),-1,0);低保留YXB:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND (距前高天YA>=4 OR LLV(缺口判断,距前高天YA)=-1 OR 判断YXA=-1),-1,0);低保留YX:=IF((低保留YXA=-1 OR 低保留YXB=-1) AND L<REF(H,距前高天YA+1),-1,0);AAAD:=IF(高保留YX=1 AND 低保留YX=-1 AND H>REF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1 AND 低保留YX=-1 AND L<REF(L,REF(距前低天YA,1)+2),-1,0));极点保留:=IF(AAAD=0,高保留YX+低保留YX,AAAD);局部极点:=IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL)) CIRCLEDOT COLORYELLOW;{大折线}A1:=REF(HIGH,10)=HHV(HIGH,2*10+1);B1:=FILTER(A1,10);C1:=BACKSET(B1,10+1);D1:=FILTER(C1,10);{高点}A2:=REF(LOW,10)=LLV(LOW,2*10+1);B2:=FILTER(A2,10);C2:=BACKSET(B2,10+1);D2:=FILTER(C2,10);{低点}E1:=(REF(LLV(LOW,2*10),1)+REF(HHV(HIGH,2*10),1))/2;E2:=(HIGH+LOW)/2;H1:=(D1 AND NOT((D2 AND E1>=E2))) OR ISLASTBAR 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 ISLASTBAR 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);{过滤后高点}DRAWLINE(LD,L,HD,H,0),COLORMAGENTA,DOTLINE,LINETHICK1; DRAWLINE(HD,H,LD,L,0),COLORMAGENTA,DOTLINE,LINETHICK1;J1:=BACKSET(ISLASTBAR ,MIN(BARSLAST(HD),BARSLAST(LD))+1);J2:=J1>REF(J1,1);DRAWLINE(J2,IF(HD,H,L),ISLASTBAR ,IF(BARSLAST(HD)>BARSLAST(LD),H,L ),0),COLORWHITE,LINETHICK1;{趋势线}UU:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);VV:=UU>REF(UU,1);WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2);XX:=WW>REF(WW,1);DRAWLINE(XX,L,VV,L,1),COLORRED,LINETHICK2;UU2:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);VV2:=UU2>REF(UU2,1);WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);XX2:=WW2>REF(WW2,1);DRAWLINE(XX2,H,VV2,H,1),COLORGREEN,LINETHICK2;。
通达信指标公式源码自动画线主图指标公式
通达信自动画线主图指标公式自动化线的顶底两条线有未来,其他没有未来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;。
通达信指标公式源码 主力趋势 中线主图
{开始---主力趋势指标}MTM:=C-REF(C,1);主力做多:=100*EMA(EMA(MTM,9),9)/EMA(EMA(ABS(MTM),9),9),COLORWHITE; 多空趋势线:=MA(主力做多,5),COLORYELLOW;能量:=(主力做多-0)*1,COLORBLACK;持仓:=能量, COLORSTICK;{结束}VAR1:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) -LLV(LOW,14))));VAR2:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) -LLV(LOW,14))));VAR3:=(100 - MA(((100 * (HHV(HIGH,6) - CLOSE)) / (HHV(HIGH,6) - LLV(LOW,6))),34));DIR1:=ABS(CLOSE-REF(CLOSE,5));VIR1:=SUM(ABS(CLOSE-REF(CLOSE,1)),5);ER1:=DIR1/VIR1;CS1:=ER1*(0.8-2/8)+2/8;CQ1:=CS1*CS1;基线:EMA(DMA(CLOSE,CQ1),2) ,COLORWHITE;DIR2:=ABS(CLOSE-REF(CLOSE,10));VIR2:=SUM(ABS(CLOSE-REF(CLOSE,1)),10);ER2:=DIR2/VIR2;CS2:=ER2*(0.8-2/24)+2/24;CQ2:=CS2*CS2;观望:EMA(DMA(CLOSE,CQ2),2),COLORGREEN,LINETHICK2;高抛低吸:IF(观望/REF(观望,1)>0.997,观望,DRAWNULL),COLORYELLOW,LINETHICK2;持股:IF(观望/REF(观望,1)>1.001,观望,DRAWNULL),COLORRED,LINETHICK2; STICKLINE((VAR2 < MA(VAR3,6)) AND 主力做多>0,CLOSE,OPEN,3,1),COLOR008000;STICKLINE((VAR2 > MA(VAR3,6)) AND 主力做多>0,OPEN,CLOSE,3,1),COLORRED;STICKLINE(((OPEN > CLOSE) AND (VAR2 > MA(VAR3,6)) AND 主力做多>0),(OPEN * 0.998),(CLOSE * 1.0001),2.3,0),COLOR008000; STICKLINE(((OPEN < CLOSE) AND (VAR2 < MA(VAR3,6)) AND 主力做多>0),(CLOSE * 0.998),(OPEN * 1.002),2.3,0),COLORRED;STICKLINE(((OPEN > CLOSE) AND (VAR2 < MA(VAR3,6)) AND 主力做多>0),CLOSE,OPEN,2.3,0),COLORCYAN;{主图赋值结束}PT:=REF(H,1)-REF(L,1);CDP:=(REF(H,1)+REF(L,1)+REF(C,1)*2)/4;AH:=CDP+PT;AL:=CDP-PT;NH:=CDP*2-REF(L,1);NL:=CDP*2-REF(H,1);强:=IF(AH>REF(C,1)*1.1 ,REF(C,1)*1.1,AH),COLORMAGENTA;阻:=IF(NH>强,(强-CDP)*0.618+CDP ,NH),COLORCYAN;M:=IF(AL<REF(C,1)/1.1,REF(C,1)/1.1,AL);撑:=IF(NL<M,CDP-(CDP-M)*0.618 ,NL),COLORRED;底:=IF(AL<REF(C,1)/1.1,REF(C,1)/1.1 ,AL),COLORGREEN;{开始---主散分布图指标}机构持仓:=EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)),3),COLO RFF00FF;指数趋势:=EMA(1250*(INDEXC-LLV(INDEXL,34))/HHV(INDEXH,34)-LLV(INDEXL,34) ,3),COLORYELLOW,NODRAW;主力:=WINNER(C)*100,COLORRED;散户:= (WINNER(C*1.1)-WINNER(C*0.9))*100,COLORGREEN;强势:=(机构持仓+主力+散户)/2,COLORFF6699;强弱分界:=80,COLOR00FFFF;{结束}{开始----资金动向指标}PJJ:=DMA((H + L + C * 2) / 4,0.9);JJ:=REF(EMA(PJJ,3),1);QJJ:=VOL / ((H - L) * 2 - ABS(C - O));XVL:=IF(C > O,QJJ * (H - L),IF(C < O,QJJ * (H - O + (C - L)),VOL / 2)) +IF(C > O,0 - QJJ * (H - C + (O - L)),IF(C < O,0 - QJJ * (H - L),0 - VOL / 2)); ZLL:=VOL / CAPITAL;HSL1:=IF(ZLL > 10,10,ZLL);HSL:=XVL / 20 / 1.15;攻击流量:=HSL * 0.55 + REF(HSL,1) * 0.33 + REF(HSL,2) * 0.22;GJJ:=EMA(攻击流量,8);LLJX:=EMA(攻击流量,3);流量:=LLJX,COLORC875B7,NODRAW;流量基线:=GJJ,COLOR00BBBB;ZJLL:=REF(LLJX,1);QZJJ:=(((LLJX - ZJLL) / ZJLL) * 100);流量幅%:=IF(((LLJX > 0) AND (ZJLL < 0)),ABS(QZJJ),IF((((LLJX < 0) AND (ZJLL < 0)) AND (LLJX < ZJLL)),(0 - QZJJ),QZJJ))COLORWHITE,NODRAW;大单:=HSL / 1000,COLOR9B37FF,NODRAW;周流量:=SUM(LLJX,5),COLORFFBFDF,NODRAW;BB:=REF(周流量,1);ZQZJJ:=(周流量-BB)/BB*100;周幅%:=IF(周流量>0 AND BB<0,ABS(ZQZJJ),IF(周流量<0 AND BB<0 AND 周流量<BB,-ZQZJJ,ZQZJJ))COLORWHITE,NODRAW;{结束}{反转}VARZ1:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-RE F(CLOSE,1))),25);VARZ2:=HIGH-REF(HIGH,1);VARZ3:=REF(LOW,1)-LOW;VARZ4:=SUM(IF(VARZ2>0 AND VARZ2>VARZ3,VARZ2,0),25);VARZ5:=SUM(IF(VARZ3>0 AND VARZ3>VARZ2,VARZ3,0),25);VARZ6:=VARZ4*100/VARZ1;VARZ7:=VARZ5*100/VARZ1;VARZ8:=MA(ABS(VARZ7-VARZ6)/(VARZ7+VARZ6)*100,15);VARZ9:=(VARZ8+REF(VARZ8,15))/2;A:=(VARZ7>VARZ6 AND VARZ7>25 AND VARZ6<25);B:=ZIG(3,50/5)*100,COLORWHITE;G:=MA(B,2),COLORYELLOW;D:=CROSS(B,G)*1000,COLORRED;W:=CROSS(G,B)*1000,COLORBLUE;E:=REF(INDEXC,1);F:=SMA(MAX(INDEXC-E,0),3,1)/SMA(ABS(INDEXC-E),3,1);VARZ10:=F AND F<8;VARZ11:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;VARZ12:=SMA(VARZ11,3,1);VARZ13:=SMA(VARZ12,3,1);VARZ14:=VARZ13 AND VARZ13<20;MM:=A AND D AND VARZ10 AND VARZ14 ;XXX:=DRAWTEXT(W=1000,B*1.05,'卖' ),COLOR00FF00;XXY:=DRAWTEXT(D=1000,B*1.05,'买'),COLORRED;底1:=STICKLINE(D=1000 AND B*1.05,0,20,2,0),COLORRED;顶1:=STICKLINE(W=1000 AND B*1.05,0,20,2,0),COLORGREEN;{反转}日线:=(MA(CLOSE,3)+MA(CLOSE,5)+MA(CLOSE,10)+MA(CLOSE,20))/4;平均线:=MA(日线,2);{DRAWICON(CROSS(日线,平均线),平均线,1);DRAWICON(CROSS(平均线,日线),平均线,2);}{综合选股输出}顶部:=DRAWTEXT( 顶1 ,(HIGH+(HIGH*0.10)),'顶')COLORGREEN;底部:=DRAWTEXT( 底1 ,(LOW - (LOW*0.10)),'底')COLORRED;VAR11:=(2*CLOSE+HIGH+LOW)/4;VAR22:=EXPMA(EXPMA(EXPMA(VAR11,5),5),5);J:= (VAR22-REF(VAR22,1))/REF(VAR22,1)*100, COLORSTICK;多空:= MA(J,3);多头:= MA(J,1);{STICKLINE( UPNDAY(J,1)AND J>0,J ,0,1,0)COLORRED;STICKLINE( UPNDAY(J,1)AND J>0,J ,0,0.8,0)COLORLIRED;}买进:DRAWICON(CROSS(主力做多,0) ,(LOW - (LOW*0.06)),3);卖出:DRAWICON(CROSS(0,主力做多),(HIGH+ (HIGH*0.06)),4);风险:DRAWICON( DOWNNDAY(机构持仓,1) AND (CROSS(多空趋势线,主力做多) AND 主力做多>0) OR( 顶1 AND 主力做多>0),(HIGH+ (HIGH*0.06)),6);。
通达信主图划线(附源码)
通达信主图划线(附源码)通达信主图划线(附源码)T:=DYNAINFO(8)>0;VO:=VOL=LLV(VOL,100) AND T;地量柱:=T AND VO,COLORBLUE;STICKLINE(地量柱,C,O,2.5,0),COLORAAAA00;STICKLINE(地量柱,L,H,0,0),COLORAAAA00;DRAWLINE(地量柱,L,REF(地量柱,1),REF(L,1),1),COLORAAAA00;DRAWTEXT(地量柱,C,'地量柱'),COLORAAAA00;BLZ:=VOL>REF(V,1)*1.9;STICKLINE(BLZ,C,O,2.5,0),COLORYELLOW;STICKLINE(BLZ,L,H,0,0),COLORYELLOW;倍量柱:=BLZ,COLORYELLOW;DRAWLINE(倍量柱,L,REF(倍量柱,1),REF(L,1),1),COLORYELLOW;DRAWTEXT(倍量柱,C*0.95,'倍量'),COLORYELLOW;HJZ:=(3*C+H+L+O)/6;HJZ2:=(8*HJZ+7*REF(HJZ,1)+6*REF(HJZ,2)+5*REF(HJZ,3)+4* REF(HJZ,4)+3*REF(HJZ,5)+2*REF(HJZ,6)+REF(HJZ,8))/36;HJZ3:=VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND CLOSE>HJZ2 AND C>O;黄金柱:=FILTER(HJZ3,5),LINETHICK0;STICKLINE(黄金柱,C,O,2.5,0),COLORRED;STICKLINE(黄金柱,L,H,0,0),COLORRED;DRAWLINE(黄金柱,L,REF(黄金柱,1),REF(L,1),1),COLORRED;DRAWTEXT(黄金柱,C,'黄金柱'),COLORRED;FLZ:=V>REF(V,1)*0.98 AND V<REF(V,1)*1.02;STICKLINE(FLZ,C,O,2.5,0),COLORMAGENTA;STICKLINE(FLZ,L,H,0,0),COLORMAGENTA;平量柱:=FLZ,COLORMAGENTA;DRAWLINE(平量柱,L,REF(平量柱,1),REF(L,1),1),COLORMAGENTA;DRAWTEXT(FLZ,C,'平量'),COLORMAGETA;。