1、获利亏损筹码,筹码类的公式 {天机筹码} 获利筹码:EMA(WINNER(C)*70,5),COLORRED; 亏损筹码:EMA((WINNER(C*1.1)-WINNER(C*0.9))*80,5),COLORF0FF00; STICKLINE(亏损筹码>0,0,亏损筹码,5,0),COLOR66FF00; STICKLINE(亏损筹码>0,0,亏损筹码*0.9,5,0),COLOR66EE00; STICKLINE(亏损筹码>0,0,亏损筹码*0.85,5,0),COLOR66DD00; STICKLINE(亏损筹码>0,0,亏损筹码*0.8,5,0),COLOR66CC00; STICKLINE(亏损筹码>0,0,亏损筹码*0.75,5,0),COLOR66BB00; STICKLINE(亏损筹码>0,0,亏损筹码*0.7,5,0),COLOR66AA00; STICKLINE(亏损筹码>0,0,亏损筹码*0.65,5,0),COLOR669900; STICKLINE(亏损筹码>0,0,亏损筹码*0.6,5,0),COLOR668800; STICKLINE(亏损筹码>0,0,亏损筹码*0.55,5,0),COLOR667700; STICKLINE(亏损筹码>0,0,亏损筹码*0.5,5,0),COLOR666600; STICKLINE(亏损筹码>0,0,亏损筹码*0.45,5,0),COLOR665500; STICKLINE(亏损筹码>0,0,亏损筹码*0.4,5,0),COLOR664400; STICKLINE(亏损筹码>0,0,亏损筹码*0.35,5,0),COLOR663300; STICKLINE(亏损筹码>0,0,亏损筹码*0.3,5,0),COLOR662200; STICKLINE(亏损筹码>0,0,亏损筹码*0.25,5,0),COLOR661100; STICKLINE(亏损筹码>0,0,亏损筹码*0.2,5,0),COLOR660000; 主力控筹:IF(获利筹码>亏损筹码,获利筹码*2,获利筹码),COLORRED; STICKLINE(主力控筹>0,0,主力控筹,5,0),COLORFFFFFF; STICKLINE(主力控筹>0,0,主力控筹*0.9,5,0),COLOREEEEEE; STICKLINE(主力控筹>0,0,主力控筹*0.85,5,0),COLORDDDDDD; STICKLINE(主力控筹>0,0,主力控筹*0.8,5,0),COLORCCCCCC; STICKLINE(主力控筹>0,0,主力控筹*0.75,5,0),COLORBBBBBB; STICKLINE(主力控筹>0,0,主力控筹*0.7,5,0),COLORAAAAAA; STICKLINE(主力控筹>0,0,主力控筹*0.65,5,0),COLOR999999; STICKLINE(主力控筹>0,0,主力控筹*0.6,5,0),COLOR888888; STICKLINE(主力控筹>0,0,主力控筹*0.55,5,0),COLOR777777; STICKLINE(主力控筹>0,0,主力控筹*0.5,5,0),COLOR666666; STICKLINE(主力控筹>0,0,主力控筹*0.45,5,0),COLOR555555; STICKLINE(主力控筹>0,0,主力控筹*0.4,5,0),COLOR444444; STICKLINE(主力控筹>0,0,主力控筹*0.35,5,0),COLOR333333; STICKLINE(主力控筹>0,0,主力控筹*0.3,5,0),COLOR222222; STICKLINE(主力控筹>0,0,主力控筹*0.25,5,0),COLOR111111; STICKLINE(主力控筹>0,0,主力控筹*0.2,5,0),COLOR000000; STICKLINE(获利筹码>0,0,获利筹码,5,0),COLORFFFFFF; STICKLINE(获利筹码>0,0,获利筹码*0.9,5,0),COLOREEEEFF; STICKLINE(获利筹码>0,0,获利筹码*0.85,5,0),COLORDDDDFF; STICKLINE(获利筹码>0,0,获利筹码*0.8,5,0),COLORCCCCFF; STICKLINE(获利筹码>0,0,获利筹码*0.75,5,0),COLORBBBBFF; STICKLINE(获利筹码>0,0,获利筹码*0.7,5,0),COLORAAAAFF; STICKLINE(获利筹码>0,0,获利筹码*0.65,5,0),COLOR9999FF; STICKLINE(获利筹码>0,0,获利筹码*0.6,5,0),COLOR8888FF; STICKLINE(获利筹码>0,0,获利筹码*0.55,5,0),COLOR7777FF; STICKLINE(获利筹码>0,0,获利筹码*0.5,5,0),COLOR6666FF; STICKLINE(获利筹码>0,0,获利筹码*0.45,5,0),COLOR5555FF; STICKLINE(获利筹码>0,0,获利筹码*0.4,5,0),COLOR4444FF; STICKLINE(获利筹码>0,0,获利筹码*0.35,5,0),COLOR3333FF; STICKLINE(获利筹码>0,0,获利筹码*0.3,5,0),COLOR2222FF; STICKLINE(获利筹码>0,0,获利筹码*0.25,5,0),COLOR1111FF; STICKLINE(获利筹码>0,0,获利筹码*0.2,5,0),COLOR0000FF; WWW58188COM:DRAWNULL,COLORRED; AI:=AMOUNT/VOL/100; C0:=REF(C,2)*0.865; C1:=REF(C,13)*0.772; DSY:=100*VOL/CAPITAL; 抄底:IF((C-MIN(C0,C1))/C<0.1 AND SUM(DSY,5)/5<1.8,100, 0),COLOR00FF00; STICKLINE(抄底,0,30,4,0),COLORFFFFFF; 动态底部:EMA(IF(L<= LLV(L,30),SMA(ABS(L-REF(L,1)),30,1)/SMA(MAX(L-REF(L,1),0),30,1),0),3)*10,STICK,COLORYELLOW,LINETHICK2; SAT:=IF((AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100>100,100,(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100); STICKLINE(((CLOSE > 0) AND DAY=2),20,121,40,1),COLORFFFFFF; STICKLINE(((SAT <= 5) AND DAY=2),21,(20 + SAT),35,0),COLORFFFFFF; STICKLINE((((SAT > 5) AND (SAT <= 20)) AND DAY=2),21,(20 + SAT),35,0),COLORCCFF88; STICKLINE((((SAT > 20) AND (SAT <= 40)) AND DAY=2),21,(20 + SAT),35,0),COLORFF00FF; STICKLINE(((SAT > 40) AND DAY=2),21,(20 + SAT),35,0),COLOR0000FF; 主力筹码:EMA(WINNER(CLOSE)*70,10),COLORWHITE; 小股民筹码:EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,10),COLOR00FF00; STICKLINE(主力筹码>小股民筹码, 主力筹码,小股民筹码,5,0),COLOR0AF5EF; STICKLINE(主力筹码<小股民筹码, 主力筹码,小股民筹码,5,0),COLOR00FF00; 2、量能百分图,显示获利百分比和北京时间 {量能百分图 副图源码} STICKLINE(CLOSE=REF(CLOSE,1),0,VOL,3.3,0),COLORWHITE; STICKLINE(CLOSE>REF(CLOSE,1),0,VOL,3.3,0),COLORRED; STICKLINE(CLOSE<REF(CLOSE,1),0,VOL,3.3,0),COLORGREEN; 累计换手:SUM(VOL,0)*100/CAPITAL,NODRAW; 当日换手:IF((SETCODE==0||SETCODE==1),100*VOL,VOL)/(FINANCE(7)/100),NODRAW; 二日换手:SUM(VOL,2)*100/CAPITAL,NODRAW; 三日换手:SUM(VOL,3)*100/CAPITAL,NODRAW; 四日换手:SUM(VOL,4)*100/CAPITAL,NODRAW; 五日换手:SUM(VOL,5)*100/CAPITAL,NODRAW; 十日换手:SUM(VOL,10)*100/CAPITAL,NODRAW; 十五日换手:SUM(VOL,15)*100/CAPITAL,NODRAW; 二十日换手:SUM(VOL,20)*100/CAPITAL,NODRAW; 三十日换手:SUM(VOL,30)*100/CAPITAL,NODRAW; 四十日换手:SUM(VOL,40)*100/CAPITAL,NODRAW; 五十日换手:SUM(VOL,50)*100/CAPITAL,NODRAW; 六十日换手:SUM(VOL,60)*100/CAPITAL,NODRAW; 百日换手:SUM(VOL,100)*100/CAPITAL,NODRAW; 二百日换手:SUM(VOL,200)*100/CAPITAL,NODRAW; 三百日换手:SUM(VOL,300)*100/CAPITAL,NODRAW; 四百日换手:SUM(VOL,400)*100/CAPITAL,NODRAW; 五百日换手:SUM(VOL,500)*100/CAPITAL,NODRAW; {年月日星期} DA:=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(DA,0.848,0.01,0,AA),COLORWHITE; DRAWTEXT_FIX(ISLASTBAR=1,0.08,0,0,STKNAME),COLORWHITE ; DRAWTEXT_FIX(ISLASTBAR=1,0.18,0,0,CODE) COLOR0000FF; ASDF:=STRCAT(STRCAT('当前获利盘比例: ',CON2STR(WINNER(CLOSE)*100,2)),'%'); DRAWTEXT_FIX(ISLASTBAR,0.500,0.001,0,ASDF),COLORWHITE; {画横线,区分空间维度,间隔为10%比例} DRAWRECTREL(000,001,999,005,000); DRAWRECTREL(000,100,999,105,000); DRAWRECTREL(000,200,999,205,000); DRAWRECTREL(000,300,999,305,000); DRAWRECTREL(000,400,999,405,000); DRAWRECTREL(000,500,999,505,000); DRAWRECTREL(000,600,999,605,000); DRAWRECTREL(000,700,999,705,000); DRAWRECTREL(000,800,999,805,000); DRAWRECTREL(000,900,999,905,000); DRAWRECTREL(000,995,999,999,000); {右侧解说性文字} DRAWTEXT_FIX(1,0.999,0.999,1,'最后边'),COLORYELLOW; DRAWTEXT_FIX(1,0.999,0.900,1,'10%'),COLORYELLOW; DRAWTEXT_FIX(1,0.999,0.800,1,'20%'),COLORYELLOW; DRAWTEXT_FIX(1,0.999,0.700,1,'30%'),COLORYELLOW; DRAWTEXT_FIX(1,0.999,0.600,1,'40%'),COLORYELLOW; DRAWTEXT_FIX(1,0.999,0.500,1,'50%'),COLORYELLOW; DRAWTEXT_FIX(1,0.999,0.400,1,'60%'),COLORYELLOW; DRAWTEXT_FIX(1,0.999,0.300,1,'70%'),COLORYELLOW; DRAWTEXT_FIX(1,0.999,0.200,1,'80%'),COLORYELLOW; DRAWTEXT_FIX(1,0.999,0.100,1,'90%'),COLORYELLOW; DRAWTEXT_FIX(1,0.999,0.001,1,'最前边'),COLORYELLOW; {左侧解说性文字} DRAWTEXT_FIX(1,0.03,0.999,1,'最后边'),COLORYELLOW; DRAWTEXT_FIX(1,0.03,0.900,1,'10%'),COLORYELLOW; DRAWTEXT_FIX(1,0.03,0.800,1,'20%'),COLORYELLOW; DRAWTEXT_FIX(1,0.03,0.700,1,'30%'),COLORYELLOW; DRAWTEXT_FIX(1,0.03,0.600,1,'40%'),COLORYELLOW; DRAWTEXT_FIX(1,0.03,0.500,1,'50%'),COLORYELLOW; DRAWTEXT_FIX(1,0.03,0.400,1,'60%'),COLORYELLOW; DRAWTEXT_FIX(1,0.03,0.300,1,'70%'),COLORYELLOW; DRAWTEXT_FIX(1,0.03,0.200,1,'80%'),COLORYELLOW; DRAWTEXT_FIX(1,0.03,0.100,1,'90%'),COLORYELLOW; DRAWTEXT_FIX(1,0.03,0.001,1,'最前边'),COLORYELLOW; 3、多空转换副图,量能类公式 {DRAWRECTREL(999,999,0,0,RGB(128,128,0));} {DRAWRECTREL(999,999,0,0,RGB(210,105,30));} DRAWTEXT_FIX(ISLASTBAR=1,0.0100,0,0,STKNAME),COLORWHITE ; DRAWTEXT_FIX(ISLASTBAR=1,0.0880,0,0,CODE) COLOR0000FF; 涨跌量:DVOL/100,NODRAW; STICKLINE(DOPEN<DCLOSE,0,涨跌量,4,0),COLOR8833CC; STICKLINE(DOPEN>DCLOSE,0,涨跌量,4,0),COLOR668833; 实际量:-V,VOLSTICK; 年换手:SUM(VOL,YEAR)*100/CAPITAL,NODRAW; 月换手:SUM(VOL,MONTH)*100/CAPITAL,NODRAW; 周换手:SUM(VOL,WEEKDAY)*100/CAPITAL,NODRAW; {涨跌量:DVOL/100,NODRAW;} {STICKLINE(DOPEN<DCLOSE,0,涨跌量,4,0),COLOR663366;} {STICKLINE(DOPEN>DCLOSE,0,涨跌量,4,0),COLOR667733;} 正能量:VOL,VOLSTICK,COLORRED; 负能量:-VOL,VOLSTICK,COLORCYAN; 当日换手:IF((SETCODE==0||SETCODE==1),100*VOL,VOL)/(FINANCE(7)/100),NODRAW; 多头换手:SUM(ACTINVOL,1)*100/CAPITAL,NODRAW,COLORMAGENTA; 空头换手:SUM(ACTOUTVOL,1)*100/CAPITAL,NODRAW,COLORGREEN; 五十日换手:SUM(VOL,50)*100/CAPITAL,NODRAW; 百日换手:SUM(VOL,100)*100/CAPITAL,NODRAW; {年月日星期} DA:=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(DA,0.88,0.01,0,AA),COLORBROWN; DRAWTEXT_FIX(ISLASTBAR=1,0.0100,0,0,STKNAME), COLOR0000FF; DRAWTEXT_FIX(ISLASTBAR=1,0.0880,0,0,CODE),COLORMAGENTA; ASDF:=STRCAT(STRCAT('当前获利盘比例: ',CON2STR(WINNER(CLOSE)*100,2)),'%'); DRAWTEXT_FIX(ISLASTBAR,0.3300,0.010,0,ASDF),COLORBROWN; {ASDF1:=STRCAT(STRCAT('昨日获利盘比例: ',CON2STR(WINNER(REF(CLOSE,1))*100,2)),'%');} {DRAWTEXT_FIX(ISLASTBAR,0.700,0.010,0,ASDF1),COLORYELLOW;} LC:=REF(CLOSE,1); WRSI:=SMA(MAX(CLOSE-LC,0),5,1)/SMA(ABS(CLOSE-LC),5,1)*100; WR10:=(HHV(HIGH,3)-CLOSE)/(HHV(HIGH,3)-LLV(LOW,3))*100; 活跃:=(WRSI-WR10); 活跃度比:=IF(活跃>=0,(活跃+100)/2,100-ABS((活跃-100)/2)); DRAWTEXT_FIX(1,0.77700,0.01,1,STRCAT(STRCAT('活跃度比: ',CON2STR(活跃度比,2)),'%')),COLORMAGENTA; 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; SSTS1:=STRCAT('上市',CON2STR(FINANCE(42),0)); SSTS2:=STRCAT(SSTS1,'天'); {DRAWTEXT_FIX(CURRBARSCOUNT=1,0.618,0.0,0,SSTS2),COLORCYAN;} SSTS3:=STRCAT('累计交易:',CON2STR(TOTALBARSCOUNT,0)); SSTS4:=STRCAT(SSTS3,'周期'); DRAWTEXT_FIX(CURRBARSCOUNT=1,0.168,0.001,0,SSTS4),COLORLIMAGENTA; {涨停统计} W11:=EMA(C,1); 涨停:=W11/REF(W11,1)>=1.095; ZTCS:=COUNT(涨停,BARSSINCE(涨停)+1); 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),COLORRED; Z1:=STRCAT(HYBLOCK,' '); Z2:=STRCAT(Z1,FGBLOCK); Z3:=STRCAT(Z2,DYBLOCK); Z4:=STRCAT(Z3,' '); HSL11:=V/CAPITAL*100; DRAWNUMBER(CURRBARSCOUNT=1 AND HSL11,L,HSL11),COLORMAGENTA; DRAWTEXT_FIX(ISLASTBAR,0.00,0.991,0,STRCAT(Z4,GNBLOCK)),COLORRED; DRAWTEXT_FIX(1,0.500,0.991,0,STRCAT('【自定板块】:',ZDBLOCK)),COLORBROWN; WWW58188COM:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN)); SAT:=(DVOL/DCLOSE)/(HHV(DVOL,20)/HHV(DCLOSE,20)); 当期量能饱和:=(IF(SAT>1,1,SAT)*100); DRAWTEXT_FIX(1,0.991,0.991,1,STRCAT(STRCAT('当期量能饱和: ',CON2STR(当期量能饱和,2)),'%')),COLORBROWN; T:=DYNAINFO(8)>0; VO:VOL=LLV(VOL,100) AND T; 地量柱:T AND VO; DRAWTEXT(地量柱,VOL+3000,'地'); BLZ:=VOL>REF(V,1)*1.9; BLZ1:=VOL<REF(LLV(VOL,13),1); BLZ2:=VOL<REF(LLV(VOL,55),1); 倍量柱:BLZ; DRAWTEXT(倍量柱,VOL+3000,'倍'); FLZ:=V>REF(V,1)*0.98 AND V<REF(V,1)*1.02,LINETHICK1; DRAWTEXT(FLZ,VOL+3000,'平'); |