通达信分时MACD指标公式

[复制链接]
查看250 | 回复0 | 2021-8-21 01:00:44 | 显示全部楼层 |阅读模式

DIFF:(EMA(CLOSE,12) - EMA(CLOSE,26));
DEA:EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
DRAWBAND(DIFF,RGB(100,300,150),DEA,RGB(100,100,300));
STICKLINE(MACD>0,0,MACD,0,1),COLORF00FF0;
STICKLINE(MACD<0,0,MACD,0,1),COLOR00FF00;
VARX1:=HHV(DEA,43);
VARX2:=LLV(DEA,43);
VARX3:=DEA-(DIFF-DEA);
高点线:IF(DIFF>VARX1 AND DEA=VARX1,MAX(LLV(VARX1,10),VARX3),VARX1),COLORGREEN,LINETHICK1;
低点线:IF(DIFF<VARX2 AND DEA=VARX2,MIN(HHV(VARX2,10),VARX3),VARX2),COLORGREEN,LINETHICK1;
VL:=REF(LOW,1);
VAR12:=(SMA(ABS(LOW-VL),13,1))/(SMA(MAX(LOW-VL,0),13,1))*100;
VAR14:=MA(VAR12,13);
VAR15:=LLV(LOW,34);
VAR18:=EMA(IF(LOW<=VAR15,VAR14,0),3);
VAR110:=SMA(SMA((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100,7,1),5,1);
VAR111:=SMA((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100,8,1)*15-VAR110*10.38;
T:=FILTER(IF(VAR111<=VAR110 AND VAR18>0,VAR18*8,0),5);
止跌:DRAWTEXT(T AND DIFF<低点线,DEA*1.01,'止跌'),COLORYELLOW;

202108201933.jpg

202108201933.jpg

 

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则