kx:="chanlun@kxian";
kxg:="chanlun@kxg";
kxd:="chanlun@kxd";
kxfx:="chanlun@kxfx";
笔:="chanlun@bi";
笔周期:"chanlun@bilast",linethick0, colorff00ff;
bilast:="chanlun@bilast";{笔周期};
段:="chanlun@duan";
段周期:"chanlun@duanlast", linethick0, colorFFffFF;
duanlast:="chanlun@duanlast"; {段周期};
中枢:="chanlun@zs";
zszg:="chanlun@zszg";
zszd:="chanlun@zszd";
zsgg:="chanlun@zsgg";
zsdd:="chanlun@zsdd";
zszz:="chanlun@zszz";
zsks:="chanlun@zskslast";
zsjs:="chanlun@zsjslast";
bifx:=-REF(笔,bilast);
duanfx:=-REF(段,duanlast);
kxqj:="chanlun@kxqj";
{画中枢Begin} {以背景方式画}
STICKLINE(zszg>zszd AND duanfx=1, zszg, zszd, 10, 1),Color8E236B;
STICKLINE(zszg>zszd AND duanfx=-1, zszg, zszd, 10, 1), Color007700;
{中枢震荡监视器}
DRAWLINE(zsks=1, zszz, zsjs=1, zszz, 0), colorFFFFFF;
{画中枢END}
{顶底分型}
STICKLINE(kx>0, kxg, kxd, 5, 1),Color007700,linethick2;
STICKLINE(kxL+0.04,4,0);
VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);
VAR13:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);
VAR15:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);
VAR17:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);
VAR19:=EMA(C,2)-EMA(C,150);
买1:=VAR10;
买2:=(VAR11+VAR13+VAR15+VAR17);
卖1:=(VAR12+VAR14+VAR16+VAR18);
DRAWTEXT(买1>0 OR 买2>0,L*0.985,'买'),COLOR00ffff;
DRAWTEXT(卖1>0,H*1.01,'卖'),COLOR00ffff;
APP:=(VOL)/((H-L)*(2)-ABS(C-O));
ZL:=IF((H>O),(APP)*(H-L),IF((LO),0-(APP)*(H-C+O-L),IF((LREF(PL5,1) AND REF(PL5,1)=REF(PL5,2) AND REF(PL5,2)>=REF(PL5,3);
PL10:=ZIG(3,10);
EN2:=PL10>REF(PL10,1) AND REF(PL10,1)=REF(PL10,2) AND REF(PL10,2)>=REF(PL10,3);
PL20:=ZIG(3,20);
EN3:=PL20>REF(PL20,1) AND REF(PL20,1)=REF(PL20,2) AND REF(PL20,2)>=REF(PL20,3);
走强1:=BARSLAST(PL5REF(PL5,1));
走强2:=BARSLAST(PL10REF(PL10,1));
走强3:=BARSLAST(PL20REF(PL20,1));
ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强2),0);
ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强2),0);
DTJZ5:=IF(PL10REF(PL20,1),COUNT(EN2,走强3),0);
ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强3),0);
DTJZ10:=IF(PL20REF(PL20,1) AND ZTJD10=1,H*1.04,'[二卖]'),LINETHICK2,COLORFFff00;
DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2,L*0.94,'[二买]'),LINETHICK2,COLORFFFF00;
DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2) AND EX2,H*1.03,'[一卖]'),LINETHICK3,COLOR00FF00;
DRAWTEXTABS(620,-55,'历史最高价:'+HHV(HIGH,0)),Colorff00ff,LAYER0;
DRAWTEXTABS(620,-37,'历史最低价:'+LLV(LOW,0)),ColorAFFF00,LAYER0;
DRAWTEXTABS(750,-55,'20日最高价:'+HHV(HIGH,20)),Colorred,LAYER0;
DRAWTEXTABS(750,-37,'20日最低价:'+LLV(LOW,20)),ColorAFFF00,LAYER0;DRAWTEXT_FIX(C>O,0.01,0.9,0,' WWW. '),COLORRED;
DRAWTEXT_FIX(C>O,1,1,0,'交易策略'),COLORRED;