通达信K线重心公式,奇妙无穷,仔细琢磨必有所获
手上有一个自己慢慢改,K线重心只是配合指标.
K线重心:AMOUNT/VOL/100,COLORYELLOW,LINETHICK2;
收盘:C,COLORRED;
最低:L,COLORWHITE;
最高:H,COLORC6C600;
VB1:=INDEXO;
VB2:=K线重心*1.1;
VB3:=IF(VB1=0,VB2,REF(K线重心,1)*1.1);
VB4:=(VB2+VB3)/2;
VB5:=K线重心*0.9;
VB6:=IF(VB1=0,VB5,REF(K线重心,1)*0.9);
VB7:=(VB5+VB6)/2;
VB8:=EMA(VB4,13);
VB9:=EMA(VB7,13);
K线重心通道上:FORCAST(VB8,13),COLORMAGENTA,LINETHICK2;
K线重心通道下:FORCAST(VB9,13),COLORGREEN,LINETHICK2;
长度:=IF((O = REF(C,1)),(C-O),(IF((O > REF(C,1)) AND (C>O),C-REF(C,1),(IF((O > REF(C,1)) AND (C < REF(C,1)) ,(O - C),(IF((O > REF(C,1)) AND (C > REF(C,1)) ,O - REF(C,1),(IF((O < REF(C,1)) AND (C < O),(C - REF(C,1)),(IF((O < REF(C,1)) AND (C < REF(C,1)) AND (C > O),(O - REF(C,1)),(IF((O < REF(C,1)) AND (C > REF(C,1)),(C-O),((C - REF(C,1))))))))))))))));
重心:=REF(C,1)+长度/2;
STICKLINE(重心>0,重心+0.01,重心-0.01,2,0),COLORFF0080;
选股:=CROSS(C,K线重心) AND 最高>REF(最高,1);
DRAWICON(选股,L*0.98,1);