通达信可视化筹码峰V2.5主图指标 渐变式筹码散线精准涨停标记
{价格定义}
AMAP:=(C*3+O+H+L)/6;
AMA0:=AMA(AMAP,1/3);
AMA1:=AMA(AMA0,1/9);
AMA2:=AMA(AMA0,1/21);
AMA3:=AMA(AMA0,1/60);
{多空透明}
DRAWBAND(COST(00.01),RGB(10,10,10),COST(99.99),RGB(10,10,10));
DRAWBAND(COST(1),RGB(13,13,13),COST(99),RGB(13,13,13));
DRAWBAND(COST(2),RGB(16,16,16),COST(98),RGB(16,16,16));
DRAWBAND(COST(4),RGB(19,19,19),COST(96),RGB(19,19,19));
DRAWBAND(COST(6),RGB(22,22,22),COST(94),RGB(22,22,22));
DRAWBAND(COST(8),RGB(25,25,25),COST(92),RGB(25,25,25));
DRAWBAND(COST(10),RGB(25,25,25),COST(90),RGB(25,25,25));
STICKLINE(H>=L,COST(00.01),COST(99.99),0,0),COLOR101010;
STICKLINE(H>=L,COST(1),COST(99),0,0),COLOR131313;
STICKLINE(H>=L,COST(2),COST(98),0,0),COLOR161616;
STICKLINE(H>=L,COST(4),COST(96),0,0),COLOR191919;
STICKLINE(H>=L,COST(6),COST(94),0,0),COLOR1C1C1C;
STICKLINE(H>=L,COST(8),COST(92),0,0),COLOR1F1F1F;
STICKLINE(H>=L,COST(10),COST(90),0,0),COLOR222222;
DRAWBAND(AMAP,RGB(60,30,30),AMA3,RGB(20,40,40));
DRAWBAND(AMAP,RGB(90,20,20),AMA2,RGB(15,60,60));
{筹码散线}
NOTEXTC1:COST(1),COLOR202020;
NOTEXTC2:COST(2),COLOR202020;
NOTEXTC3:COST(4),COLOR202020;
NOTEXTC4:COST(6),COLOR202020;
NOTEXTC5:COST(8),COLOR202020;
NOTEXTC6:COST(10),COLOR282828;
NOTEXTC7:COST(12),COLOR282828;
NOTEXTC8:COST(14),COLOR282828;
NOTEXTC9:COST(16),COLOR282828;
NOTEXTC10:COST(18),COLOR282828;
NOTEXTC11:COST(20),COLOR303030;
NOTEXTC12:COST(22),COLOR303030;
NOTEXTC13:COST(24),COLOR303030;
NOTEXTC14:COST(26),COLOR303030;
NOTEXTC15:COST(28),COLOR303030;
NOTEXTC16:COST(30),COLOR303030;
NOTEXTC17:COST(32),COLOR303030;
NOTEXTC18:COST(34),COLOR303030;
NOTEXTC19:COST(36),COLOR303030;
NOTEXTC20:COST(38),COLOR303030;
NOTEXTC21:COST(40),COLOR303030;
NOTEXTC22:COST(42),COLOR303030;
NOTEXTC23:COST(44),COLOR303030;
NOTEXTC24:COST(46),COLOR303030;
NOTEXTC25:COST(48),COLOR303030;
NOTEXTC26:COST(50),COLOR303030;
NOTEXTC27:COST(52),COLOR303030;
NOTEXTC28:COST(54),COLOR303030;
NOTEXTC29:COST(56),COLOR303030;
NOTEXTC30:COST(58),COLOR303030;
NOTEXTC31:COST(60),COLOR303030;
NOTEXTC32:COST(62),COLOR303030;
NOTEXTC33:COST(64),COLOR303030;
NOTEXTC34:COST(66),COLOR303030;
NOTEXTC35:COST(68),COLOR303030;
NOTEXTC36:COST(70),COLOR303030;
NOTEXTC37:COST(72),COLOR303030;
NOTEXTC38:COST(74),COLOR303030;
NOTEXTC39:COST(76),COLOR303030;
NOTEXTC40:COST(78),COLOR303030;
NOTEXTC41:COST(80),COLOR303030;
NOTEXTC42:COST(82),COLOR282828;
NOTEXTC43:COST(84),COLOR282828;
NOTEXTC44:COST(86),COLOR282828;
NOTEXTC45:COST(88),COLOR282828;
NOTEXTC46:COST(90),COLOR282828;
NOTEXTC47:COST(92),COLOR282828;
NOTEXTC48:COST(94),COLOR282828;
NOTEXTC49:COST(96),COLOR202020;
NOTEXTC50:COST(98),COLOR202020;
NOTEXTC51:COST(99),COLOR202020;
{多空不透明}
DRAWBAND(AMAP,RGB(120,0,0),AMA1,RGB(0,100,100));
DRAWBAND(AMA0,RGB(100,0,0),AMA1,RGB(0,80,80));
{均线绘制}
NOTEXTA3:AMA3,COLOR3C3C4C;
NOTEXTA3K:IF(AMA3>AMAP,AMA3,DRAWNULL),COLOR3C3C2C;
NOTEXTA2:AMA2,COLOR4C4C8C;
NOTEXTA2K:IF(AMA2>AMAP,AMA2,DRAWNULL),COLOR6C6C2C;
NOTEXTA1:AMA1,COLOR4C4CFC;
NOTEXTA1K:IF(AMA1>AMAP,AMA1,DRAWNULL),COLORBCBC2C;
NOTEXTA0:AMA0,COLORC8C8C8;
{涨停标记}
KC:=IF(CODELIKE('68'),1,0);
BJ:=IF(CODELIKE('83'),1,0)+IF(CODELIKE('87'),1,0);
CY:=IF(CODELIKE('30'),1,0)*IF(DATETODAY(DATE)-DATETODAY(1200824)>0,1,0);
ST:=IF(BARSLAST((C=H AND C=ZTPRICE(REF(C,1),0.05)) OR (C=L AND C=DTPRICE(REF(C,1),0.05)))<BARSLAST(H>ZTPRICE(REF(C,1),0.05) OR L<DTPRICE(REF(C,1),0.05)),1,0);
ZT20:=IF(KC>0 OR CY>0,ZTPRICE(REF(C,1),0.20),0);
ZT30:=IF(BJ>0,ZTPRICE(REF(C,1),0.30),0);
ZT05:=IF(ST>0 AND (ZT20=0 OR ZT20=DRAWNULL),ZTPRICE(REF(C,1),0.05),0);
ZT10:=IF((ZT30=0 OR ZT30=DRAWNULL) AND (ZT20=0 OR ZT20=DRAWNULL) AND (ZT05=0 OR ZT05=DRAWNULL),ZTPRICE(REF(C,1),0.10),0);
ZTXX:=MAX(MAX(MAX(IF(ZT05=DRAWNULL,0,ZT05),IF(ZT10=DRAWNULL,0,ZT10)),IF(ZT20=DRAWNULL,0,ZT20)),IF(ZT30=DRAWNULL,0,ZT30));
GOLD:=IF(C=H AND C=ZTXX,1,0);
DRAWKLINE(H,O,L,C);
STICKLINE(GOLD=1,H,L,0,0),COLOR00FFFF;
STICKLINE(GOLD=1 AND C<=O,C,O,2,0),COLOR00FFFF;
STICKLINE(GOLD=1 AND C>=O,C,O,2,1),COLOR00FFFF;
DRAWKLINE(IF(GOLD=0,H,DRAWNULL),IF(GOLD=0,O,DRAWNULL),IF(GOLD=0,L,DRAWNULL),IF(GOLD=0,C,DRAWNULL));
{输出文字}
DRAWTEXT_FIX(H>=L,0,0,0,STRCAT(STRCAT(STRCAT('[所属板块] ',MOREHYBLOCK),' '),STRCAT(SUBSTR(DYBLOCK,1,IF(STRLEN(DYBLOCK)=8,4,6)),STRCAT(' ',GNBLOCK)))),COLOR885533;
DRAWTEXT_FIX(H>=L,0,0,0,STRCAT('[所属板块] ',MOREHYBLOCK)),COLORDD6633;
DRAWTEXT_FIX(H>=L,0,0,0,STRCAT('[所属板块]&[公司地位] ',EXTERNSTR(1,10010))),COLOR6C6C6C;
DRAWTEXT_FIX(H>=L,0,0,0,STRCAT('&&[曾用名称] ',IF(STRLEN(EXTERNSTR(1,10018))>4,EXTERNSTR(1,10018),'无'))),COLOR505050;
未来函数检测结果如下:
该公式包含未来函数:COST
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
{价格定义}AMAP赋值:(C*3+O+H+L)/6
AMA0赋值:AAP的1/3日简单移动平均
AMA1赋值:AA0的1/9日简单移动平均
AMA2赋值:AA0的1/21日简单移动平均
AMA3赋值:AA0的1/60日简单移动平均
{多空透明}DRAWBAND(获利盘为00.01%的成本分布,RGB(10,10,10),COST(99.99),RGB(10,10,10))
DRAWBAND(获利盘为1%的成本分布,RGB(13,13,13),COST(99),RGB(13,13,13))
DRAWBAND(获利盘为2%的成本分布,RGB(16,16,16),COST(98),RGB(16,16,16))
DRAWBAND(获利盘为4%的成本分布,RGB(19,19,19),COST(96),RGB(19,19,19))
DRAWBAND(获利盘为6%的成本分布,RGB(22,22,22),COST(94),RGB(22,22,22))
DRAWBAND(获利盘为8%的成本分布,RGB(25,25,25),COST(92),RGB(25,25,25))
DRAWBAND(获利盘为10%的成本分布,RGB(25,25,25),COST(90),RGB(25,25,25))
STICKLINE(H>=L,获利盘为00.01%的成本分布,COST(99.99),0,0),COLOR101010
STICKLINE(H>=L,获利盘为1%的成本分布,COST(99),0,0),COLOR131313
STICKLINE(H>=L,获利盘为2%的成本分布,COST(98),0,0),COLOR161616
STICKLINE(H>=L,获利盘为4%的成本分布,COST(96),0,0),COLOR191919
STICKLINE(H>=L,获利盘为6%的成本分布,COST(94),0,0),COLOR1C1C1C
STICKLINE(H>=L,获利盘为8%的成本分布,COST(92),0,0),COLOR1F1F1F
STICKLINE(H>=L,获利盘为10%的成本分布,COST(90),0,0),COLOR222222
DRAWBAND(AMAP,RGB(60,30,30),AMA3,RGB(20,40,40))
DRAWBAND(AMAP,RGB(90,20,20),AMA2,RGB(15,60,60))
输出{筹码散线}NOTEXTC1:获利盘为1%的成本分布,COLOR202020
输出NOTEXTC2:获利盘为2%的成本分布,COLOR202020
输出NOTEXTC3:获利盘为4%的成本分布,COLOR202020
输出NOTEXTC4:获利盘为6%的成本分布,COLOR202020
输出NOTEXTC5:获利盘为8%的成本分布,COLOR202020
输出NOTEXTC6:获利盘为10%的成本分布,COLOR282828
输出NOTEXTC7:获利盘为12%的成本分布,COLOR282828
输出NOTEXTC8:获利盘为14%的成本分布,COLOR282828
输出NOTEXTC9:获利盘为16%的成本分布,COLOR282828
输出NOTEXTC10:获利盘为18%的成本分布,COLOR282828
输出NOTEXTC11:获利盘为20%的成本分布,COLOR303030
输出NOTEXTC12:获利盘为22%的成本分布,COLOR303030
输出NOTEXTC13:获利盘为24%的成本分布,COLOR303030
输出NOTEXTC14:获利盘为26%的成本分布,COLOR303030
输出NOTEXTC15:获利盘为28%的成本分布,COLOR303030
输出NOTEXTC16:获利盘为30%的成本分布,COLOR303030
输出NOTEXTC17:获利盘为32%的成本分布,COLOR303030
输出NOTEXTC18:获利盘为34%的成本分布,COLOR303030
输出NOTEXTC19:获利盘为36%的成本分布,COLOR303030
NOTEXTC20:获利盘为38%的成本分布,COLOR303030
NOTEXTC21:获利盘为40%的成本分布,COLOR303030
NOTEXTC22:获利盘为42%的成本分布,COLOR303030
NOTEXTC23:获利盘为44%的成本分布,COLOR303030
NOTEXTC24:获利盘为46%的成本分布,COLOR303030
NOTEXTC25:获利盘为48%的成本分布,COLOR303030
NOTEXTC26:获利盘为50%的成本分布,COLOR303030
NOTEXTC27:获利盘为52%的成本分布,COLOR303030
NOTEXTC28:获利盘为54%的成本分布,COLOR303030
NOTEXTC29:获利盘为56%的成本分布,COLOR303030
NOTEXTC30:获利盘为58%的成本分布,COLOR303030
NOTEXTC31:获利盘为60%的成本分布,COLOR303030
NOTEXTC32:获利盘为62%的成本分布,COLOR303030
NOTEXTC33:获利盘为64%的成本分布,COLOR303030
NOTEXTC34:获利盘为66%的成本分布,COLOR303030
NOTEXTC35:获利盘为68%的成本分布,COLOR303030
NOTEXTC36:获利盘为70%的成本分布,COLOR303030
NOTEXTC37:获利盘为72%的成本分布,COLOR303030
NOTEXTC38:获利盘为74%的成本分布,COLOR303030
NOTEXTC39:获利盘为76%的成本分布,COLOR303030
NOTEXTC40:获利盘为78%的成本分布,COLOR303030
NOTEXTC41:获利盘为80%的成本分布,COLOR303030
NOTEXTC42:获利盘为82%的成本分布,COLOR282828
NOTEXTC43:获利盘为84%的成本分布,COLOR282828
NOTEXTC44:获利盘为86%的成本分布,COLOR282828
NOTEXTC45:获利盘为88%的成本分布,COLOR282828
NOTEXTC46:获利盘为90%的成本分布,COLOR282828
NOTEXTC47:获利盘为92%的成本分布,COLOR282828
NOTEXTC48:获利盘为94%的成本分布,COLOR282828
NOTEXTC49:获利盘为96%的成本分布,COLOR202020
NOTEXTC50:获利盘为98%的成本分布,COLOR202020
NOTEXTC51:获利盘为99%的成本分布,COLOR202020
{多空不透明}DRAWBAND(AMAP,RGB(120,0,0),AMA1,RGB(0,100,100))
DRAWBAND(AMA0,RGB(100,0,0),AMA1,RGB(0,80,80))
输出{均线绘制}NOTEXTA3:AMA3,COLOR3C3C4C
如果AMA3>AMAP返回AMA3否则返回DRAWNULL
输出NOTEXTA2:AMA2,COLOR4C4C8C
如果AMA2>AMAP返回AMA2否则返回DRAWNULL
输出NOTEXTA1:AMA1,COLOR4C4CFC
如果AMA1>AMAP返回AMA1否则返回DRAWNULL
输出NOTEXTA0:AMA0,COLORC8C8C8
{涨停标记}KC赋值:IF(CODELIKE('68'),1,0)
BJ赋值:IF(CODELIKE('83'),1,0)+IF(CODELIKE('87'),1,0)
CY赋值:IF(CODELIKE('30'),1,0)*IF(DATETODAY(DATE)-DATETODAY(1200824)>0,1,0)
ST赋值:IF(上次(C=H AND C=ZTPRICE(1日前的C,0.05距今天数) OR (C=L AND C=DTPRICE(1日前的C,0.05)))ZTPRICE(1日前的C,0.05) OR LZT20赋值:IF(KC>0 OR CY>0,ZTPRICE(1日前的C,0.20),0)
ZT30赋值:IF(BJ>0,ZTPRICE(1日前的C,0.30),0)
ZT05赋值:IF(ST>0 AND (ZT20=0 OR ZT20=DRAWNULL),ZTPRICE(1日前的C,0.05),0)
ZT10赋值:IF((ZT30=0 OR ZT30=DRAWNULL) AND (ZT20=0 OR ZT20=DRAWNULL) AND (ZT05=0 OR ZT05=DRAWNULL),ZTPRICE(1日前的C,0.10),0)
如果ZT05=DRAWNULL返回0否则返回ZT05
如果C=H AND C=ZTXX返回1否则返回0
DRAWKLINE(H,O,L,C)
当满足条件GOLD=1时,在H和L之间画柱状线
当满足条件GOLD=1 AND C<=O时,在C和O之间画柱状线
当满足条件GOLD=1 AND C>=O时,在C和O之间画柱状线
如果GOLD=0返回H否则返回DRAWNULL
{输出文字}DRAWTEXT_FIX(H>=L,0,0,0,STRCAT(STRCAT(STRCAT('[所属板块] ',MOREHYBLOCK),' '),STRCAT(SUBSTR(DYBLOCK,1,IF(STRLEN(DYBLOCK)=8,4,6)),STRCAT(' ',GNBLOCK)))),COLOR885533
DRAWTEXT_FIX(H>=L,0,0,0,STRCAT('[所属板块] ',MOREHYBLOCK)),COLORDD6633
DRAWTEXT_FIX(H>=L,0,0,0,STRCAT('[所属板块]&[公司地位] ',EXTERNSTR(1,10010))),COLOR6C6C6C
DRAWTEXT_FIX(H>=L,0,0,0,STRCAT('&&[曾用名称] ',IF(STRLEN(EXTERNSTR(1,10018))>4,EXTERNSTR(1,10018),'无'))),COLOR505050