几种换手率的通达信副图指标源码
强庄换手率
换手:VOL/(FINANCE(7)/100)*100,NODRAW;
十日换手:SUM(换手,10),NODRAW;
STICKLINE(C,0,换手,2,0),COLOR408080;
累计:SUM(换手,10),LINESTICK;
STICKLINE(换手>5,5,换手,2,0),COLORRED;
STICKLINE(换手>17,17,换手,2,0),COLORGREEN;
换手率过5反红:0,NODRAW,COLOR00FFFF;
低位绿庄家进货:0,NODRAW,COLOR0000FF;
高位绿庄家出货:0,NODRAW,COLOR00FF80;
成交额换手率
N1:=5;
N2:=13;
N3:=25;
AT:IF(CAPITAL=0,AMOUNT/100000000,VOL/CAPITAL*100),VOLSTICK;
{指数为成交金额,个股为换手率}
ATM1:EMA(AT,N1);
ATM2:MA(AT,N2);
T%D:SUMBARS(VOL,CAPITAL),NODRAW;
{换手率达到100%的交易日天数};
阶段天量:=AT>REF(HHV(AT,N3),1) && ATM1>ATM2;
阶段地量:=AT<REF(LLV(AT,N3),1) && ATM1<ATM2;
STICKLINE(阶段天量,0,AT*0.75,2.38,0),COLOR000099;
STICKLINE(阶段天量,0,AT*0.75,0.35,0),COLORCC66FF;
STICKLINE(阶段地量,0,AT*0.75,2.38,0),COLOR009900;
STICKLINE(阶段地量,0,AT*0.75,0.35,0),COLOR00FF00;
换手率战法
正能量:VOL,VOLSTICK,COLORRED;
负能量:-VOL,VOLSTICK,COLORCYAN;
年换手:SUM(VOL,YEAR)*100/CAPITAL,NODRAW;
月换手:SUM(VOL,MONTH)*100/CAPITAL,NODRAW;
周换手:SUM(VOL,WEEKDAY)*100/CAPITAL,NODRAW;
日换手:IF((SETCODE==0||SETCODE==1),100*VOL,VOL)/(FINANCE(7)/100),NODRAW;
多头换手:SUM(ACTINVOL,1)*100/CAPITAL,NODRAW,COLORYELLOW;
空头换手: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.991,0,AA),COLORWHITE;
SAT:=(DVOL/DCLOSE)/(HHV(DVOL,20)/HHV(DCLOSE,20));
当期量能饱和:=(IF(SAT>1,1,SAT)*100);
DRAWTEXT_FIX(1,0.991,0.001,1,STRCAT(STRCAT('当期量能饱和: ',CON2STR(当期量能饱和,2)),'%')),COLORRED;
DRAWTEXT_FIX(ISLASTBAR=1,0.0100,0,0,STKNAME), COLOR0000FF;
DRAWTEXT_FIX(ISLASTBAR=1,0.0880,0,0,CODE),COLORWHITE;
ASDF:=STRCAT(STRCAT('当前获利盘比例: ',CON2STR(WINNER(CLOSE)*100,2)),'%');
DRAWTEXT_FIX(ISLASTBAR,0.300,0.010,0,ASDF),COLORWHITE;
{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);{WWW.GPXIAZAI.COM}
活跃度比:=IF(活跃>=0,(活跃+100)/2,100-ABS((活跃-100)/2));
DRAWTEXT_FIX(1,0.707,0.01,1,STRCAT(STRCAT('活跃度比: ',CON2STR(活跃度比,2)),'%')),COLORCYAN;
毛利比率:=(HHV(H,0)-LLV(L,0))/LLV(L,0)*100*0.44,NODRAW,COLORYELLOW;
DRAWTEXT_FIX(1,0.82800,0.01,1,STRCAT(STRCAT('毛利比率: ',CON2STR(毛利比率,2)),'%')),COLORYELLOW;
A111:=FINANCE(42);
A211:=DATETODAY(CONST(DATE));
A311:=A211-A111;
XDATE:=DAYTODATE(A311)+19000000;
上市日期:=STRCAT(' 上市日期: ',CON2STR(XDATE,0));
DRAWTEXT_FIX(ISLASTBAR,0.45,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),COLORCYAN;
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),COLOR00FFFF;
DRAWTEXT_FIX(ISLASTBAR,0.00,0.991,0,STRCAT(Z4,GNBLOCK)),COLORGREEN;
DRAWTEXT_FIX(1,0.500,0.991,0,STRCAT('【自定板块】:',ZDBLOCK)),COLORYELLOW;
每日换手率
短期:=100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5));
中期:=100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10));
中长期:=100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20));
长期:=100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30));
权:=长期*0.9+中长期*0.05+中期*0.03+短期*0.02;
CJBS:=VOL/CAPITAL/100;
量比:VOL/MA(REF(VOL,1),5),LINETHICK0;
每日换手率:VOL/CAPITAL*100,LINETHICK0;
AA:=AMOUNT/CJBS;
NOTEXT均换手率:AA/CAPITAL*100,LINETHICK0;
NOTEXT每笔均额:IF(AA=0,REF(AA,1),AA),LINETHICK0;
MM:=NOTEXT每笔均额*权;
NOTEXTMA8:MA(MM,8),COLORWHITE;
NOTEXTMA18:MA(MM,18),DOTLINE,COLORYELLOW;
DRAWTEXT_FIX(1,0.02,0,0,'深鱼'),COLORRED;
STICKLINE(C>REF(C,1),MM,0,5,1),COLOR5454FF,LINETHICK1;
STICKLINE(C<=REF(C,1),MM,0,5,1),COLORFFFF00,LINETHICK1;
P0:MM>REF(MM,1) AND REF(MM,1)>REF(MM,2) AND MM>NOTEXTMA18;
P1:C>REF(C,1) AND REF(C,1)>REF(C,2);
P2:C>O AND REF(C,1)>REF(O,1);
N:=14;
WR1:=100*(HHV(HIGH,N)-CLOSE)/(HHV(HIGH,N)-LLV(LOW,N));
STICKLINE(P0 AND P2 AND WR1<50,MM,0,5,0),COLORYELLOW,LINETHICK1;
柱状换手率
成交:=VOL,COLORFFFF00,LINETHICK0;
BB:=CAPITAL;
换手:成交*100/BB,LINETHICK0;
今日换手:换手,LINETHICK0;
HS:SUM(VOL,0)/CAPITAL,LINETHICK0;
换手次数:FLOOR(HS),LINETHICK0;
BBB:=IF(换手次数>0,换手次数,0);
BBB2:=IF(BBB-REF(BBB,1)>0,BBB,0);
距上次完全换手:=BARSLAST(BBB2),LINETHICK0,COLORGREEN;
平均换手天:=FLOOR((BARSCOUNT(CLOSE)-距上次完全换手)/换手次数),COLORCYAN,LINETHICK0;
A2:=成交/CAPITAL*100;
A3:=A2>3 AND A2<=5;
A4:=A2>5 AND A2<=7;
A5:=A2>7 AND A2<=10;
A6:=A2>10;
{STICKLINE(A2<3ANDC>O,0,A2,6,0),COLOR555500;
STICKLINE(A2<3ANDC>O,0,A2,5,0),COLOR777700;
STICKLINE(A2<3ANDC>O,0,A2,4,0),COLOR999900;
STICKLINE(A2<3ANDC>O,0,A2,3,0),COLORBBBB00;
STICKLINE(A2<3ANDC>O,0,A2,2,0),COLORDDDD00;
STICKLINE(A2<3ANDC>O,0,A2,1,0),COLORFFFF00;}
STICKLINE(A2<3 AND C>O,0,A2,3,0),COLORFFFF00;
{STICKLINE(A2<3ANDC<O,0,A2,6,0),COLOR005500;
STICKLINE(A2<3ANDC<O,0,A2,5,0),COLOR007700;
STICKLINE(A2<3ANDC<O,0,A2,4,0),COLOR009900;
STICKLINE(A2<3ANDC<O,0,A2,3,0),COLOR00BB00;
STICKLINE(A2<3ANDC<O,0,A2,2,0),COLOR00DD00;
STICKLINE(A2<3ANDC<O,0,A2,1,0),COLOR00FF00;}
STICKLINE(A2<3 AND C<O,0,A2,3,0),COLOR00FF00;
{STICKLINE(A3,0,A2,6,0),COLOR553300;
STICKLINE(A3,0,A2,5,0),COLOR774400;
STICKLINE(A3,0,A2,4,0),COLOR995500;
STICKLINE(A3,0,A2,3,0),COLORBB6600;
STICKLINE(A3,0,A2,2,0),COLORDD7700;
换手积极:STICKLINE(A3,0,A2,1,0),COLORFF8800;}
换手积极:STICKLINE(A3,0,A2,3,0),COLORFF8800;
{STICKLINE(A4,0,A2,6,0),COLOR555555;
STICKLINE(A4,0,A2,5,0),COLOR777777;
STICKLINE(A4,0,A2,4,0),COLOR999999;
STICKLINE(A4,0,A2,3,0),COLORBBBBBB;
STICKLINE(A4,0,A2,2,0),COLORDDDDDD;
换手活跃:STICKLINE(A4,0,A2,1,0),COLORYELLOW;}
换手活跃:STICKLINE(A4,0,A2,3,0),COLORYELLOW;
{STICKLINE(A5,0,A2,6,0),COLOR550000;
STICKLINE(A5,0,A2,5,0),COLOR770000;
STICKLINE(A5,0,A2,4,0),COLOR990000;
STICKLINE(A5,0,A2,3,0),COLORBB0000;
STICKLINE(A5,0,A2,2,0),COLORDD0000;
换手频繁:STICKLINE(A5,0,A2,1,0),COLORGREEN;}
换手频繁:STICKLINE(A5,0,A2,3,0),COLORGREEN;
{STICKLINE(A6,0,A2,6,0),COLOR000055;
STICKLINE(A6,0,A2,5,0),COLOR000077;
STICKLINE(A6,0,A2,4,0),COLOR000099;
STICKLINE(A6,0,A2,3,0),COLOR0000BB;
STICKLINE(A6,0,A2,2,0),COLOR0000DD;
巨幅换手:STICKLINE(A6,0,A2,1,0),COLOR0000FF;}
巨幅换手:STICKLINE(A6,0,A2,3,0),COLOR0000FF;
AA:=A2>1 AND A2<=3;
{STICKLINE(AA,0,A2,6,0),COLOR553300;
STICKLINE(AA,0,A2,5,0),COLOR773300;
STICKLINE(AA,0,A2,4,0),COLOR993300;
STICKLINE(AA,0,A2,3,0),COLORBB6600;
STICKLINE(AA,0,A2,2,0),COLORDD7700;}
STICKLINE(AA,0,A2,3,0),COLORDD7700;
BBB3:=CON2STR(REF(BBB,距上次完全换手),0);
DRAWTEXT(BBB2,A2,'次换手'),COLORFFFFFF;
DRAWTEXT(换手>REF(换手,1)*2,换手*0.8,'黑马'),COLORWHITE;
MA5:MA(换手,5),COLORRED,LINETHICK2;
MA10:MA(换手,10),COLORYELLOW,LINETHICK2;