标题: 周成交量 [打印本页] 作者: admin 时间: 2016-1-19 01:52 标题: 周成交量 TBS:=POW(10,ABS(LOG(MINDIFF)));
{周月K线}
//周线
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);
Zh:=hhv(h,Zw+1);
ZL:=LLv(L,Zw+1);
vv:=sum(v,Zw+1);
周开:ROUND(zo*TBS)/TBS,LINETHICK;
周高:ROUND(refx(Zh,Zwx)*TBS)/TBS,,COLORFF,LINETHICK;
周低:ROUND(refx(ZL,Zwx)*TBS)/TBS,COLORFF00,LINETHICK;
周收:ROUND(refx(c,Zwx)*TBS)/TBS,,COLORFF00FF,LINETHICK;
量:ROUND(refx(vv,Zwx)*TBS)/TBS,COLORFF00FF,LINETHICK;
Zf:=周收>周开 or (周收=周开 and 周收>ref(周收,Zw+1));
Zj:=cross(Zw,Zwx);
yt:=if(zq=1 and refx(zq,2)=7,13,if(refx(zq,1)=1 or zq=1,7,14));