在线检测未来函数

通达信变色买卖K线主图指标公式

来源:Internet,编辑:股旁网,2014-04-11

{------K线-----------}
X1:=(2*CLOSE+LOW+HIGH+OPEN)/5;
XCLOSE:=EMA(X1,3);
XOPEN:=EMA((REF(OPEN,1)+REF(XCLOSE,1))/2,3);
STICKLINE(XOPEN<XCLOSE,REFDATE(HHV(H,0),DATE),REFDATE(LLV(L,0),DATE),6,0),COLOR003303; {-------KD波段背景------};
{买卖K线}
STICKLINE(XOPEN>=XCLOSE,H,L,0,0 ),COLORCYAN;
STICKLINE(XOPEN>=XCLOSE,C,O,3.5,0 ),COLORFF4400;
STICKLINE(XOPEN>=XCLOSE,C,O,3,0 ),COLORFF8800;
STICKLINE(XOPEN>=XCLOSE,C,O,2,0 ),COLORFFCC00;
STICKLINE(XOPEN>=XCLOSE,C,O,1,0 ),COLORCYAN;
STICKLINE(XOPEN<XCLOSE,H,L,0,0 ),COLOR00FFFF;
STICKLINE(XOPEN<XCLOSE,C,O,3.5,0 ),COLOR009999;
STICKLINE(XOPEN<XCLOSE,C,O,3,0 ),COLOR0099BB;
STICKLINE(XOPEN<XCLOSE,C,O,2,0 ),COLOR0099DD;
STICKLINE(XOPEN<XCLOSE,C,O,1,0 ),COLOR0099FF;
VAR9Q:=C= HHV(C,4)AND (REF(C,1)>=REF(C,2) OR REF(C,1)>=REF (C,3)) OR REF(C,1)=HHV(C,4) AND CLOSE>=REF(C,2) OR REF(C,2) =HHV(C,4) AND REF(C,3)=LLV(C,4) AND C>=REF(C,1) OR REF(C,3) =HHV(C,4) AND C>=REF(C,1) AND C>=REF(C,2);
STICKLINE(VAR9Q,H,L,0,0),COLOR0000FF;
STICKLINE(VAR9Q,C,O,3.5,0),COLOR0000CC;
STICKLINE(VAR9Q,C,O,3,0),COLOR0000DD;
STICKLINE(VAR9Q,C,O,2,0),COLOR0000EE;
STICKLINE(VAR9Q,C,O,1,0),COLOR0000FF;
VARCQ:=REF(C,1)=LLV(C,4) AND C>=REF(C,2) OR REF(C,2)=LLV(C,4) AND REF(C,1)<=REF(C,3) AND REF(C,2)<REF(C,4) AND C>=REF(C,1);
STICKLINE(VARCQ,H,L,0,0),COLOR00FF00;
STICKLINE(VARCQ,O,C,3.5,0),COLOR00CC00;
STICKLINE(VARCQ,O,C,3,0),COLOR00DD00;
STICKLINE(VARCQ,O,C,2,0),COLOR00EE00;
STICKLINE(VARCQ,O,C,1,0),COLOR00FF00;
VARDQ:=REF(C,1)=HHV(C,4) AND C<REF(C,2) OR (REF(C,2)=HHV(C,4) AND REF(C,1)>REF(C,3) OR REF(C,3)=HHV(C,4) AND REF(C,1)>REF (C,2)) AND REF(C,2)>=REF(C,4) AND C<REF(C,1);
STICKLINE(VARDQ AND C<O,H,L,0,0),COLORFF9900;
STICKLINE(VARDQ AND C<O,O,C,3.5,0),COLORFF2200;
STICKLINE(VARDQ AND C<O,O,C,3,0),COLORFF4400;
STICKLINE(VARDQ AND C<O,O,C,2,0),COLORFF6600;
STICKLINE(VARDQ AND C<O,O,C,1,0),COLORFF8800;
{变色彩带}
VAR1:=(2*CLOSE+HIGH+LOW)/4;
A1: (EMA(VAR1,2)+EMA(VAR1,3)+EMA(VAR1,5)+EMA(VAR1,8)+EMA(VAR1,11)+EMA(VAR1,13))/6.4,COLORFF9900,LINETHICK3;
A2: EMA(A1,2),COLORFF9900;
A3: EMA(A2,2),COLORFF9900;
A4: EMA(A3,2),COLORFF9900;
A5: EMA(A4,2),COLORFF9900;
A6: EMA(A5,2),COLORFF9900;
A7: EMA(A6,2),COLORFF9900;
A8: EMA(A7,2),COLORFF9900;
A9: EMA(A8,2),COLORFF9900;
A10: EMA(A9,2),COLORFF9900;
IF(A1>REF(A1,1),A1,DRAWNULL),COLOR0FFFF0;
IF(A2>REF(A2,1),A2,DRAWNULL),COLOR0FFFF0;
IF(A3>REF(A3,1),A3,DRAWNULL),COLOR0FFFF0;
IF(A4>REF(A4,1),A4,DRAWNULL),COLOR0FFFF0;
IF(A5>REF(A5,1),A5,DRAWNULL),COLOR0FFFF0;
IF(A6>REF(A6,1),A6,DRAWNULL),COLOR0FFFF0;
IF(A7>REF(A7,1),A7,DRAWNULL),COLOR0FFFF0;
IF(A8>REF(A8,1),A8,DRAWNULL),COLOR0FFFF0;
IF(A9>REF(A9,1),A9,DRAWNULL),COLOR0FFFF0;
IF(A10>REF(A10,1),A10,DRAWNULL),COLOR0FFFF0;
IF(A1>REF(A1,1),A1,DRAWNULL),COLOR0000FF,LINETHICK3;

通达信变色买卖K线主图指标公式

 

相关文章