★★★周K线叠及周量叠源码★★★
周K线与日K线相比有以下优点:
1、准确性更高。2、看得更长远。3、信号更明确,波段更分明。4、周K线还兼容了部分日K
线的优点。
公式就是参考。有兴趣的朋友以自己喜好进一步优化,优化好了别忘了跟帖
飞狐用
{辅助公式}
C1:CLOSE;
O1:OPEN;
H1:HIGH;
L1:LOW;
VVLA:VOL;
{日周K线叠加}
ccc1:="辅助公式.c1#week";
ooo1:="辅助公式.o1#week";
hhh1:="辅助公式.h1#week";
lll1:="辅助公式.l1#week";
vvar1:=if(WEEKDAY=3,hhh1,ccc1);
vvar2:=if(WEEKDAY=3,lll1,ooo1);
STICKLINE(ccc1>=ooo1,ooo1,ccc1,10,0),Color613076,LINEDOT;
STICKLINE(ccc1>=ooo1,vvar1,vvar2,3,0),Color613076;
STICKLINE(ooo1>ccc1,ccc1,ooo1,10,0),ColorFA7D32,LINEDOT;
STICKLINE(ooo1>ccc1,vvar1,vvar2,3,0),ColorFA7D32;
STICKLINE(C>=O,C,O,8,0),COLOR0000BB;
STICKLINE(C>=O,H,L,0,0),COLOR0000BB;
STICKLINE(C<=O,C,O,8,0),COLORFFFF00;
STICKLINE(C<=O,H,L,0,0),COLORffff00;
{周量叠加}
ccc1:="辅助公式.c1#week";
ooo1:="辅助公式.o1#week";
ZZL:="辅助公式.VVLA#week";
周量:ZZL,ColorFFff00,LINETHICK0;
STICKLINE(ccc1>ooo1 ,0,周量*0.45,10,0),Color613076,LINEDOT;
STICKLINE(ccc1<=ooo1 ,0,周量*0.45,10,0),ColorFA7D32,LINEDOT;
量:VOL,VOLSTICK;
MA1:MA(VOL,5);
MA2:MA(VOL,13);
MA3:MA(VOL,90);
大智慧用
{辅助001}
C1:CLOSE;
O1:OPEN;
H1:HIGH;
L1:LOW;
VVLA:VOL;
{日周K线叠加}
ccc1:="辅助001.c1#week";
ooo1:="辅助001.o1#week";
hhh1:="辅助001.h1#week";
lll1:="辅助001.l1#week";
vvar1:=if(WEEKDAY=3,hhh1,ccc1);
vvar2:=if(WEEKDAY=3,lll1,ooo1);
STICKLINE(ccc1>=ooo1,ooo1,ccc1,10,0),Color613076;
STICKLINE(ccc1>=ooo1,vvar1,vvar2,4,0),Color613076;
STICKLINE(ooo1>ccc1,ccc1,ooo1,10,0),ColorFA7D32;
STICKLINE(ooo1>ccc1,vvar1,vvar2,4,0),ColorFA7D32;
STICKLINE(C>=O,C,O,8,0),COLOR0000BB;
STICKLINE(C>=O,H,L,0,0),COLOR0000BB;
STICKLINE(C<=O,C,O,8,0),COLORFFFF00;
STICKLINE(C<=O,H,L,0,0),COLORffff00;
{周量叠加}
ccc1:="辅助001.c1#week";
ooo1:="辅助001.o1#week";
ZZL:="辅助001.VVLA#week";
周量:ZZL,ColorFFff00,LINETHICK0;
STICKLINE(ccc1>ooo1 ,0,周量*0.45,10,0),Color613076;
STICKLINE(ccc1<=ooo1 ,0,周量*0.45,10,0),ColorFA7D32;
量:VOL,VOLSTICK;
STICKLINE(C>=O,量,0,8,1),COLOR0000BB;
STICKLINE(C<=O,量,0,8,0),COLORFFFF00;
通达信用
{引入}
XA:=BARSLAST(WEEKDAY=1)+1;
BZ:=WEEKDAY=2;
O1:REF(O,BZ);
C1:C;
H1:HHV(H,XA);
L1:LLV(L,XA);
周量:SUM(V,XA)*0.4,COLORFF0000,LINETHICK0
{叠加周K线}
WO:="引用.O1#WEEK",LINETHICK1;
WC:="引用.C1#WEEK",LINETHICK1;
WH:="引用.H1#WEEK",LINETHICK1;
WL:="引用.L1#WEEK",LINETHICK1;
VVAH:=IF(WEEKDAY=3,WH,WC);
VVAL:=IF(WEEKDAY=3,WL,WO);
AD:=WC>=WO;
AF:=WO>=WC;
STICKLINE(AD ,WO,WC,4,0),COLOR73599D;
STICKLINE(AD ,VVAH,VVAL,1.5,0),COLOR73599D;
STICKLINE(AF ,WC,WO,4,0),COLOR8A8E31;
STICKLINE(AF ,VVAH,VVAL,1.5,0),COLOR8A8E31;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
{叠加周量}
Z周:="引用.周量#WEEK",LINETHICK0;
WO:="引用.O1#WEEK",LINETHICK0;
WC:="引用.C1#WEEK",LINETHICK0;
AD:=WC>WO;
AF:=WC<=WO;
STICKLINE(AD,Z周,0,4,0),COLOR73599D;
STICKLINE(AF,Z周,0,4,0),COLOR8A8E31;
量:VOL,LINETHICK0,VOLSTICK;
MA1:MA(VOL,5);
MA2:MA(VOL,13);
MA3:MA(VOL,90);