通达信夹心MACD指标(源码)
DIFF : EMA(CLOSE,12) - EMA(CLOSE,26);
DEA : EMA(DIFF,9);
MACD : 2*(DIFF-DEA), COLORSTICK;
VAR1:=HHV(DEA,53);
VAR2:=LLV(DEA,55);
VAR3:=DEA-(DIFF-DEA);
UP:IF(DIFF>VAR1 AND DEA=VAR1,MAX(LLV(VAR1,10),VAR3),VAR1),COLORBB0000,LINETHICK2;
DN:IF(DIFF<VAR2 AND DEA=VAR2,MIN(HHV(VAR2,10),VAR3),VAR2),COLORAA00AA,LINETHICK2;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
{抢钱:IF(底背离,0.1,0),LINETHICK3,COLORRED;}
DRAWTEXT(底背离,0.1,'←抢钱啦'),COLORWHITE;
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
DRAWTEXT(顶背离,0.1,'←逃命啦'),COLORWHITE;
{低吸:=0.82*MA(FORCAST(CLOSE,2),40),COLORF7E300;
A:DYNAINFO(3)>L AND 低吸>L;}
D1:=EMA(C,3)-EMA(C,8);
D2:=EMA(O,3)-EMA(O,8);
D3:=EMA(L,3)-EMA(L,8);
D4:=EMA(H,3)-EMA(H,8);
A11:=(D1+D2+D3+D4)/4;
股价轨迹:A11,COLORGREEN,LINETHICK2;
- 上一篇公式:通达信强弱看盘主图指标(源码)
- 下一篇公式:通达信精进终极主图指标(源码)