【通达信】深化MACD指标公式

2015.11.08 21:28

SHORT:=12;
LONG:=26;
M:=9;
DIFF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:EMA(DIFF,M),COLORGREEN,LINETHICK2;
MACD:2*(DIFF-DEA),LINETHICK0;
STICKLINE(MACD>=0 AND MACD>=REF(MACD,1),0,MACD,2,1),COLORRED;
STICKLINE(MACD>=0 AND MACD STICKLINE(MACD<0 AND MACD>=REF(MACD,1),0,MACD,2,1),COLORYELLOW;
STICKLINE(MACD<0 AND MACD OBV:=DEA;
P:=10;
A1:=REF(OBV,P)=HHV(OBV,2*P+1);
B1:=FILTER(A1,P);
C1:=BACKSET(B1,P+1);
D1:=FILTER(C1,P);{高点}
A2:=REF(OBV,P)=LLV(OBV,2*P+1);
B2:=FILTER(A2,P);
C2:=BACKSET(B2,P+1);
D2:=FILTER(C2,P);{低点}
上:=REF(OBV,BARSLAST(D1)),COLORFF00FF,NODRAW;
下:=REF(OBV,BARSLAST(D2)),COLOR00FF00,NODRAW;
向上:=CROSS(OBV,上*1.01),NODRAW;
{www.gainiangu.com 概念股网_最新股票指标公式}
相对能量:(OBV-下)/(上-下)*100,COLORYELLOW,NODRAW;
R11:=BACKSET(ISLASTBAR,BARSLAST(D1)+1);
S11:=R11>REF(R11,1);
DRAWLINE(D1,OBV,S11,OBV,1),COLORYELLOW;
T11:=BACKSET(ISLASTBAR,BARSLAST(D2)+1);
U11:=T11>REF(T11,1);
DRAWLINE(D2,OBV,U11,OBV,1),COLOR00FF00;
STICKLINE(C>0,下,下,1,0),COLOR00FF00;
STICKLINE(C>0,上,上,1,0),COLORFF00FF;
DRAWTEXT(CROSS(OBV,上*1.01),上,上),COLORYELLOW;
DRAWTEXT(CROSS(下*0.99,OBV),下,下),COLORYELLOW;
DRAWICON(D1,OBV,1);
DRAWICON(D2,OBV,2);

 

0 0 0

数字时代的手工艺人

我要投稿

申明:本文为作者投稿或转载,在概念股网 http://www.gainiangu.com/ 上发表,为其独立观点。不代表本网立场,不代表本网赞同其观点,亦不对其真实性负责,投资决策请建立在独立思考之上。

< more >

ABCDEFGHIJKLMNOPQRSTUVWXYZ0-9
暂无相关概念股
暂无相关概念股
go top