通达信整合的MACD副图源码

 2023-07-22 11:52:33    通达信指标网  

MAV:=(C*2+H+L)/4;   

SK:=EMA(MAV,5)-EMA(MAV,22);   

SD:=EMA(SK,5);   

资金动能:(2*(SK-SD))*3.8,VOLSTICK;   

资金动能支撑1:EMA(资金动能,4),COLORYELDIF:EMA(CLOSE,5)-EMA(CLOSE,11);    

DEA:EMA(DIF,5);   

MACD:(DIF-DEA)*2,COLORSTICK;   

IF(DIF<REF(DIF,1),DIF,DRAWNULL),COLORGREEN,LINETHICK1;   

IF(DIF>=REF(DIF,1),DIF,DRAWNULL),COLORRED,LINETHICK2;   

A1:=BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1));   

B1:=REF(C,A1+1)> C AND REF("MACD.DIF",A1+1)<"MACD.DIF" AND CROSS   

  

("MACD.DIF","MACD.DEA");   

DRAWICON(B1>0,DIF*1.21,1);{底背离}   

C1:=BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1));   

D1:=REF(C,C1+1)<C AND REF("MACD.DIF",C1+1)> "MACD.DIF" AND CROSS   

  

("MACD.DEA","MACD.DIF");   

DRAWICON(D1>0,DEA*1.21,2);{顶背离};   

DRAWICON(CROSS(MACD,0),0,1);   

DRAWICON(CROSS(0,MACD),0.2,2);   

DRAWICON(CROSS(DIF,DEA),DIF,1),COLORRED;   

DRAWICON(CROSS(DEA,DIF),DEA,2),COLORGREEN;  LOW;   

  •  标签:  

原文链接:https://www.tdxzb.com/?id=1494

本文版权:如无特别标注,本站文章均为原创。

相关文章

服务热线

18020657357

微信客服

微信客服