通达信两周k线主图公式
最近大家对分时图讨论得较多,本着“趋势看周线 选股看日线 买股看时线”的思维,特发个本人珍藏的两周k线公式,有利于观察周线情
{两周K线}
XR1:=6;XK1:=5;
HH1:=HHV(HIGH,XK1);
LL1:=LLV(LOW ,XK1);
OO1:=IF(XK1<=1,OPEN,REF(OPEN,XK1-1));
CC1:=CLOSE;
XH1:=CONST(IF(ISLASTBAR,IF(XR1<=1,HH1,REF(HH1,XR1-1)),DRAWNULL));
XL1:=CONST(IF(ISLASTBAR,IF(XR1<=1,LL1,REF(LL1,XR1-1)),DRAWNULL));
XO1:=CONST(IF(ISLASTBAR,IF(XR1<=1,OO1,REF(OO1,XR1-1)),DRAWNULL));
XC1:=CONST(IF(ISLASTBAR,IF(XR1<=1,CC1,REF(CC1,XR1-1)),DRAWNULL));
STICKLINE(CURRBARSCOUNT=XR1+FLOOR(XK1/2) AND XC1>XO1,XH1,XL1,XK1*1+0.5,0),COLOR008080;
STICKLINE(CURRBARSCOUNT=XR1+FLOOR(XK1/2) AND XC1>XO1,XO1,XC1,XK1*4+0.5,0),COLOR008080;
STICKLINE(CURRBARSCOUNT=XR1+FLOOR(XK1/2) AND XC1<XO1,XH1,XL1,XK1*1+0.5,0),COLOR005B00;
STICKLINE(CURRBARSCOUNT=XR1+FLOOR(XK1/2) AND XC1<XO1,XO1,XC1,XK1*4+0.5,0),COLOR005B00;
XR:=1;XK:=5;
HH:=HHV(HIGH,XK);
LL:=LLV(LOW ,XK);
OO:=IF(XK<=1,OPEN,REF(OPEN,XK-1));
CC:=CLOSE;
XH:=CONST(IF(ISLASTBAR,IF(XR<=1,HH,REF(HH,XR-1)),DRAWNULL));
XL:=CONST(IF(ISLASTBAR,IF(XR<=1,LL,REF(LL,XR-1)),DRAWNULL));
XO:=CONST(IF(ISLASTBAR,IF(XR<=1,OO,REF(OO,XR-1)),DRAWNULL));
XC:=CONST(IF(ISLASTBAR,IF(XR<=1,CC,REF(CC,XR-1)),DRAWNULL));
STICKLINE(CURRBARSCOUNT=XR+FLOOR(XK/2) AND XC>XO,XH,XL,XK*1+0.5,0),COLOR008080;
STICKLINE(CURRBARSCOUNT=XR+FLOOR(XK/2) AND XC>XO,XO,XC,XK*4+0.5,0),COLOR008080;
STICKLINE(CURRBARSCOUNT=XR+FLOOR(XK/2) AND XC<XO,XH,XL,XK*1+0.5,0),COLOR005B00;
STICKLINE(CURRBARSCOUNT=XR+FLOOR(XK/2) AND XC<XO,XO,XC,XK*4+0.5,0),COLOR005B00;
DRAWKLINE(H,O,L,C);