飞狐月周日K线同图指标公式源码 飞狐指标公式大全(2)
2015-12-18 16:12:33 股票入门 http://rumen.southmoney.com
//
{周月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);
周开: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;
Zf:=周收>周开 or (周收=周开 and 周收>ref(周收,Zw+1));
Zj:=cross(Zw,Zwx);
yt:=if(zq=1 and refx(zq,2)=1,13,if(refx(zq,1)=1 or zq=1,7,14));
//影线
STICKLINE(Zw>0 and Zf and Zj,周低,周高,1,0)COLORAAAAEE;
STICKLINE(周开<周收,周开,周收,YT,0),COLORAAAAEE;
STICKLINE(Zw>0 and not(Zf) and Zj,周低,周高,1,0)COLOREEAAAA;
STICKLINE(周开>周收,周开,周收,YT,0),COLOREEAAAA;
//日线
TJ:=CLOSE>OPEN or CLOSE=OPEN and CLOSE>REF(CLOSE,1);
STICKLINE(TJ,LOW,HIGH,1,0),ColorE9;
STICKLINE(TJ,LOW,CLOSE,8,0),Color80;
STICKLINE(TJ,LOW,CLOSE,6,0),ColorA5;
STICKLINE(TJ,LOW,CLOSE,4,0),ColorC0;
STICKLINE(TJ,LOW,CLOSE,2,0),ColorE6;
STICKLINE(NOT(TJ),HIGH,LOW,1,0),ColorAA00;
STICKLINE(NOT(TJ),CLOSE,OPEN,8,0),Color5000;
STICKLINE(NOT(TJ),CLOSE,OPEN,6,0),Color6600;
STICKLINE(NOT(TJ),CLOSE,OPEN,4,0),Color8000;
STICKLINE(NOT(TJ),CLOSE,OPEN,2,0),ColorA000;
周框图引用公式:
{先建引用公式 名称: 引用4价}
C1:C;
O1:O;
H1:H;
L1:L;
股票入门声明:资讯来源于互联网,属作者个人观点,仅供投资者参考,并不构成投资建议。投资者据此操作,风险自担。