//叠加 月 半月 周量及分时叠加日量
input:月(0,0,1),半月(0,0,1),周(0,0,1),日(0,0,1);
TBS:=POW(10,ABS(LOG(MINDIFF)));
BY:=MONTH;YB:=BY-REF(BY,1)<>0 OR BARPOS=1;
w:=BARSLAST(YB),LINETHICK;
dg:=w=0 or ISLASTBAR;
wx:=0*C;
for P=datacount-1 downto lbound(dg) do
if dg[P] then
wx[P]:=0;
else
wx[P]:=wx[P+1]+1;
r:=BACKSET(ISLASTBAR,w+1)-ISLASTBAR;
wx:=refx(wx,1)+r,LINETHICK;
oo:=ref(o,w);
zq1:=BARSLAST(ref(wx,1)=0 or BARPOS=1)+1;//月天数
yt1:=if(zq1=1 and refx(zq1,2)=1,13,if(refx(zq1,1)=1 or zq1=1,7,14));
YEK:=ROUND(OO*TBS)/TBS;
YES:=ROUND(refx(c,wx)*TBS)/TBS;
f:=YES>YEK or (YES=YEK and YES>ref(YES,W));
j:=cross(w,wx);
AS:=月;
月量:=SUM(V,zq1),ColorFFff00,LINETHICK0;
月换手率:=SUM(vol/CAPITAL*100,ZQ1),linethick0,PRECISion2,colorffff00;
STICKLINE(YEK<YES AND AS,0,月量*0.25,YT1,0),COLOReeaaEE;
STICKLINE(YEK>YES AND AS,0,月量*0.25,YT1,0),Color6AA932;
R:=DAY;
RBY:=IF(R<=15,R,R-15);
TY:=RBY;TB:=DATEDIFF(REF(DATE,1),DATE)<>TY-REF(TY,1) OR BARPOS=1;
TW:=BARSLAST(TB),LINETHICK;
Tdg:=TW=0 or ISLASTBAR;
Twx:=0*c;
for P=datacount-1 downto lbound(Tdg) do
if Tdg[P] then
Twx[P]:=0;
else
Twx[P]:=Twx[P+1]+1;
TTr:=BACKSET(ISLASTBAR,Tw+1)-ISLASTBAR;
Twx:=refx(Twx,1)+TTr,LINETHICK;
TQ:=BARSLAST(ref(Twx,1)=0 or BARPOS=1)+1;//N天数
TTo:=ref(o,Tw);
YYK:=ROUND(TTO*TBS)/TBS;
YYS:=ROUND(refx(c,Twx)*TBS)/TBS;
YT:=if(TQ=1 and refx(TQ,2)=1,13,if(refx(TQ,1)=1 or TQ=1,7,14));
YYL:=SUM(V,TQ),ColorFFff00,LINETHICK0;
ss:=半月;
STICKLINE(YYK<=YYS and ss,0,YYL*0.30,YT,0),Color613076;//Color5261EB Color613076
STICKLINE(YYK>=YYS and ss,0,YYL*0.30,YT,0),ColorFA7D32;
BZ:=WEEKDAY;ZB:=DATEDIFF(REF(DATE,1),DATE)<>BZ-REF(BZ,1) OR BARPOS=1;
ZW:=BARSLAST(ZB),LINETHICK;
Zdg:=ZW=0 or ISLASTBAR;
Zwx:=0*c;
for P=datacount-1 downto lbound(Zdg) do
if Zdg[P] then
Zwx[P]:=0;
else
Zwx[P]:=Zwx[P+1]+1;
Zr:=BACKSET(ISLASTBAR,Zw+1)-ISLASTBAR;
Zwx:=refx(Zwx,1)+Zr,LINETHICK;
zq:=BARSLAST(ref(Zwx,1)=0 or BARPOS=1)+1; //星期天数
Zo:=ref(o,Zw);
ZZK:=ROUND(ZO*TBS)/TBS;
ZZS:=ROUND(refx(c,Zwx)*TBS)/TBS;
ZT:=if(zq=1 and refx(zq,2)=1,13,if(refx(zq,1)=1 or zq=1,7,14));
周量:=SUM(V,zq),ColorFFff00,LINETHICK0;
周换手率:=SUM(vol/CAPITAL*100,ZQ),ColorFFff00,LINETHICK0;
ss:=周;
STICKLINE(ZZK<ZZS and ss,0,周量*0.45,ZT,0),Color3547E8,LINEDOT;//Color3547E8//ColorB468FF
STICKLINE(ZZK>ZZS and ss,0,周量*0.45,ZT,0),ColorFDDD32,LINEDOT;
RRL:=DAY;
RRL:=RRL-REF(RRL,1)<>0 OR BARPOS=1;
Rw:=BARSLAST(RRL),LINETHICK;
Rdg:=Rw=0 or ISLASTBAR;
Rwx:=0*C;
for P=datacount-1 downto lbound(Rdg) do
if Rdg[P] then
Rwx[P]:=0;
else
Rwx[P]:=Rwx[P+1]+1;
Rr:=BACKSET(ISLASTBAR,Rw+1)-ISLASTBAR;
Rwx:=refx(Rwx,1)+Rr,LINETHICK;
Roo:=ref(o,Rw);
Rzq1:=BARSLAST(ref(Rwx,1)=0 or BARPOS=1)+1;//N天数
Ryt1:=if(Rzq1=1 and refx(Rzq1,2)=1,13,if(refx(Rzq1,1)=1 or Rzq1=1,7,14));
RRK:=ROUND(ROO*TBS)/TBS;
RRS:=ROUND(refx(c,Rwx)*TBS)/TBS;
AR:=日;
日量:SUM(V,Rzq1),ColorFFff00,LINETHICK0;
STICKLINE(RRK<=RRS AND AR,0,日量*0.5,RYT1,0),ColorD24A92,LINEDOT;//ColorD24A92 COLOReeaaEE
STICKLINE(RRK>=RRS AND AR,0,日量*0.5,RYT1,0),Color6AA932,LINEDOT;
//日量:V,ColorFFff00,LINETHICK0;
换手率:vol/CAPITAL*100,ColorFFff00,LINETHICK0;
半月量:=SUM(V,TQ),ColorFFff00,LINETHICK0;
半月换手率:=SUM(vol/CAPITAL*100,TQ),ColorFFff00,LINETHICK0;
TT2:=ISLASTBAR=1;
DRAWTEXTEX(TT2,0,371,1,’【创于2010.06.14 草根】’+”),ColorFFFFFF;
DRAWTEXTEX(TT2,0,4,1,’【一周期: ‘+NUMTOSTR(ZQ[SYSPARAM(1)],0)+”+’天 】’+”),Color00FFFF;
DRAWTEXTEX(TT2,0,125,1,’【周量: ‘+NUMTOSTR(周量[SYSPARAM(1)],0)+”+’】’+’ 周换手率【’+NUMTOSTR(周换手率[SYSPARAM(1)],2)+’%】’),Color00FFFF;
DRAWTEXTEX(TT2,0,4,16,’【半月周期: ‘+NUMTOSTR(TQ[SYSPARAM(1)],0)+”+’天 】’+”),Color00FFFF;
DRAWTEXTEX(TT2,0,125,16,’【半月量: ‘+NUMTOSTR(半月量[SYSPARAM(1)],0)+”+’】’+”+’ 半月换手率【’+NUMTOSTR(半月换手率[SYSPARAM(1)],2)+’%】’),Color00FFFF;
DRAWTEXTEX(TT2,0,4,31,’【月周期: ‘+NUMTOSTR(zQ1[SYSPARAM(1)],0)+”+’天 】’+”),Color00FFFF;
DRAWTEXTEX(TT2,0,125,31,’【月量: ‘+NUMTOSTR(月量[SYSPARAM(1)],0)+”+’】’+”+’ 月换手率【’+NUMTOSTR(月换手率[SYSPARAM(1)],2)+’%】’),Color00FFFF;
input:n(5,0,100),na(13,0,100),nb(135,0,500);
量:=VOL,VOLSTICK;
HSL:=VOL/CAPITAL*100;
地量0_1:STICKLINE(HSL<1,0,量,0.1,0 ),coloreeeeee;
STICKLINE(HSL<1,0,量,5,0 ),colordddddd;
STICKLINE(HSL<1,0,量,3,0 ),coloreeeeee;
STICKLINE(HSL<1,0,量,1,0 ),colorffffff;
低靡1_2:STICKLINE(HSL>=1 and HSL<2,0,量,0.1,0 ),coloreeee00;
STICKLINE(HSL>=1 and HSL<2,0,量,5,0 ),coloraaaa00;
STICKLINE(HSL>=1 and HSL<2,0,量,3,0 ),colorcccc00;
STICKLINE(HSL>=1 and HSL<2,0,量,1,0 ),coloreeee00;
温和2_3:STICKLINE(HSL>=2 and HSL<3,0,量,0.1,0 ),Color0080BB;
STICKLINE(HSL>=2 and HSL<3,0,量,5,0 ),Color0040dd;
STICKLINE(HSL>=2 and HSL<3,0,量,3,0 ),Color0060ee;
STICKLINE(HSL>=2 and HSL<3,0,量,1,0 ),Color0080BB;
活跃3_5:STICKLINE(HSL>=3 and HSL<5,0,量,0.1,0 ),color00eeee;
STICKLINE(HSL>=3 and HSL<5,0,量,5,0 ),color00aaaa;
STICKLINE(HSL>=3 and HSL<5,0,量,3,0 ),color00cccc;
STICKLINE(HSL>=3 and HSL<5,0,量,1,0 ),color00eeee;
带量5_8:STICKLINE(HSL>=5 and HSL<8,0,量,0.1,0 ),coloree00ee;
STICKLINE(HSL>=5 and HSL<8,0,量,5,0 ),coloraa00aa;
STICKLINE(HSL>=5 and HSL<8,0,量,3,0 ),colorcc00cc;
STICKLINE(HSL>=5 and HSL<8,0,量,1,0 ),coloree00ee;
放量8_15:STICKLINE(HSL>=8 and HSL<15,0,量,0.1,0 ),Color0000FF;
STICKLINE(HSL>=8 and HSL<15,0,量,5,0 ),Color0000aa;
sTICKLINE(HSL>=8 and HSL<15,0,量,3,0 ),Color0000cc;
sTICKLINE(HSL>=8 and HSL<15,0,量,1,0 ),Color0000FF;
巨量15_25:STICKLINE(HSL>=15 and HSL<25,0,量,0.01,0 ),coloree0000;
STICKLINE(HSL>=15 and HSL<25,0,量,5,0 ),coloraa0000;
STICKLINE(HSL>=15 and HSL<25,0,量,3,0 ),colorcc0000;
STICKLINE(HSL>=15 and HSL<25,0,量,1,0 ),coloree0000;
怪异25_F:STICKLINE(HSL>=25,0,量,0.1,0),color00ff00;
STICKLINE(HSL>=25,0,量,5,0),color00aa00;
STICKLINE(HSL>=25,0,量,3,0),color00cc00;
STICKLINE(HSL>=25,0,量,1,0),color00ee00;
MA3:MA(量,n),COLORFFffff,linethick1;
MAd:MA(量,na),COLOR00ffff,linethick1;
MA90:MA(量,nb),color00ff00;
DRAWTEXT(ISLASTBAR=1 AND MAd>REF(MAd,1),MAd,’ ‘+NUMTOSTR(na,0)+’↑’),COLOR00ffff,align0;
DRAWTEXT(ISLASTBAR=1 AND MAd<REF(MAd,1),MAd,’ ‘+NUMTOSTR(na,0)+’↑’),Color00ffff,align0;
DRAWTEXT(BARSTATUS=2 AND MA3>REF(MA3,1),MA3,’ ‘+NUMTOSTR(n,0)+’↑’),COLORFFffff,align1;
DRAWTEXT(BARSTATUS=2 AND MA3<REF(MA3,1),MA3,’ ‘+NUMTOSTR(n,0)+’↓’),ColorFFffff,align1;
DRAWTEXT(w>0 and j and as,0,’月’),Color0435FB,ALIGN1,PXUP127;
DRAWNUMBER(w>0 and j and as,0,BY,0),Color0435FB,ALIGN2,PXUP127;
EXPLAIN(CLOSE,’ 〓【换手率解盘】〓’),colorFF;
EXPLAIN(CLOSE,’【创于2010.06.14 草根】’+”),ColorFFFFFF;
EXPLAINEX(1,’换手率=’,((VOL / CAPITAL) * 100),2,1);
EXPLAINEX(1,’【获利盘】比例=’,(WINNER(CLOSE) * 100),2,0),color0033FF;
EXPLAINEX((1 = 1),’【套牢盘】比例=’,(100 – (WINNER(CLOSE) * 100)),2,1),colorFF00;
Explain(1=1,’【换手率级别】:’),color00ffff;
Explain(换手率<1,’【绝对地量:小于1%】 ‘),colorffffff;
Explain(换手率>1 and 换手率<2,’日换手率在1%–2%,股价属于成交低靡,属于冷门股。日换手率成交小于3%的成交额称为"成交无量’),colorffff00;
Explain(换手率>=2 and 换手率<3,’日换手率在2%–3%,股价属于成交温和,属于备份股。’),Color0080FF;
Explain(换手率>=3 and 换手率<5,’日换手率在3%–5%,股价属于成交活跃,表示有庄家在积极活动,属于热门股。把10日平均换手率大于3%或大于5%,而后又缩量至换手率小于3%高度控盘的个股作为选股条件。’),color00dddd;
Explain(换手率>=5 and 换手率<8,’日换手率在5%–8%, 大于7%,常常超过10%,属于股价成交带量,表明筹码在急剧换手。发生在低位或是通过第一阻力区,很可能是强庄积极进货。’),colorddaadd;
Explain(换手率>=8 and 换手率<15,’日换手率大于8%–15%,股价属于成交放量。’),color0022ff;
Explain(换手率>=15 and 换手率<25,’日换手率大于15%–25%,股价属于成交巨量,发生在高位或高位缩量横盘之后,很可能是庄家出货’),Coloree8800;
Explain(换手率>25,’日换手率大于25% 股价属于成交怪异;周换手率大于25% 属于成交活跃。’),color00ff00;
EXPLAINEX(1,’五日换手:’,SUM(换手率,5),2,0),colorffaadd;
EXPLAINEX(1,’十日换手:’,SUM(换手率,10),2,1),colorffaadd;
日J:="KDJ.J#day"(9,3,3),colorFFFFFF,LINEDOT;
日K:="KDJ.K#day"(9,3,3),color00FFFF,LINEDOT;
日D:="KDJ.D#day"(9,3,3),colorFF00FF,LINEDOT;
周K:="KDJ.K#week"(9,3,3),color00FFFF;
周D:="KDJ.D#week"(9,3,3),colorFF00FF;
周J:="KDJ.J#week"(9,3,3),colorFFFFFF;
月K:="KDJ.K#MONTH"(9,3,3),color00FFFF,linethick0;
月D:="KDJ.D#MONTH"(9,3,3),colorFF00FF,linethick0;
月J:="KDJ.J#MONTH"(9,3,3),colorFFFFFF,linethick0;
EXPLAINEX((日J > 0),’日J=’,日J,2,0),{colorFF0000}COLOR00FF00;
EXPLAINEX((日K > 0),’日K=’,日K,2,0),{colorFF0000}COLORCYAN;
EXPLAINEX((日D > 0),’日D=’,日D,2,0),colorFFFF00;
EXPLAIN((日K <= 20),’日线KD指标位置:低位’),COLORCYAN;
EXPLAIN(((日K > 20) AND (日K < 50)),’日线KD指标位置:中低’),colorFF;
EXPLAIN(((日K > 50) AND (日K < 80)),’日线KD指标位置:中高’),colorFF00;
EXPLAIN((日K >= 80),’日线KD指标位置:高位’),colorFF00;
EXPLAINEX((周K > 0),’周K=’,周K,2,0),colorFF;
EXPLAINEX((周D > 0),’周D=’,周D,2,0),color208FFF;
EXPLAIN((周K <= 20),’周线KD指标位置:低位’),colorFF;
EXPLAIN(((周K > 20) AND (周K < 50)),’周线KD指标位置:中低’),colorFF;
EXPLAIN(((周K > 50) AND (周K < 80)),’周线KD指标位置:中高’),colorFF00;
EXPLAIN((周K >= 80),’周线KD指标位置:高位’),;
EXPLAIN(CROSS(日K,日D),’日K与日D今日金叉’),COLORCYAN;
EXPLAIN(CROSS(日D,日K),’日K与日D今日死叉’),colorFF00;
EXPLAIN(CROSS(周K,周D),’周K与周D今日金叉’),colorFF;
EXPLAIN(CROSS(周D,周K),’周K与周D今日死叉’),colorFF00;
{添加到参数精灵中
——–日叠加周月量——–
月=1 Param#1 叠加月量用;
半月=1 Param#2 叠加半月量用;
周=1 Param#3 叠加周量用;
——–分时叠加日量——–
日=1 Param#4 叠加日量用;
——–调整任意均量值——–
N Param#5 调整任意均量值(白色);
NA Param#6 调整任意均量值(黄色);
NB Param#7 调整任意均量值(绿色);
评论(0)