周成交量
2014-11-9 13:00:29点击:
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));
画柱线(周收>周开,0,量,yt,0),Color613076,;
画柱线(周收<=周开,0,量,yt,0),ColorFA7D32,;
代理编写(对转)通达信 飞狐 同花顺 大智慧 文华财经 博易大师 依天财经等软件指标!