VOL,PRECIS0,volstick;
{成交量的三条重要均线}
MA5:MA(V,5),coloryellow,PRECIS0;
MA40:MA(V,40),colormagenta,PRECIS0;
MA135:MA(V,135),colorgreen,PRECIS0;
{虚拟成交量,对于交易日,请将下面“交易分钟数:=240;”这一句用大括号括起来,将其下的那一长句的大括号去掉}
交易分钟数:=240;
{交易分钟数:=if(CURRENTTIME>93000 and CURRENTTIME<150000,
if(CURRENTTIME<113000,(TIMETOT0(CURRENTTIME)-34200)/60,
if(CURRENTTIME>130000,(TIMETOT0(CURRENTTIME)-39600)/60,120)),240);}
VVOL:IF(BARSTATUS=2 ,V/交易分钟数*240,V),PRECIS0,COLOR00FFFF,LINETHICK0;
STICKLINE(BARSTATUS=2,0,VVOL,8,1),PRECIS0,COLOR00FFFF,DOTLINE,LAYER7;
{缩量情况判断}
S:=VOL/REF(V,1);
连续缩量0:last(V<ma5),PRECIS0,linethick0;
连续缩量1:last(V<ma5 or (c<=ref(c,1) AND V>=ma5)),PRECIS0,linethick0;
昨缩量:REF(连续缩量1,1),PRECIS0,linethick0;
突破:昨缩量>3 and V>=0.9*MA5 and c>=ref(c,1),PRECIS0,linethick0;
十日缩量:count((V<ma5 or (c<ref(c,1) AND V>=ma5)),10),PRECIS0,linethick0;
突破换手:=100*sum(V,4)/capital/4;{推算明天突破需要的换手};
{倍量提示,缩量后的倍量要注意,多是启动征兆}
换手率:=vol/capital*100;
STICKLINE(S>1.9 AND C>REF(C,1) AND 换手率<20,0,V,8,0),PRECIS0,COLOR00FFFF;
{地量判断}
Minvol10:=llv(vol,10);
Minvol20:=llv(vol,20);
Minvol40:=llv(vol,40);
minvol60:=llv(vol,60);
minvol100:=llv(vol,100);
地量60:=vol=minvol60 and (barstatus=0 OR 交易分钟数=240);
地量100:=vol=minvol100 and (barstatus=0 OR 交易分钟数=240);
DRAWMOVETEXT(地量60 and 地量100=0,'60地量' ),ColorFF21FF;
DRAWMOVETEXT(地量100,'100地量' ),colorred;
M:max(1.2*HHVALL(VOL),0.1*capital),colorblack;
{60天地量提示,粉色K线}
STICKLINE(地量60>0,0.9*M,M, 6,0),ColorFF21FF;
STICKLINE(地量60>0,0.9*M,M, 5,0),ColorFF30FF;
STICKLINE(地量60>0,0.9*M,M, 4,0),ColorFF40FF;
STICKLINE(地量60>0,0.9*M,M, 3,0),ColorFF4FFF;
STICKLINE(地量60>0,0.9*M,M, 2,0),ColorFF5FFF;
STICKLINE(地量60>0,0.9*M,M, 1,0),ColorFF6FFF;
STICKLINE(地量60>0,0.9*M,M,0.2,-100),ColorFF8FFF;
{百天地量提示,红色K线}
STICKLINE(地量100>0,0.9*M,M, 6,0),COLOR1111A7;
STICKLINE(地量100>0,0.9*M,M, 5,0),COLOR1111B7;
STICKLINE(地量100>0,0.9*M,M, 4,0),COLOR1111C7;
STICKLINE(地量100>0,0.9*M,M, 3,0),COLOR1111D7;
STICKLINE(地量100>0,0.9*M,M, 2,0),COLOR1111E7;
STICKLINE(地量100>0,0.9*M,M, 1,0),COLOR1111F7;
STICKLINE(地量100>0,0.9*M,M,0.2,-80),COLOR4444FF;
{判断成交量以前N天比是不是最小值,如果是则显示相应的天数,如20天地量则显示“地量:20”}
Tmp1:=if(((barstatus=0 and v=Minvol10) or (barstatus=2 and 交易分钟数>210 and v=Minvol10)),10,0);
Tmp2:=if(((barstatus=0 and v=Minvol20) or (barstatus=2 and 交易分钟数>210 and v=Minvol20)),20,0);
Tmp3:=if(((barstatus=0 and v=Minvol40) or (barstatus=2 and 交易分钟数>210 and v=Minvol40)),40,0);
Tmp4:=if(((barstatus=0 and v=Minvol60) or (barstatus=2 and 交易分钟数>210 and v=Minvol60)),60,0);
Tmp5:=if(((barstatus=0 and v=Minvol100) or (barstatus=2 and 交易分钟数>210 and v=Minvol100)),100,0);
地量:max(tmp1,tmp2,tmp3,tmp4,tmp5),PRECIS0,linethick0;
{显示当下成交量相关信息}
DRAWFLAGTEXT(换手率>0,VVOL/2 , '【虚拟】'+NUMTOSTRN(换手率*VVOL/VOL,2)+'%'),colorwhite;
DRAWFLAGTEXT(换手率>0,VOL/2 , '【实际】'+NUMTOSTRN(换手率,2)+'%'),colorwhite;
DRAWFLAGTEXT(V<MA5,VOL/2 , '【突破】'+NUMTOSTRN(突破换手,2)+'%'),colorwhite;
DRAWFLAGTEXT(地量>0,VOL/2 , '【地量】'+地量),colorwhite;
{5%,10%换手率分界线,换手率过小(长期<2%)或过大(>20%)的股票尽是少参与}
M10:0.1*capital,PRECIS0,DOTLINE,COLORwhite;
M5:0.05*capital,PRECIS0,DOTLINE,COLORGREEN;
|