學(xué)習(xí)了不少老師們?cè)凇傲?nbsp; 換手率”的習(xí)作收益匪淺做一體現(xiàn)疊加“周 月 半月 分時(shí)用疊加日量”公式。 僅供朋友們參考,有心得體會(huì)請(qǐng)跟貼交流學(xué)習(xí)!!!! //月 半月 周 日 疊加 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;//月天數(shù) 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; 月?lián)Q手率:=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天數(shù) 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; //星期天數(shù) 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天數(shù) 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; 半月?lián)Q手率:=SUM(vol/CAPITAL*100,TQ),ColorFFff00,LINETHICK0; TT2:=ISLASTBAR=1; DRAWTEXTEX(TT2,0,371,1,'【創(chuàng)于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)+''+'】'+''+' 半月?lián)Q手率【'+NUMTOSTR(半月?lián)Q手率[SYSPARAM(1)],2)+'%】'),Color00FFFF; DRAWTEXTEX(TT2,0,4,31,'【月周期: '+NUMTOSTR(zQ1[SYSPARAM(1)],0)+''+'天 】'+''),Color00FFFF; DRAWTEXTEX(TT2,0,125,31,'【月量: '+NUMTOSTR(月量[SYSPARAM(1)],0)+''+'】'+''+' 月?lián)Q手率【'+NUMTOSTR(月?lián)Q手率[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,'【創(chuàng)于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,'【換手率級(jí)別】:'),color00ffff; Explain(換手率<1,'【絕對(duì)地量:小于1%】 '),colorffffff; Explain(換手率>1 and 換手率<2,'日換手率在1%--2%,股價(jià)屬于成交低靡,屬于冷門股。日換手率成交小于3%的成交額稱為"成交無量'),colorffff00; Explain(換手率>=2 and 換手率<3,'日換手率在2%--3%,股價(jià)屬于成交溫和,屬于備份股。'),Color0080FF; Explain(換手率>=3 and 換手率<5,'日換手率在3%--5%,股價(jià)屬于成交活躍,表示有莊家在積極活動(dòng),屬于熱門股。把10日平均換手率大于3%或大于5%,而后又縮量至換手率小于3%高度控盤的個(gè)股作為選股條件。'),color00dddd; Explain(換手率>=5 and 換手率<8,'日換手率在5%--8%, 大于7%,常常超過10%,屬于股價(jià)成交帶量,表明籌碼在急劇換手。發(fā)生在低位或是通過第一阻力區(qū),很可能是強(qiáng)莊積極進(jìn)貨。'),colorddaadd; Explain(換手率>=8 and 換手率<15,'日換手率大于8%--15%,股價(jià)屬于成交放量。'),color0022ff; Explain(換手率>=15 and 換手率<25,'日換手率大于15%--25%,股價(jià)屬于成交巨量,發(fā)生在高位或高位縮量橫盤之后,很可能是莊家出貨'),Coloree8800; Explain(換手率>25,'日換手率大于25% 股價(jià)屬于成交怪異;周換手率大于25% 屬于成交活躍。'),color00ff00; EXPLAINEX(1,'五日換手:',SUM(換手率,5),2,0),colorffaadd; EXPLAINEX(1,'十日換手:',SUM(換手率,10),2,1),colorffaadd; 日J(rèn):="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(rèn) > 0),'日J(rèn)=',日J(rèn),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指標(biāo)位置:低位'),COLORCYAN; EXPLAIN(((日K > 20) AND (日K < 50)),'日線KD指標(biāo)位置:中低'),colorFF; EXPLAIN(((日K > 50) AND (日K < 80)),'日線KD指標(biāo)位置:中高'),colorFF00; EXPLAIN((日K >= 80),'日線KD指標(biāo)位置:高位'),colorFF00; EXPLAINEX((周K > 0),'周K=',周K,2,0),colorFF; EXPLAINEX((周D > 0),'周D=',周D,2,0),color208FFF; EXPLAIN((周K <= 20),'周線KD指標(biāo)位置:低位'),colorFF; EXPLAIN(((周K > 20) AND (周K < 50)),'周線KD指標(biāo)位置:中低'),colorFF; EXPLAIN(((周K > 50) AND (周K < 80)),'周線KD指標(biāo)位置:中高'),colorFF00; EXPLAIN((周K >= 80),'周線KD指標(biāo)位置:高位'),; 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 疊加周量用; --------分時(shí)疊加日量-------- 日=1 Param#4 疊加日量用; --------調(diào)整任意均量值-------- N Param#5 調(diào)整任意均量值(白色); NA Param#6 調(diào)整任意均量值(黃色); NB Param#7 調(diào)整任意均量值(綠色);
|