您现在的位置:程序化交易>> 股票公式>> 通达信>> 通达信公式>>正文内容

筹码堆积通达信副图指标公式源码[通达信公式]

相关标签: 通达信筹码集中度源码 、 股票筹码集中度计算公式 、 通达信筹码函数 、 主为筹码集中度指标 、 集中度选股公式 、 scr筹码集中度最佳参数 、 筹码集中度使用技巧 、 筹码集中度选股技巧 、 多空筹码指标公式 、 通达信多空资金指标公式 、 筹码堆积副图 、 主力筹码多空比指标代码 、

 

{公式名称: 筹码堆积公式描述: 副图 2☆☆☆◆保留参数数量: 1参数1: N1, 最小: 1, 最大: 1000, 缺省: 6公式类型: 技术指标公式-其他类型画线方法: 副图公式版本: 0显示小数: 缺省位数坐标线位置: 自动额外Y轴分界: 无参数精灵:请设置计算参数:N1: PARAM#0 (1.00--1000.00)用法注释:无公式源码:}

 

 

原理解析:

VAR1赋值:13
VAR2赋值:30
VAR3赋值:(收盘价+开盘价+最低价+最高价)/4
VAR4赋值:以VAR3*1.04计算的获利盘比例*100
VAR5赋值:以VAR3*0.96计算的获利盘比例*100
输出A04:VAR5,NODRAW
输出A08:VAR4-VAR5,NODRAW
输出A06:100-VAR4,NODRAW
当满足条件1时,在100和VAR4位置之间画柱状线,宽度为2,1不为0则画空心柱.,画绿色
当满足条件1时,在0和A08位置之间画柱状线,宽度为2,0不为0则画空心柱.,COLOR000080
当满足条件1时,在0和A04位置之间画柱状线,宽度为2,0不为0则画空心柱.,画红色
输出中轴:50,DOTLINE,画绿色
VAR6赋值:收盘价的60日指数移动平均-收盘价的300日指数移动平均
VAR7赋值:VAR6的300日指数移动平均
VAR8赋值:(收盘价-8日内最低价的最低值)/(8日内最高价的最高值-8日内最低价的最低值)*100
输出买入线:VAR8的2日[1日权重]移动平均,画白色
输出卖出线:买入线的2日[1日权重]移动平均,画绿色
VAR9赋值:收盘价/3日前的收盘价>=1.1
VAR10赋值:若VAR9则将最近3周期置为1
输出大涨买:如果VAR10ANDCOUNT(VAR10,3)=1,返回50,否则返回0,线宽为0
当满足条件大涨买时,在50位置书写文字
当满足条件大涨买的5日过滤=1时,在0和20位置之间画柱状线,宽度为3,0不为0则画空心柱.,画黄色
当满足条件大涨买AND大涨买时,在最低价*0.8位置书写文字,画白色
VAR11赋值:收盘价15%之字转向的前1个波峰位置<10
VAR12赋值:如果VAR11=1,返回50,否则返回0
VAR13赋值:如果VAR12=50,返回100,否则返回0
输出卖:如果VAR13>1日前的VAR13,返回50,否则返回0,线宽为0
当满足条件卖的5日过滤=1时,在0和20位置之间画柱状线,宽度为3,0不为0则画空心柱.,COLORFF8800
当满足条件卖AND卖时,在最低价*0.6位置书写文字,画白色
VAR14赋值:收盘价15%之字转向的前1个波谷位置<10
VAR15赋值:如果VAR14=1,返回50,否则返回0
VAR16赋值:如果VAR15=50,返回50,否则返回0
输出买:如果VAR16>1日前的VAR16,返回40,否则返回0,线宽为0
当满足条件买时,在40位置书写文字
当满足条件买的5日过滤=1时,在0和20位置之间画柱状线,宽度为2,0不为0则画空心柱.,COLOR999999
当满足条件买AND买时,在最低价*0.2位置书写文字,画白色
相对位置上画矩形
VAR17赋值:成交额分档/10000
VAR18赋值:成交额分档/10000
VAR19赋值:成交额分档/10000
VAR20赋值:成交额分档/10000
VAR21赋值:(-成交额分档)/10000
VAR22赋值:(-成交额分档)/10000
VAR23赋值:(-成交额分档)/10000
VAR24赋值:(-成交额分档)/10000
VAR25赋值:VAR17+VAR18+VAR19+VAR20+(VAR21+VAR22+VAR23+VAR24)
VAR26赋值:VAR19+VAR23
VAR27赋值:VAR17+VAR18+(VAR21+VAR22)
VAR28赋值:VAR27的3日累和
VAR29赋值:VAR27的10日累和
VAR30赋值:VAR17+VAR21
VAR31赋值:VAR18+VAR22
VAR32赋值:VAR20+VAR24
VAR33赋值:VAR17+VAR18
VAR34赋值:VAR21+VAR22
VAR35赋值:VAR19+VAR20
VAR36赋值:VAR23+VAR24
VAR37赋值:VAR25的3日累和
VAR38赋值:VAR25的10日累和
VAR39赋值:逐笔买入大单成交量*100/成交量(手)
VAR40赋值:逐笔卖出大单成交量*100/成交量(手)
VAR41赋值:如果总成交单数>0,返回(逐笔买入大单成交单数-逐笔卖出大单成交单数)/总成交单数*100,否则返回0
VAR42赋值:如果总成交单数>0,返回(逐笔卖出成交单数-逐笔买入成交单数)*100/总成交单数,否则返回0
VAR43赋值:(逐笔买入大单成交量-逐笔卖出大单成交量)*100/当前流通股本(手)
相对位置上画矩形
相对位置上画矩形
相对位置上画矩形
当满足条件1时,在横轴0.003纵轴0.807位置书写文字,COLOR00AA00
当满足条件1时,在横轴0.118纵轴0.807位置书写文字,画白色
当满足条件1时,在横轴0.223纵轴0.807位置书写文字,画白色
VAR44赋值:如果VAR41>0ANDREF(VAR41,1)<0,返回1,否则返回0
VAR45赋值:如果VAR41>0ANDREF(VAR41,1)>0ANDREF(VAR41,2)<0,返回2,否则返回VAR44
VAR46赋值:如果VAR41>0ANDREF(VAR41,1)>0ANDREF(VAR41,2)>0ANDREF(VAR41,3)<0,返回3,否则返回VAR45
VAR47赋值:如果VAR41>0ANDREF(VAR41,1)>0ANDREF(VAR41,2)>0ANDREF(VAR41,3)>0ANDREF(VAR41,4)<0,返回4,否则返回VAR46
VAR48赋值:如果VAR41>0ANDREF(VAR41,1)>0ANDREF(VAR41,2)>0ANDREF(VAR41,3)>0ANDREF(VAR41,4)>0ANDREF(VAR41,5)<0,返回5,否则返回VAR47
VAR49赋值:如果VAR41>0ANDREF(VAR41,1)>0ANDREF(VAR41,2)>0ANDREF(VAR41,3)>0ANDREF(VAR41,4)>0ANDREF(VAR41,5)>0ANDREF(VAR41,6)<0,返回6,否则返回VAR48
VAR50赋值:如果VAR41>0ANDREF(VAR41,1)>0ANDREF(VAR41,2)>0ANDREF(VAR41,3)>0ANDREF(VAR41,4)>0ANDREF(VAR41,5)>0ANDREF(VAR41,6)>0ANDREF(VAR41,7)<0,返回7,否则返回VAR49
VAR51赋值:如果VAR41>0ANDREF(VAR41,1)>0ANDREF(VAR41,2)>0ANDREF(VAR41,3)>0ANDREF(VAR41,4)>0ANDREF(VAR41,5)>0ANDREF(VAR41,6)>0ANDREF(VAR41,7)>0ANDREF(VAR41,8)<0,返回8,否则返回VAR50
VAR52赋值:如果VAR41>0ANDREF(VAR41,1)>0ANDREF(VAR41,2)>0ANDREF(VAR41,3)>0ANDREF(VAR41,4)>0ANDREF(VAR41,5)>0ANDREF(VAR41,6)>0ANDREF(VAR41,7)>0ANDREF(VAR41,8)>0ANDREF(VAR41,9)<,返回?,否则返回9
VAR53赋值:如果VAR41>0ANDREF(VAR41,1)>0ANDREF(VAR41,2)>0ANDREF(VAR41,3)>0ANDREF(VAR41,4)>0ANDREF(VAR41,5)>0ANDREF(VAR41,6)>0ANDREF(VAR41,7)>0ANDREF(VAR41,8)>0ANDREF(VAR41,9)>,返回?,否则返回10
当满足条件1时,在横轴0.075纵轴0.803位置书写文字,画白色
VAR54赋值:如果VAR42>0ANDREF(VAR42,1)<0,返回1,否则返回0
VAR55赋值:如果VAR42>0ANDREF(VAR42,1)>0ANDREF(VAR42,2)<0,返回2,否则返回VAR54
VAR56赋值:如果VAR42>0ANDREF(VAR42,1)>0ANDREF(VAR42,2)>0ANDREF(VAR42,3)<0,返回3,否则返回VAR55
VAR57赋值:如果VAR42>0ANDREF(VAR42,1)>0ANDREF(VAR42,2)>0ANDREF(VAR42,3)>0ANDREF(VAR42,4)<0,返回4,否则返回VAR56
VAR58赋值:如果VAR42>0ANDREF(VAR42,1)>0ANDREF(VAR42,2)>0ANDREF(VAR42,3)>0ANDREF(VAR42,4)>0ANDREF(VAR42,5)<0,返回5,否则返回VAR57
VAR59赋值:如果VAR42>0ANDREF(VAR42,1)>0ANDREF(VAR42,2)>0ANDREF(VAR42,3)>0ANDREF(VAR42,4)>0ANDREF(VAR42,5)>0ANDREF(VAR42,6)<0,返回6,否则返回VAR58
VAR60赋值:如果VAR42>0ANDREF(VAR42,1)>0ANDREF(VAR42,2)>0ANDREF(VAR42,3)>0ANDREF(VAR42,4)>0ANDREF(VAR42,5)>0ANDREF(VAR42,6)>0ANDREF(VAR42,7)<0,返回7,否则返回VAR59
VAR61赋值:如果VAR42>0ANDREF(VAR42,1)>0ANDREF(VAR42,2)>0ANDREF(VAR42,3)>0ANDREF(VAR42,4)>0ANDREF(VAR42,5)>0ANDREF(VAR42,6)>0ANDREF(VAR42,7)>0ANDREF(VAR42,8)<0,返回8,否则返回VAR60
VAR62赋值:如果VAR42>0ANDREF(VAR42,1)>0ANDREF(VAR42,2)>0ANDREF(VAR42,3)>0ANDREF(VAR42,4)>0ANDREF(VAR42,5)>0ANDREF(VAR42,6)>0ANDREF(VAR42,7)>0ANDREF(VAR42,8)>0ANDREF(VAR42,9)<,返回?,否则返回9
VAR63赋值:如果VAR42>0ANDREF(VAR42,1)>0ANDREF(VAR42,2)>0ANDREF(VAR42,3)>0ANDREF(VAR42,4)>0ANDREF(VAR42,5)>0ANDREF(VAR42,6)>0ANDREF(VAR42,7)>0ANDREF(VAR42,8)>0ANDREF(VAR42,9)>,返回?,否则返回10
当满足条件1时,在横轴0.183纵轴0.803位置书写文字,画白色
VAR64赋值:如果VAR43>0ANDREF(VAR43,1)<0,返回1,否则返回0
VAR65赋值:如果VAR43>0ANDREF(VAR43,1)>0ANDREF(VAR43,2)<0,返回2,否则返回VAR64
VAR66赋值:如果VAR43>0ANDREF(VAR43,1)>0ANDREF(VAR43,2)>0ANDREF(VAR43,3)<0,返回3,否则返回VAR65
VAR67赋值:如果VAR43>0ANDREF(VAR43,1)>0ANDREF(VAR43,2)>0ANDREF(VAR43,3)>0ANDREF(VAR43,4)<0,返回4,否则返回VAR66
VAR68赋值:如果VAR43>0ANDREF(VAR43,1)>0ANDREF(VAR43,2)>0ANDREF(VAR43,3)>0ANDREF(VAR43,4)>0ANDREF(VAR43,5)<0,返回5,否则返回VAR67
VAR69赋值:如果VAR43>0ANDREF(VAR43,1)>0ANDREF(VAR43,2)>0ANDREF(VAR43,3)>0ANDREF(VAR43,4)>0ANDREF(VAR43,5)>0ANDREF(VAR43,6)<0,返回?,否则返回?
 

源码:

 

VAR1:=13;VAR2:=30;VAR3:=(CLOSE+OPEN+LOW+HIGH)/4;VAR4:=WINNER(VAR3*1.04)*100;VAR5:=WINNER(VAR3*0.96)*100;A04:VAR5,NODRAW;A08:VAR4-VAR5,NODRAW;A06:100-VAR4,NODRAW;STICKLINE(1,100,VAR4,2,1),COLORGREEN;STICKLINE(1,0,A08,2,0),COLOR000080;STICKLINE(1,0,A04,2,0),COLORRED;中轴:50,DOTLINE,COLORGREEN;VAR6:=EMA(CLOSE,60)-EMA(CLOSE,300);VAR7:=EMA(VAR6,300);VAR8:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;买入线:SMA(VAR8,2,1),COLORWHITE;卖出线:SMA(买入线,2,1),COLORGREEN;VAR9:=CLOSE/REF(CLOSE,3)>=1.1;VAR10:=BACKSET(VAR9,3);大涨买:IF(VAR10 AND COUNT(VAR10,3)=1,50,0),LINETHICK0;DRAWTEXT(大涨买,50,5);STICKLINE(FILTER(大涨买,5)=1,0,20,3,0),COLORYELLOW;DRAWTEXT(大涨买 AND 大涨买,LOW*0.8,6),COLORWHITE;VAR11:=PEAKBARS(3,15,1)<10;VAR12:=IF(VAR11=1,50,0);VAR13:=IF(VAR12=50,100,0);卖:IF(VAR13>REF(VAR13,1),50,0),LINETHICK0;STICKLINE(FILTER(卖,5)=1,0,20,3,0),COLORFF8800;DRAWTEXT(卖 AND 卖,LOW*0.6,7),COLORWHITE;VAR14:=TROUGHBARS(3,15,1)<10;VAR15:=IF(VAR14=1,50,0);VAR16:=IF(VAR15=50,50,0);买:IF(VAR16>REF(VAR16,1),40,0),LINETHICK0;DRAWTEXT(买,40,8);STICKLINE(FILTER(买,5)=1,0,20,2,0),COLOR999999;DRAWTEXT(买 AND 买,LOW*0.2,9),COLORWHITE;DRAWRECTREL(323,999,0,632.400024,IF(120,RGB(0,20,0),0));VAR17:=L2_AMO(0,2)/10000;VAR18:=L2_AMO(1,2)/10000;VAR19:=L2_AMO(2,2)/10000;VAR20:=L2_AMO(3,2)/10000;VAR21:=(-L2_AMO(0,3))/10000;VAR22:=(-L2_AMO(1,3))/10000;VAR23:=(-L2_AMO(2,3))/10000;VAR24:=(-L2_AMO(3,3))/10000;VAR25:=VAR17+VAR18+VAR19+VAR20+(VAR21+VAR22+VAR23+VAR24);VAR26:=VAR19+VAR23;VAR27:=VAR17+VAR18+(VAR21+VAR22);VAR28:=SUM(VAR27,3);VAR29:=SUM(VAR27,10);VAR30:=VAR17+VAR21;VAR31:=VAR18+VAR22;VAR32:=VAR20+VAR24;VAR33:=VAR17+VAR18;VAR34:=VAR21+VAR22;VAR35:=VAR19+VAR20;VAR36:=VAR23+VAR24;VAR37:=SUM(VAR25,3);VAR38:=SUM(VAR25,10);VAR39:=LARGEINTRDVOL*100/VOL;VAR40:=LARGEOUTTRDVOL*100/VOL;VAR41:=IF(TRADENUM>0,(LARGETRDINNUM-LARGETRDOUTNUM)/TRADENUM*100,0);VAR42:=IF(TRADENUM>0,(TRADEOUTNUM-TRADEINNUM)*100/TRADENUM,0);VAR43:=(LARGEINTRDVOL-LARGEOUTTRDVOL)*100/CAPITAL;DRAWRECTREL(100,910,2,805,IF(CONST(VAR41)>0,RGB(192,17,127),RGB(0,100,0)));DRAWRECTREL(207,910,115,805,IF(CONST(VAR42)>0,RGB(192,17,27),RGB(0,100,0)));DRAWRECTREL(324,910,219,805,IF(CONST(VAR43)>0,RGB(192,17,27),RGB(0,100,0)));DRAWTEXT_FIX(1,0.003,0.807,0,STRCAT(10,CON2STR(VAR41,2))),COLOR00AA00;DRAWTEXT_FIX(1,0.118,0.807,0,STRCAT(11,CON2STR(VAR42,2))),COLORWHITE;DRAWTEXT_FIX(1,0.223,0.807,0,STRCAT(12,CON2STR(VAR43,2))),COLORWHITE;VAR44:=IF(VAR41>0 AND REF(VAR41,1)<0,1,0);VAR45:=IF(VAR41>0 AND REF(VAR41,1)>0 AND REF(VAR41,2)<0,2,VAR44);VAR46:=IF(VAR41>0 AND REF(VAR41,1)>0 AND REF(VAR41,2)>0 AND REF(VAR41,3)<0,3,VAR45);VAR47:=IF(VAR41>0 AND REF(VAR41,1)>0 AND REF(VAR41,2)>0 AND REF(VAR41,3)>0 AND REF(VAR41,4)<0,4,VAR46);VAR48:=IF(VAR41>0 AND REF(VAR41,1)>0 AND REF(VAR41,2)>0 AND REF(VAR41,3)>0 AND REF(VAR41,4)>0 AND REF(VAR41,5)<0,5,VAR47);VAR49:=IF(VAR41>0 AND REF(VAR41,1)>0 AND REF(VAR41,2)>0 AND REF(VAR41,3)>0 AND REF(VAR41,4)>0 AND REF(VAR41,5)>0 AND REF(VAR41,6)<0,6,VAR48);VAR50:=IF(VAR41>0 AND REF(VAR41,1)>0 AND REF(VAR41,2)>0 AND REF(VAR41,3)>0 AND REF(VAR41,4)>0 AND REF(VAR41,5)>0 AND REF(VAR41,6)>0 AND REF(VAR41,7)<0,7,VAR49);VAR51:=IF(VAR41>0 AND REF(VAR41,1)>0 AND REF(VAR41,2)>0 AND REF(VAR41,3)>0 AND REF(VAR41,4)>0 AND REF(VAR41,5)>0 AND REF(VAR41,6)>0 AND REF(VAR41,7)>0 AND REF(VAR41,8)<0,8,VAR50);VAR52:=IF(VAR41>0 AND REF(VAR41,1)>0 AND REF(VAR41,2)>0 AND REF(VAR41,3)>0 AND REF(VAR41,4)>0 AND REF(VAR41,5)>0 AND REF(VAR41,6)>0 AND REF(VAR41,7)>0 AND REF(VAR41,8)>0 AND REF(VAR41,9)<0,9,VAR51);VAR53:=IF(VAR41>0 AND REF(VAR41,1)>0 AND REF(VAR41,2)>0 AND REF(VAR41,3)>0 AND REF(VAR41,4)>0 AND REF(VAR41,5)>0 AND REF(VAR41,6)>0 AND REF(VAR41,7)>0 AND REF(VAR41,8)>0 AND REF(VAR41,9)>0,10,VAR52);DRAWTEXT_FIX(1,0.075,0.803,0,STRCAT(STRCAT(13,CON2STR(VAR53,0)),14)),COLORWHITE;VAR54:=IF(VAR42>0 AND REF(VAR42,1)<0,1,0);VAR55:=IF(VAR42>0 AND REF(VAR42,1)>0 AND REF(VAR42,2)<0,2,VAR54);VAR56:=IF(VAR42>0 AND REF(VAR42,1)>0 AND REF(VAR42,2)>0 AND REF(VAR42,3)<0,3,VAR55);VAR57:=IF(VAR42>0 AND REF(VAR42,1)>0 AND REF(VAR42,2)>0 AND REF(VAR42,3)>0 AND REF(VAR42,4)<0,4,VAR56);VAR58:=IF(VAR42>0 AND REF(VAR42,1)>0 AND REF(VAR42,2)>0 AND REF(VAR42,3)>0 AND REF(VAR42,4)>0 AND REF(VAR42,5)<0,5,VAR57);VAR59:=IF(VAR42>0 AND REF(VAR42,1)>0 AND REF(VAR42,2)>0 AND REF(VAR42,3)>0 AND REF(VAR42,4)>0 AND REF(VAR42,5)>0 AND REF(VAR42,6)<0,6,VAR58);VAR60:=IF(VAR42>0 AND REF(VAR42,1)>0 AND REF(VAR42,2)>0 AND REF(VAR42,3)>0 AND REF(VAR42,4)>0 AND REF(VAR42,5)>0 AND REF(VAR42,6)>0 AND REF(VAR42,7)<0,7,VAR59);VAR61:=IF(VAR42>0 AND REF(VAR42,1)>0 AND REF(VAR42,2)>0 AND REF(VAR42,3)>0 AND REF(VAR42,4)>0 AND REF(VAR42,5)>0 AND REF(VAR42,6)>0 AND REF(VAR42,7)>0 AND REF(VAR42,8)<0,8,VAR60);VAR62:=IF(VAR42>0 AND REF(VAR42,1)>0 AND REF(VAR42,2)>0 AND REF(VAR42,3)>0 AND REF(VAR42,4)>0 AND REF(VAR42,5)>0 AND REF(VAR42,6)>0 AND REF(VAR42,7)>0 AND REF(VAR42,8)>0 AND REF(VAR42,9)<0,9,VAR61);VAR63:=IF(VAR42>0 AND REF(VAR42,1)>0 AND REF(VAR42,2)>0 AND REF(VAR42,3)>0 AND REF(VAR42,4)>0 AND REF(VAR42,5)>0 AND REF(VAR42,6)>0 AND REF(VAR42,7)>0 AND REF(VAR42,8)>0 AND REF(VAR42,9)>0,10,VAR62);DRAWTEXT_FIX(1,0.183,0.803,0,STRCAT(STRCAT(13,CON2STR(VAR63,0)),14)),COLORWHITE;VAR64:=IF(VAR43>0 AND REF(VAR43,1)<0,1,0);VAR65:=IF(VAR43>0 AND REF(VAR43,1)>0 AND REF(VAR43,2)<0,2,VAR64);VAR66:=IF(VAR43>0 AND REF(VAR43,1)>0 AND REF(VAR43,2)>0 AND REF(VAR43,3)<0,3,VAR65);VAR67:=IF(VAR43>0 AND REF(VAR43,1)>0 AND REF(VAR43,2)>0 AND REF(VAR43,3)>0 AND REF(VAR43,4)<0,4,VAR66);VAR68:=IF(VAR43>0 AND REF(VAR43,1)>0 AND REF(VAR43,2)>0 AND REF(VAR43,3)>0 AND REF(VAR43,4)>0 AND REF(VAR43,5)<0,5,VAR67);VAR69:=IF(VAR43>0 AND REF(VAR43,1)>0 AND REF(VAR43,2)>0 AND REF(VAR43,3)>0 AND REF(VAR43,4)>0 AND REF(VAR43,5)>0 AND REF(VAR43,6)<0

 

公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程

 

 

有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

怎么收费,代编流程等详情请点击查阅!

(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

 


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容