最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 指标资讯

    正文概述    2024-05-04 03:33:25  

    通达信指标公式源码概况:指标类别: 通达信指标公式授权方式: 免费版指标评级: ★★★★★指标分类: 策略画线方法: 副图一、涨停变色指标公式源码 {涨跌停显示} BK:=IF(INBLOCK( 创业板 ),0.2,IF(INBLOCK( 科创板 ),0.2,IF(INBLOCK( ST板块 ),0.05,0.1))); BF:=IF(DATE =1200823,1,0); STICKLINE((C=ZTPRICE(REF(C,1),BK)ANDC=H),C,O,1.5,0),COLORYELLOW; STICKLINE((C=DTPRICE(REF(C,1),BK)ANDC=L),C,O,-1,0),COLORGREEN; STICKLINE((C =ZTPRICE(REF(C,1),0.1)ANDC=H)ANDBF=1,C,O,1.5,0),COLORYELLOW; STICKLINE((C =DTPRICE(REF(C,1),0.1)ANDC=L)ANDBF=1,C,O,-1,0),COLORGREEN; STICKLINE((H =ZTPRICE(REF(C,1),BK)ANDC=ZTPRICE(REF(CLOSE,1),0.1)ANDC HANDBF=1),H,MAX(C,O),0.1,0),COLORMAGENTA; STICKLINE((L =dtprice(ref(c,1),bk)andc L)OR(L =dtprice(ref(close,1),0.1)andc LANDBF=1),L,MIN(C,O),0.1,0),COLORGREEN; 公式2 涨板:=IFF(NAMEINCLUDE( * )||NAMEINCLUDE( *S )||NAMEINCLUDE( ST ), C =ZTPRICE(REF(C,1),0.05)ANDC=HANDH 0, IFF((DATE =1200824ANDFINANCE(3)=3)||FINANCE(3)=4, C =ZTPRICE(REF(C,1),0.20)ANDC=HANDH 0, C =ZTPRICE(REF(C,1),0.10)ANDC=HANDH  跌板:=IFF(NAMEINCLUDE( * )||NAMEINCLUDE( *S )||NAMEINCLUDE( ST ), C =dtprice(ref(c,1),0.05)andc=landl 0, IFF((DATE =1200824ANDFINANCE(3)=3)||FINANCE(3)=4, C =dtprice(ref(c,1),0.20)andc=landl 0, C =dtprice(ref(c,1),0.10)andc=landl  DRAWKLINE(H,O,L,C); STICKLINE(涨板,O,C,3.0,0),COLOR0099FF; STICKLINE(涨板,O,C,2.0,0),COLOR33BBFF; STICKLINE(涨板,O,C,0.5,0),COLOR55DDFF; STICKLINE(涨板,O,C,0.0,0),COLOR99FFFF; STICKLINE(跌板,O,C,3.0,0),COLOR00AA00; STICKLINE(跌板,O,C,2.0,0),COLOR00CC00; STICKLINE(跌板,O,C,0.5,0),COLOR00EE00; STICKLINE(跌板,O,C,0.0,0),COLOR00FF00; CS1:=IF(INBLOCK( 科创板 )ORINBLOCK( 创业板 ),0.2,IF(INBLOCK( ST板块 ),0.05,0.1)); XA_1:=1; STICKLINE(C=ZTPRICE(REF(C,1),0.1)ANDXA_1=1,O,C,2.5,0),COLORYELLOW; STICKLINE(C=DTPRICE(REF(C,1),0.1)ANDXA_1=1,O,C,2.5,0),COLORGREEN; STICKLINE(C=ZTPRICE(REF(C,1),CS1)ANDXA_1=0,C,O,2.5,0),COLORYELLOW; STICKLINE(C=DTPRICE(REF(C,1),CS1)ANDXA_1=0,C,O,2.5,0),COLORGREEN; 高开涨幅%:(REF(C,1)-O)/REF(C,1)*-100NODRAWCOLORMAGENTA; DRAWKLINE(H,O,L,C);{重绘K线} VER1:=IF(DATE =1200823,1,0); BK:=IF(INBLOCK( 科创板 ),0.2,IF(INBLOCK( 创业板 )ANDDATE VER1,0.2,IF(INBLOCK( ST板块 ),0.05,0.1))); 涨停:=C =ZTPRICE(REF(C,1),BK)ANDC=H; 跌停:=C =DTPRICE(REF(C,1),BK)ANDC=L; STICKLINE((C=ZTPRICE(REF(C,1),BK)ANDC=H),C,O,2.6,0),COLOR00FFFF; STICKLINE((C=DTPRICE(REF(C,1),BK)ANDC=L),C,O,2.6,0),COLOR80FF00; RC1:=REF(C,1); CS:=IF(C =1,10000,100000); C涨停10:=1.10*RC1-49/CS; C涨停5:=1.05*RC1-49/CS; C跌停10:=0.90*RC1+51/CS; C跌停5:=0.95*RC1+51/CS; 大阳线:=C OAND(C =C涨停5ORC (1.05*O-51/CS))OR(C 1000ANDC RC1*1.024); STICKLINE(涨停,O,C,2.6,0),COLORMAGENTA; STICKLINE(跌停,O,C,2.6,0),COLORBLUE; {涨停K线变色,科创板20%变色} BK1:=IF(INBLOCK( 科创板 ),0.2,IF(INBLOCK( ST板块 ),0.05,0.1)); STICKLINE((C=ZTPRICE(REF(C,1),BK1)ANDC=H),C,O,2.5,0),COLORMAGENTA; STICKLINE((C=DTPRICE(REF(C,1),BK1)ANDC=L),C,O,2.5,0),COLORGREEN; STICKLINE((H=ZTPRICE(REF(C,1),BK1)ANDC HANDC O),C,O,2.5,0),COLORGREEN;{收阴} STICKLINE((H=ZTPRICE(REF(C,1),BK1)ANDCO),C,O,2.5,0),COLORRED;{收阳};二、涨停颜色公式 S:=(C+O+L+H)/4; 机构建仓线:=MIN(SMA(S,8,1),MIN(SMA(S,20,1),SMA(S,60,1))),COLORYELLOW,LINETHICK2; 机构拉升线:=MAX(SMA(S,8,1),MAX(SMA(S,20,1),SMA(S,60,1))),COLORRED,LINETHICK2; 涨停:IF(REF(C,1)*1.1-C 0.01,1,0)ANDCROSS(HIGH,机构拉升线); 周期:=33; B:=SMA((CLOSE-LLV(LOW,周期))/(HHV(HIGH,周期)-LLV(LOW,周期)),8,1)*100,COLORYELLOWLINETHICK2,; B1:=(EMA(HHV(B,3),1)),COLORREDLINETHICK2,; 持股:STICKLINE(B-B1 =0,B,B1*1.03,8,1),COLORFF00FF; 持币:STICKLINE(B-B1 0,B,B1,8,1),COLORFF0000; 注意:STICKLINE(B1 80ANDB-B1 =0,0,5,6,0),COLORCCFF66; 持股观望:STICKLINE(B1 55ANDB1 85andb-b1 =0,0,5,6,0),COLORFFFFFF; 买进:STICKLINE(B1 0ANDB1 30andb-b1 =0,0,10,3,0),COLOR0000FF; 低吸:STICKLINE(B1 30ANDB1 55andb-b1 =0,0,6,5,0),COLORFF9900; 卖出:STICKLINE(B1 70ANDB-B1 0,0,15,3,0),COLORFFFF00; 高抛:STICKLINE(B1 50ANDB1 70ANDB-B1 0,0,5,6,0),COLOR00CCFF; 谨慎持股:STICKLINE(B1 20ANDB1 50ANDB-B1 0,0,5,6,0),COLOR00FF00; 试探性买入:STICKLINE(B1 0ANDB1 20ANDB-B1 0,0,8,6,0),COLOR00CCCC; VARQQ1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1); VARQQ2:=SMA(ABS(LOW-VARQQ1),13,1)/SMA(MAX(LOW-VARQQ1,0),10,1); VARQQ3:=EMA(VARQQ2,10); VARQQ4:=LLV(LOW,33); VARQQ5:=EMA(IF(LOW =VARQQ4,VARQQ3,0),3); 主力进场:IF(VARQQ5 REF(VARQQ5,1),VARQQ5,0),LINETHICK0,COLORRED; STICKLINE(VARQQ5 REF(VARQQ5,1),0,VARQQ5*5,6,0),COLORRED; VARAC1:=(CLOSE*2+HIGH+LOW)/4; VARBC1:=EMA(VARAC1,13)-EMA(VARAC1,34); VARCC1:=EMA(VARBC1,5); 多方主力:2*(VARBC1-VARCC1)*380,COLORRED,LINETHICK0; 空方主力:(-2)*(VARBC1-VARCC1)*380,COLORGREEN,LINETHICK0; VAR1:=((CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*200-100)/2; VAR2:=SMA(SMA(VAR1,3,1),3,1); 跟风盘:=MA(EMA(VAR2,3),3),COLORYELLOW,LINETHICK0; 股价:=3*VAR2-2*跟风盘,COLORBLUE,LINETHICK0; VAR3:=EMA(CLOSE,13)-EMA(CLOSE,26)*100; VAR4:=EMA(VAR3,3); 多头:3*(VAR4-VAR3),COLORFF00FF,LINETHICK0; 空头:2*跟风盘-3*VAR2,COLORBLUE,LINETHICK0; 多差:多方主力-多头,NODRAW; 空差:空头-空方主力,NODRAW; DRAWBAND(空头,RGB(99,100,500),空方主力,RGB(0,9000,100)); DRAWBAND(多方主力,RGB(200,15,50),多头,RGB(10,250,50)); VARC0:=(2*CLOSE+HIGH+LOW)/4; VARC1:=(HHV(HIGH,24)-CLOSE)/(HHV(HIGH,24)-LLV(LOW,24))*100; VARC2:=(CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100; B:=EMA((VARC0-LLV(LOW,26))/(HHV(HIGH,34)-LLV(LOW,26))*100,16); 多方:=SMA(SMA(VARC2,2,1)+3,2,1)-50,COLORRED; 浮筹:=EMA(B,4)-50,LINETHICK1,COLOR545454; 空方:=SMA(VARC1,3,1)-50,COLORBLUE; DRAWICON(CROSS(多方主力,多头),多头,11); DRAWICON(CROSS(空头,空方主力),空头,1); DRAWICON(CROSS(多头,多方主力),多头,12); DRAWICON(CROSS(空方主力,空头),空头,2);[源码注释]通达信公式动态公式解读VARQQ1赋值:1日前的(最低价+开盘价+收盘价+最高价)/4VARQQ2赋值:最低价-VARQQ1的绝对值的13日[1日权重]移动平均/最低价-VARQQ1和0的较大值的10日[1日权重]移动平均VARQQ3赋值:VARQQ2的10日指数移动平均VARQQ4赋值:33日内最低价的最低值VARQQ5赋值:如果最低价 =VARQQ4,返回VARQQ3,否则返回0的3日指数移动平均输出主力进场:如果VARQQ5 1日前的VARQQ5,返回VARQQ5,否则返回0,线宽为0,画红色当满足条件VARQQ5 1日前的VARQQ5时,在0和VARQQ5*5位置之间画柱状线,宽度为6,0不为0则画空心柱.,画红色VARAC1赋值:(收盘价*2+最高价+最低价)/4VARBC1赋值:VARAC1的13日指数移动平均-VARAC1的34日指数移动平均VARCC1赋值:VARBC1的5日指数移动平均输出多方主力: 2*(VARBC1-VARCC1)*380,画红色,线宽为0输出空方主力: (-2)*(VARBC1-VARCC1)*380,画绿色,线宽为0VAR1赋值:((收盘价-21日内最低价的最低值)/(21日内最高价的最高值-21日内最低价的最低值)*200-100)/2VAR2赋值:VAR1的3日[1日权重]移动平均的3日[1日权重]移动平均跟风盘赋值:VAR2的3日指数移动平均的3日简单移动平均,画黄色,线宽为0股价赋值:3*VAR2-2*跟风盘,画蓝色,线宽为0VAR3赋值:收盘价的13日指数移动平均-收盘价的26日指数移动平均*100VAR4赋值:VAR3的3日指数移动平均输出多头: 3*(VAR4-VAR3),COLORFF00FF,线宽为0输出空头: 2*跟风盘-3*VAR2,画蓝色,线宽为0输出多差:多方主力-多头,NODRAW输出空差:空头-空方主力,NODRAW画带状线画带状线VARC0赋值:(2*收盘价+最高价+最低价)/4VARC1赋值:(24日内最高价的最高值-收盘价)/(24日内最高价的最高值-24日内最低价的最低值)*100VARC2赋值:(收盘价-18日内最低价的最低值)/(18日内最高价的最高值-18日内最低价的最低值)*100B赋值:(VARC0-26日内最低价的最低值)/(34日内最高价的最高值-26日内最低价的最低值)*100的16日指数移动平均多方赋值:VARC2的2日[1日权重]移动平均+3的2日[1日权重]移动平均-50,画红色浮筹赋值:B的4日指数移动平均-50,线宽为1,COLOR545454空方赋值:VARC1的3日[1日权重]移动平均-50,画蓝色当满足条件多方主力上穿多头时,在多头位置画11号图标当满足条件空头上穿空方主力时,在空头位置画1号图标当满足条件多头上穿多方主力时,在多头位置画12号图标当满足条件空方主力上穿空头时,在空头位置画2号图标推荐阅读:涨停板指标公式源码 VAR12:=(HIGH-LOW); VAR3:=ABS((OPEN-CLOSE)); VAR4:=(HIGH-IF((CLOSE OPEN),CLOSE,OPEN)); VAR5:=(IF((CLOSE OPEN),OPEN,CLOSE)-LOW); VAR6:=((VAR3/VAR12)*VOL); VAR7:=((VAR4/VAR12)*VOL); VAR8:=((VAR5/VAR12)*VOL); VARB:=(((MA(CLOSE,5) MA(CLOSE,10))AND(MA(CLOSE,10) MA(CLOSE,30)))AND(MA(CLOSE,30) MA(CLOSE,60))); 短趋势线:=MA(C,13); ZHULI:(((((VAR6 (MA(VOL,5)*2))AND短趋势线 REF(短趋势线,1)AND(VAR6 =VAR7))AND(VAR6 =VAR8))AND(CLOSE OPEN))OR((VOL (MA(VOL,5)*3))ANDVARBAND短趋势线 REF(短趋势线,1))); MID:=(3*CLOSE+LOW+OPEN+HIGH)/6; A:(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+ 16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+ 13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+ 10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+ 7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+ 4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210; D:(15*MID+14*REF(MID,1)+13*REF(MID,2)+12*REF(MID,3)+11*REF(MID,4)+10*REF(MID,5)+ 9*REF(MID,6)+8*REF(MID,7)+7*REF(MID,8)+ 6*REF(MID,9)+5*REF(MID,10)+ 4*REF(MID,11)+3*REF(MID,12)+2*REF(MID,13)+ REF(MID,15))/120; IF(D A,D,A),COLORYELLOW; IF(D A,A,D),COLORGREEN; E:REF(CLOSE,1); IF(E A,E,A),COLORRED; STICKLINE(C/REF(C,1) 1.095,C,O,2,0),COLORYELLOW; PHD:=IF(LLV(L,3) =REF(H,3),REF(H,3), IF((LLV(L,3) =REF(C,3)ANDREF(C,3) REF(O,3)),REF(C,3), IF(LLV(L,3) =REF(O,3)ANDREF(C,3) REF(O,3),REF(O,3),REF(L,3)))); {画量柱标识:} {1.画倍量黄金柱标识} 倍量黄金柱:=DRAWICON((LLV(L,3) REF(L,3)ORLLV(L,3)=REF(L,3))ANDHHV(V,3) REF(V,3)AND REF(C,3) REF(O,3)ANDREF(V,3) =2*REF(V,4),H+0.2,17); {2.画梯量黄金柱标识} 梯量黄金柱:=DRAWICON(LLV(L,3) REF(L,3)ANDHHV(V,3) REF(V,3)AND REF(V,5) REF(V,6)ANDREF(V,4) REF(V,5)ANDREF(V,3) REF(V,4),H,17); {3.画平量黄金柱标识} 平量黄金柱:=DRAWICON(LLV(L,3) REF(L,3)ANDHHV(V,3) REF(V,3)AND REF(C,3) REF(O,3)ANDABS(REF(V,3)-REF(V,4))/REF(V,4) =0.03,H,19); 倍量:=DRAWICON((VOL REF(V,1)*2.0ORVOL=REF(V,1)*2.0)ANDC REF(C,1),H+0.2,26); STICKLINE(倍量,OPEN,CLOSE,-1,0),COLORYELLOW; 倍量黄金线:STICKLINE(倍量黄金柱,PHD,PHD,28,0),COLORMAGENTA,LINETHICK5; DRAWICON(倍量黄金柱,PHD*1.008,12); DRAWTEXT(倍量黄金柱,PHD*1.008, 倍量黄金线 ),COLORMAGENTA; 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)ANDVOL 2*REF(VOL,1)ANDCLOSE HJZ2ANDC  黄金柱:FILTER(HJZ3,5),STICK,COLORRED,LINETHICK4,NODRAW; STICKLINE(黄金柱,O,C,3.3,0),COLORRED; STICKLINE(黄金柱,H,L,0.1,0),COLORRED; DRAWTEXT(黄金柱,H*0.98, ←黄金柱 ),COLORYELLOW; XG:=SUMBARS(FILTER(黄金柱,2),1); STICKLINE(XG,REF(C,XG-1),REF(C,XG-1),10,0),COLORGREEN; XG1:=SUMBARS(FILTER(黄金柱,2),1); STICKLINE(XG1,REF(L,XG1-1),REF(L,XG1-1),10,0),COLORAA00FF; 平量黄金线:STICKLINE(平量黄金柱,PHD*1.002,PHD,28,0),COLORYELLOW; DRAWTEXT(平量黄金柱,PHD*1.015, ←平量黄金线 ),COLORFFCC00; 梯量黄金线:STICKLINE(梯量黄金柱,PHD*1.002,PHD,28,0),COLORYELLOW; DRAWTEXT(梯量黄金柱,PHD*1.015, ←梯量黄金线 ),COLORCYAN; STICKLINE(C/REF(C,1) 1.095,C,O,2,0),COLORYELLOW; 高:=REF(HHV(H,1),3); 低:=REF(LLV(L,1),3); H19:=高-(高-低); H38:=高-(高-低); H中:=高-(高-低); H61:=高-(高-低); H80:=高-(高-低); 顶点:REFDATE(高,DATE),COLORWHITE; 低点:REFDATE(低,DATE),COLORWHITE; 真阴线:=C =REF(C,1)ANDC  假阳线:=C =ref(c,1)andc  阴线:=真阴线 0OR假阳线  阴线天数:=BARSLAST(阴线); 阴线实体最高价:=MAX(REF(C,阴线天数),REF(O,阴线天数)); 阴线成交量:=REF(V,阴线天数); 阳胜条件:=阴线天数 0ANDC =阴线实体最高价ANDV =阴线成交量; 阳胜:=IF(阳胜条件 0ANDREF(阳胜条件,1)=0,10,0); 真阳线:=C =REF(C,1)ANDC  假阴线:=C =REF(C,1)ANDC  阳线:=真阳线 0OR假阴线  阳线天数:=BARSLAST(阳线); 阳线实体最低价:=MIN(REF(C,阳线天数),REF(O,阳线天数)); 阳线成交量:=REF(V,阳线天数); 阴胜条件:=阳线天数 0ANDC =阳线实体最低价andv =阳线成交量*0.9; 阴胜:=IF(阴胜条件 0ANDREF(阴胜条件,1)=0,10,0),COLORWHITE; 阳胜进:=IF(阳胜 0,20,0),COLORRED; 阴胜出:=IF(阴胜 0,20,0); DRAWTEXT(阳胜进 0,LOW*0.98, 阳 ),COLOR00FFFF,LINETHICK3; DRAWTEXT(阴胜出 0,HIGH*1.02, 阴 ),COLORGREEN,LINETHICK3; DRAWLINE(CURRBARSCOUNT=TOTALBARSCOUNT,CONST(C),CURRBARSCOUNT=1,C,3)DOTLINE; Q:=(O+C)/2; DRAWKLINE(Q,Q,Q,Q);

    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 指标资讯 加入收藏