今天看啥  ›  专栏  ›  定锚

MACD实战量化交易指标(KDJ)

定锚  · 公众号  ·  · 2024-08-09 00:00
    

文章预览

多空分界:MA(C,50),POINTDOT,COLORFFCC00,LINETHICK3; IF(多空分界>REF(多空分界,1),多空分界,DRAWNULL),COLORMAGENTA,POINTDOT,LINETHICK3; SHORT:=12;LONG:=26;M:=9; DIF:=EMA(CLOSE,SHORT) - EMA(CLOSE,LONG); DEA:=EMA(DIF,M); MACD:=2*(DIF-DEA); KK:=IF(DIF>DEA,5,-5); JCSC:=(M-1)/(M+1)*DEA/(1-2/(M+1));{计算出金叉死叉时的DIFF值} DD:=(MACD/2+(DEA*(M-1)/(M+1)))/(1-2/(M+1));{计算出明日MACD=MACD时的DIFF值} DIF拐头价:=(DIF*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)* EMA(C,LONG))/(2*((LONG+1)-(SHORT+1)))COLORCYAN,LINETHICK1; 金死叉价:=(JCSC*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)* EMA(C,LONG))/(2*((LONG+1)-(SHORT+1))),NODRAW; 柱变向价:=(DD*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)* EMA(C,LONG))/(2*((LONG+1)-(SHORT+1))),COLORWHITE,DOTLINE; 当日柱变临界:=(((M+1)*(2*REF(DEA,1)*(M-1)+REF(MACD,1)*(M+1)))/(2*(M+1)*(M-1))+ (REF(EMA(C,26),1)*(26-1)/(26+1))-(REF(EMA(C,12),1)*(12-1 ………………………………

原文地址:访问原文地址
快照地址: 访问文章快照
总结与预览地址:访问总结与预览