筹码线主图,如果配合吾虎将主图使用效果更好。
动态成本:=DMA(CLOSE,VOL/CAPITAL),COLORLIMAGENTA;谷:=20;最低:=TROUGHBARS(C,谷,1);{调整之字幅度找到低位起点}低价:=REF(C,BARSLAST(最低=0));低价线:=DRAWLINE(最低=0,C,ISLASTBAR,低价,0);现价线:=DRAWLINE(最低=0,C,ISLASTBAR,C,0);低点至今涨幅:(C-低价线)/低价线*100,COLORFF00FF,NODRAW;DRAWBAND(低价线,RGB(255,00,255),低价线,0);DRAWBAND(现价线,RGB(255,00,255),现价线,0);DRAWTEXT(CURRBARSCOUNT=CONST(最低+9),CONST(低价线),STRCAT(CON2STR(低点至今涨幅,2),'%')),COLORFF00FF;CM1:=INTPART(PPART(1)*100);CM2:=INTPART(PPART(2)*100);CM3:=INTPART(PPART(3)*100);CM4:=INTPART(PPART(4)*100);CM5:=INTPART(PPART(5)*100);CM6:=INTPART(PPART(6)*100);CM7:=INTPART(PPART(7)*100);CM8:=INTPART(PPART(8)*100);CM9:=INTPART(PPART(9)*100);CM10:=INTPART(PPART(10)*100);IF(CURRBARSCOUNT<INTPART(CM2/2),CONST(COSTEX(REF(C,1),REF(C,2))),DRAWNULL),COLORWHITE;IF(CURRBARSCOUNT<INTPART(CM3/2),CONST(COSTEX(REF(C,2),REF(C,3))),DRAWNULL),COLORYELLOW;IF(CURRBARSCOUNT<INTPART(CM4/2),CONST(COSTEX(REF(C,3),REF(C,4))),DRAWNULL),COLORLIMAGENTA;IF(CURRBARSCOUNT<INTPART(CM5/2),CONST(COSTEX(REF(C,4),REF(C,5))),DRAWNULL),COLORLIRED;IF(CURRBARSCOUNT<INTPART(CM6/2),CONST(COSTEX(REF(C,5),REF(C,6))),DRAWNULL),COLORLICYAN;IF(CURRBARSCOUNT<INTPART(CM7/2),CONST(COSTEX(REF(C,6),REF(C,7))),DRAWNULL),COLORLIGREEN;IF(CURRBARSCOUNT<INTPART(CM8/2),CONST(COSTEX(REF(C,8),REF(C,9))),DRAWNULL),COLORLIBLUE;IF(CURRBARSCOUNT<INTPART(CM9/2),CONST(COSTEX(REF(C,9),REF(C,10))),DRAWNULL),COLORLIGRAY;IF(CURRBARSCOUNT<INTPART(CM10/2),CONST(COSTEX(REF(C,10),REF(C,11))),DRAWNULL),COLORLIGREEN,LINETHICK6;CM11:=INTPART(PPART(11)*100);CM12:=INTPART(PPART(12)*100);CM13:=INTPART(PPART(13)*100);CM14:=INTPART(PPART(14)*100);CM15:=INTPART(PPART(15)*100);CM16:=INTPART(PPART(16)*100);CM17:=INTPART(PPART(17)*100);CM18:=INTPART(PPART(18)*100);CM19:=INTPART(PPART(19)*100);CM20:=INTPART(PPART(20)*100);IF(CURRBARSCOUNT<INTPART(CM11/2),CONST(COSTEX(REF(C,11),REF(C,12))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM12/2),CONST(COSTEX(REF(C,12),REF(C,13))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM13/2),CONST(COSTEX(REF(C,13),REF(C,14))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM14/2),CONST(COSTEX(REF(C,14),REF(C,15))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM15/2),CONST(COSTEX(REF(C,15),REF(C,16))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM16/2),CONST(COSTEX(REF(C,16),REF(C,17))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM17/2),CONST(COSTEX(REF(C,17),REF(C,18))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM18/2),CONST(COSTEX(REF(C,18),REF(C,19))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM19/2),CONST(COSTEX(REF(C,19),REF(C,20))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM20/2),CONST(COSTEX(REF(C,20),REF(C,21))),DRAWNULL),COLORLICYAN,LINETHICK6;CM21:=INTPART(PPART(21)*100);CM22:=INTPART(PPART(22)*100);CM23:=INTPART(PPART(23)*100);CM24:=INTPART(PPART(24)*100);CM25:=INTPART(PPART(25)*100);CM26:=INTPART(PPART(26)*100);CM27:=INTPART(PPART(27)*100);CM28:=INTPART(PPART(28)*100);CM29:=INTPART(PPART(29)*100);CM30:=INTPART(PPART(30)*100);IF(CURRBARSCOUNT<INTPART(CM21/2),CONST(COSTEX(REF(C,21),REF(C,22))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM22/2),CONST(COSTEX(REF(C,22),REF(C,23))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM23/2),CONST(COSTEX(REF(C,23),REF(C,24))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM24/2),CONST(COSTEX(REF(C,24),REF(C,25))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM25/2),CONST(COSTEX(REF(C,25),REF(C,26))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM26/2),CONST(COSTEX(REF(C,26),REF(C,27))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM27/2),CONST(COSTEX(REF(C,27),REF(C,28))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM28/2),CONST(COSTEX(REF(C,28),REF(C,29))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM29/2),CONST(COSTEX(REF(C,29),REF(C,30))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM30/2),CONST(COSTEX(REF(C,30),REF(C,31))),DRAWNULL),COLORLIRED,LINETHICK6;CM31:=INTPART(PPART(31)*100);CM32:=INTPART(PPART(32)*100);CM33:=INTPART(PPART(33)*100);CM34:=INTPART(PPART(34)*100);CM35:=INTPART(PPART(35)*100);CM36:=INTPART(PPART(36)*100);CM37:=INTPART(PPART(37)*100);CM38:=INTPART(PPART(38)*100);CM39:=INTPART(PPART(39)*100);CM40:=INTPART(PPART(40)*100);IF(CURRBARSCOUNT<INTPART(CM31/2),CONST(COSTEX(REF(C,31),REF(C,32))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM32/2),CONST(COSTEX(REF(C,32),REF(C,33))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM33/2),CONST(COSTEX(REF(C,33),REF(C,34))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM34/2),CONST(COSTEX(REF(C,34),REF(C,35))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM35/2),CONST(COSTEX(REF(C,35),REF(C,36))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM36/2),CONST(COSTEX(REF(C,36),REF(C,37))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM37/2),CONST(COSTEX(REF(C,37),REF(C,38))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM38/2),CONST(COSTEX(REF(C,38),REF(C,39))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM39/2),CONST(COSTEX(REF(C,39),REF(C,40))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM40/2),CONST(COSTEX(REF(C,40),REF(C,41))),DRAWNULL),COLORLIMAGENTA,LINETHICK6;CM41:=INTPART(PPART(41)*100);CM42:=INTPART(PPART(42)*100);CM43:=INTPART(PPART(43)*100);CM44:=INTPART(PPART(44)*100);CM45:=INTPART(PPART(45)*100);CM46:=INTPART(PPART(46)*100);CM47:=INTPART(PPART(47)*100);CM48:=INTPART(PPART(48)*100);CM49:=INTPART(PPART(49)*100);CM50:=INTPART(PPART(50)*100);IF(CURRBARSCOUNT<INTPART(CM41/2),CONST(COSTEX(REF(C,41),REF(C,42))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM42/2),CONST(COSTEX(REF(C,42),REF(C,43))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM43/2),CONST(COSTEX(REF(C,43),REF(C,44))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM44/2),CONST(COSTEX(REF(C,44),REF(C,45))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM45/2),CONST(COSTEX(REF(C,45),REF(C,46))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM46/2),CONST(COSTEX(REF(C,46),REF(C,47))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM47/2),CONST(COSTEX(REF(C,47),REF(C,48))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM48/2),CONST(COSTEX(REF(C,48),REF(C,49))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM49/2),CONST(COSTEX(REF(C,49),REF(C,50))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM50/2),CONST(COSTEX(REF(C,50),REF(C,51))),DRAWNULL),COLORYELLOW,LINETHICK6;CM51:=INTPART(PPART(51)*100);CM52:=INTPART(PPART(52)*100);CM53:=INTPART(PPART(53)*100);CM54:=INTPART(PPART(54)*100);CM55:=INTPART(PPART(55)*100);CM56:=INTPART(PPART(56)*100);CM57:=INTPART(PPART(57)*100);CM58:=INTPART(PPART(58)*100);CM59:=INTPART(PPART(59)*100);CM60:=INTPART(PPART(60)*100);IF(CURRBARSCOUNT<INTPART(CM51/2),CONST(COSTEX(REF(C,51),REF(C,52))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM52/2),CONST(COSTEX(REF(C,52),REF(C,53))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM53/2),CONST(COSTEX(REF(C,53),REF(C,54))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM54/2),CONST(COSTEX(REF(C,54),REF(C,55))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM55/2),CONST(COSTEX(REF(C,55),REF(C,56))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM56/2),CONST(COSTEX(REF(C,56),REF(C,57))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM57/2),CONST(COSTEX(REF(C,57),REF(C,58))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM58/2),CONST(COSTEX(REF(C,58),REF(C,59))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM59/2),CONST(COSTEX(REF(C,59),REF(C,60))),DRAWNULL),COLORBLUE;IF(CURRBARSCOUNT<INTPART(CM60/2),CONST(COSTEX(REF(C,60),REF(C,61))),DRAWNULL),COLORWHITE,LINETHICK8;IF(CURRBARSCOUNT<INTPART(CM1/2),CONST(H),DRAWNULL),COLORRED;红色:IF(CURRBARSCOUNT<INTPART(CM2/2),CONST(COSTEX(REF(C,1),REF(C,2))),DRAWNULL),COLORRED,LINETHICK2;白色:CONST(红色*1.03),COLORWHITE,LINETHICK6;黄色:IF(CURRBARSCOUNT<INTPART(CM4/2),CONST(COSTEX(REF(C,3),REF(C,4))),DRAWNULL),COLORYELLOW,LINETHICK2;橙色:CONST(黄色*1.03),COLOR015BFD,LINETHICK6;成本重心线1:IF(CURRBARSCOUNT<INTPART(CM7/2),CONST(COSTEX(REF(C,5),REF(C,6))),DRAWNULL),COLORGREEN,LINETHICK6;成本重心线2:IF(CURRBARSCOUNT<INTPART(CM8/2),CONST(COSTEX(REF(C,7),REF(C,8))),DRAWNULL),COLORMAGENTA,LINETHICK6;DRAWKLINE(H,O,L,C);DAA:=YEAR AND MONTH AND DAY;AA1:=STRCAT(CON2STR(YEAR,0),'年');AA2:=STRCAT(CON2STR(MONTH,0),'月');AA3:=STRCAT(CON2STR(DAY,0),'日');AA4:=STRCAT('【',IF(WEEKDAY=1,'星期一',IF(WEEKDAY=2,'星期二',IF(WEEKDAY=3,'星期三',IF(WEEKDAY=4,'星期四',IF(WEEKDAY=5,'星期五',IF(WEEKDAY=6,'星期六','星期日')))))));AA:=STRCAT(STRCAT(STRCAT(AA1,AA2),STRCAT(AA3,AA4)),'】');DRAWTEXT_FIX(DAA,0.84,0.01,0,AA),COLORWHITE;Z1:=STRCAT(HYBLOCK,' ');Z2:=STRCAT(Z1,FGBLOCK);Z3:=STRCAT(Z2,DYBLOCK);Z4:=STRCAT(Z3,' ');HSL:=V/CAPITAL*100;DRAWNUMBER(CURRBARSCOUNT=1 AND HSL,C,HSL),COLOR00FFFF;DRAWTEXT_FIX(ISLASTBAR,0.00,0.99,0,STRCAT(Z4,GNBLOCK)),COLORGREEN;DRAWTEXT_FIX(1,0,0.88,0,STRCAT('【自定板块】:',ZDBLOCK)),COLORYELLOW;A111:=FINANCE(42);A211:=DATETODAY(CONST(DATE));A311:=A211-A111;XDATE:=DAYTODATE(A311)+19000000;上市日期:=STRCAT(' 上市日期: ',CON2STR(XDATE,0));DRAWTEXT_FIX(ISLASTBAR,0.5,0,0,上市日期),COLORMAGENTA;{涨停统计}W:=EMA(C,1);涨停:=W/REF(W,1)>=1.095;ZTCS:=COUNT(涨停,BARSSINCE(涨停)+1);SSTS1:=STRCAT('上市',CON2STR(FINANCE(42),0));SSTS2:=STRCAT(SSTS1,'天');NTZZT1:=STRCAT(' 距今',CON2STR(CONST(BARSLAST(涨停)),0));NTZZT2:=STRCAT(NTZZT1,'天有涨停');GZT1:=STRCAT(' 共涨停',CON2STR(ZTCS,0));GZT2:=STRCAT(GZT1,'次');ZTTJ1:=STRCAT(SSTS2,GZT2);ZTTJ2:=STRCAT(ZTTJ1,NTZZT2);ZTTJ:=STRCAT('【涨停统计】',ZTTJ2);DRAWTEXT_FIX(CURRBARSCOUNT=1,0.618,0.99,0,ZTTJ),COLORCYAN;
DRAWKLINE(H,O,L,C);
|