SHORT:=12;
LONG:=26;
M:=9;
DIFF:EMA(CLOSE,Short) - EMA(CLOSE,Long);
DEA:EMA(DIFF,M);
MACD:2*(DIFF-DEA),COLORSTICK;
MACDHS:=IF(MACD>0 AND MACD>REF(MACD,1),MACD,0);
MACDHX:=IF(MACD>0 AND MACDMACDLX:=IF(MACD<0 AND MACDMACDLS:=IF(MACD<0 AND MACD>REF(MACD,1),MACD,0);
红柱面积:=IF(MACD>0,SUM(MACD,BARSLAST(MACD<0)),0),PRECIS2,COLOR0000FF;
绿柱面积:=IF(MACD<0,SUM(MACD,BARSLAST(MACD>0)),0),PRECIS2,COLOR006000;
//MACD面积:IF(MACD<0,ABS(绿柱面积),ABS(红柱面积)),NODRAW;
DRAWTEXT(REF(MACD,1)>0 AND MACD<=0 ,HHV(MACD,4),TOSTRING(REF(红柱面积,1),3)),colorred;
DRAWTEXT(REF(MACD,1)<0 AND MACD>=0 ,LLV(MACD,4),TOSTRING(REF(ABS(绿柱面积),1),3)),Color00ff00;
DRAWTEXT(ISNULL(REFX(&CLOSE,1))=1 AND MACD<0,LLV(MACD,4),TOSTRING(ABS(绿柱面积),3)),Color004A00;
DRAWTEXT(ISNULL(REFX(&CLOSE,1))=1 AND MACD>0,HHV(MACD,4),TOSTRING(ABS(红柱面积),3)),colorred;
DIFF : EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);
DEA : EMA(DIFF,M);
MACD : 2*(DIFF-DEA);
gj:=MAX(C,O);
STICKLINE(MACD>0 AND MACD>=REF(MACD,1),0,MACD,2,0),color0000ff;
STICKLINE(MACD>0 AND MACDSTICKLINE(MACD<0 AND MACD>=REF(MACD,1),0,MACD,2,0),colorff00ff;
STICKLINE(MACD<0 AND MACDL4:=LLV(gj,4);
jl:=(HHV(diff,55)-LLV(diff,55))/5;
gt:=dea>REF(dea,1) AND REF(dea,1)A1:=BARSLAST(REF(gt,1));
底背离:=REF(L4,A1+1)>CLOSE AND diff>REF(diff,A1+1) AND gt;
DRAWLINE(A1=0,DEA,底背离,REF(DEA,A1),0),colorred,LINETHICK2;
DRAWLINE(底背离,DEA,底背离,REF(DEA,A1),0),colorred,LINETHICK2;
DRAWTEXT(底背离,REF(DEA,A1)*1.18,' 底背离'),COLORFF00FF;
H4:=HHV(gj,4);
gt2:=deaREF(dea,2);
A2:=BARSLAST(REF(gt2,1));
顶背离:= REF(H4,A2+1)DRAWLINE(A2=0 ,DEA,顶背离,REF(DEA,A2),0),colorgreen,LINETHICK2;
DRAWLINE(顶背离,DEA,顶背离,REF(DEA,A2),0),colorgreen,LINETHICK2;
DRAWTEXT(顶背离,REF(DEA,A2)*1.18,' 顶背离'),colorgreen;
TT:=(2*CLOSE+OPEN+HIGH+LOW);
主导动能:TT/EMA(TT,4)-1,COLORSTICK;
FF:=主导动能;
STICKLINE(FF>0,0,FF,8,0),COLOR33CFDD;
STICKLINE(FF>0 AND FF>REF(FF,1),0,FF,8,0),COLOR0000CC;
STICKLINE(FF<=0,0,FF,8,0),COLOR00CC00;
STICKLINE(FF<=0 AND FF>REF(FF,1),0,FF,8,0),COLORFF9900;
做多主导:IFF(FF>0 AND FF>REF(FF,1),FF,0),NODRAW,COLOR0000CC;
获利回吐:IFF(FF>0 AND FF<=REF(FF,1),FF,0),NODRAW,COLOR33CFDD;
做空主导:IFF(FF<=0 AND FF<=REF(FF,1),FF,0),NODRAW,COLOR00CC00;
空头回补:IFF(FF<=0 AND FF>REF(FF,1),FF,0),NODRAW,COLORFF9900;
DIFF :=EMA(CLOSE,12) - EMA(CLOSE,26),colorwhite;
DEA :=EMA(DIFF,9),coloryellow;
MACD:=2*(DIFF-DEA);
Zero :0;
gj:=MAX(C,O);
STICKLINE(MACD>0 AND MACD>=REF(MACD,1),0,MACD,10,0),color0000ff;
STICKLINE(MACD>0 AND MACDSTICKLINE(MACD<0 AND MACD>=REF(MACD,1),0,MACD,10,0),colorff00ff;
STICKLINE(MACD<0 AND MACD
Copyright 2018- www.dyjian.com/ 大宇股票知识网 海口美兰韩哲棚百货商行 版权所有 琼ICP备2023001966号
免责声名:本站所发表的内容仅用于学术交流和学习,内容所带来的一切后果均与本站无关。若您发现本站存在您非授权的原创作品,请第一时间联系本站删除!