通达信自己修改后相当实用的顶底决策指标通达信公式
2017-10-13 来源:网络 编辑:翔博软件
HD:=HIGH-REF(HIGH,1); LD:=REF(LOW,1)-LOW; DMP:=EMA(IF(HD0 AND HDLD,HD,0),28); DMM:=EMA(IF(LD0 AND LDHD,LD,0),28); VZH:=EMA(DMP/TR,28); VZL:=EMA(DMM/TR,28); MA1:=EMA
HD:=HIGH-REF(HIGH,1);
LD:=REF(LOW,1)-LOW;
DMP:=EMA(IF(HD>0 AND HD>LD,HD,0),28);
DMM:=EMA(IF(LD>0 AND LD>HD,LD,0),28);
VZH:=EMA(DMP/TR,28);
VZL:=EMA(DMM/TR,28);
MA1:=EMA((CLOSE+HIGH+LOW)/3,2);
VAR1:=MAX((DYNAINFO(3)),EMA(DYNAINFO(5),5));
VAR2:=MIN((DYNAINFO(3)),EMA(DYNAINFO(6),5));
HH:=(COST(95)+DYNAINFO(11))/2;
LL:=(COST(5)+DYNAINFO(11))/2;
VAR3:=CONST((VAR1+HH)/2);
VAR4:=CONST((VAR2+LL)/2);
VAR5:=(VAR3+VAR4)/2;
VAR6:=(VAR4+VAR5)-VAR3;
VAR7:=(VAR4+VAR6)/2;
VAR8:=(VAR6+VAR7)/2;
DIF:=((EMA(CLOSE,24)-EMA(CLOSE,52))*4)+VAR5;
DEA:=EMA(DIF,18);
MCD:((DIF-DEA)*2)+VAR5,NODRAW,COLORYELLOW;
VAR10:=(3*SMA((C-LLV(L,54))/(HHV(H,54)-LLV(L,54)),3,1)-2*SMA(SMA((C-LLV(L,54))/(HHV(H,54)-LLV(L,54)),3,1),3,1));
VAR11:=MEMA(VAR10,10);
VAR12:=EMA(VAR11,10);
VAR13:=IF(EXIST(CROSS(VAR3,MA1),5) AND EXIST(C>VAR3,10) AND VAR11<HHV(VAR11,10) AND VAR12<REF(VAR12,1),1,0);
VAR14:=IF(EXIST(CROSS(MA1,VAR4),5) AND EXIST(C<VAR4,10) AND VAR11>LLV(VAR11,10) AND VAR12>REF(VAR12,1),1,0);
顶:VAR3,POINTDOT,COLORFF00FF;
底:VAR4,POINTDOT,COLORGREEN;
多空:=IF(VZH>VZL,VAR7,VAR6);
DRAWBAND(MCD,RGB(150,30,30),VAR5,RGB(0,110,30));
DRAWBAND(多空,RGB(150,100,50),VAR8,RGB(10,100,100));
DRAWICON(VAR13=1 AND REF(VAR13,1)=0,VAR3,8);
DRAWTEXT(VAR14=1 AND REF(VAR14,1)=0,VAR4,'B'),COLORWHITE;
XC:MA1,COLORYELLOW;
LD:=REF(LOW,1)-LOW;
DMP:=EMA(IF(HD>0 AND HD>LD,HD,0),28);
DMM:=EMA(IF(LD>0 AND LD>HD,LD,0),28);
VZH:=EMA(DMP/TR,28);
VZL:=EMA(DMM/TR,28);
MA1:=EMA((CLOSE+HIGH+LOW)/3,2);
VAR1:=MAX((DYNAINFO(3)),EMA(DYNAINFO(5),5));
VAR2:=MIN((DYNAINFO(3)),EMA(DYNAINFO(6),5));
HH:=(COST(95)+DYNAINFO(11))/2;
LL:=(COST(5)+DYNAINFO(11))/2;
VAR3:=CONST((VAR1+HH)/2);
VAR4:=CONST((VAR2+LL)/2);
VAR5:=(VAR3+VAR4)/2;
VAR6:=(VAR4+VAR5)-VAR3;
VAR7:=(VAR4+VAR6)/2;
VAR8:=(VAR6+VAR7)/2;
DIF:=((EMA(CLOSE,24)-EMA(CLOSE,52))*4)+VAR5;
DEA:=EMA(DIF,18);
MCD:((DIF-DEA)*2)+VAR5,NODRAW,COLORYELLOW;
VAR10:=(3*SMA((C-LLV(L,54))/(HHV(H,54)-LLV(L,54)),3,1)-2*SMA(SMA((C-LLV(L,54))/(HHV(H,54)-LLV(L,54)),3,1),3,1));
VAR11:=MEMA(VAR10,10);
VAR12:=EMA(VAR11,10);
VAR13:=IF(EXIST(CROSS(VAR3,MA1),5) AND EXIST(C>VAR3,10) AND VAR11<HHV(VAR11,10) AND VAR12<REF(VAR12,1),1,0);
VAR14:=IF(EXIST(CROSS(MA1,VAR4),5) AND EXIST(C<VAR4,10) AND VAR11>LLV(VAR11,10) AND VAR12>REF(VAR12,1),1,0);
顶:VAR3,POINTDOT,COLORFF00FF;
底:VAR4,POINTDOT,COLORGREEN;
多空:=IF(VZH>VZL,VAR7,VAR6);
DRAWBAND(MCD,RGB(150,30,30),VAR5,RGB(0,110,30));
DRAWBAND(多空,RGB(150,100,50),VAR8,RGB(10,100,100));
DRAWICON(VAR13=1 AND REF(VAR13,1)=0,VAR3,8);
DRAWTEXT(VAR14=1 AND REF(VAR14,1)=0,VAR4,'B'),COLORWHITE;
XC:MA1,COLORYELLOW;