资源描述:
《MACD交易系统通达信指标公式源码》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、1IMIFB000r0MT6000Xgi®T2MJ)CXF>6«DfA■〔MACD£为SWItt35ftl妙tl谒材&5H・N分tt対甘"60射8QUKt尺《■多>If?«xMlnothiF.fitfM
2、fi>Z26.r5?次』,)U42X^tTi八卫23刼1041MHM1主淹紋比wettf»9i^i.iu»A9het^Rs*tf4e»z*n»ttA・«hbmMm.m$81•股价高于平均线,视为强势;股价低于平均线,视为弱势2.平均线向上涨升,具有助涨力道;平均线向下跌降,具有助跌力道;3•二条以上平均线向上交叉时,买进;4•二条以上平均线向下交叉时,卖出;5•移动平均线的信号经常落后股价,若
3、以EXPMA、VMA辅助,可以改善。总涨跌比:=DYNAINFO(60)/(DYNAINFO(60)+DYNAINFO(61))*100,COLORCYAN,NODRAW;DRAWTEXT_FIX(lz0.2z0.0z0,STRCAT(,总涨跌比:'ZCON2STR(总涨跌比,2))),COLORCYAN;DRAWTEXT_FIX(ISLASTBARz0.005,0,0zSTRCATC±营同比::CON2STR(FINANCE(44),2))),COLORGREEN;DRAWTEXT_FIX(ISLASTBARO005,0・06OSTRCAT(‘利润同比::CON2STR(FINANCE(43
4、),2))),COLORGREEN;SBL:=STRCAT(STRCAT(STRCAT(HYBLOCK,DYBLOCK)zGNBLOCK),ZDBLOCK);DRAWTEXT_FIX(l,0.4,0OSBL),COL0R0090FF;DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);DEA:=EMA(DIF,M);MACD:=2*(DIF-DEA);KK:=IF(DIF>DEA,5z-5);JCSC:=(M-l)/(M+l)*DEA/(l-2/(M+l));{计算出金叉死叉时的DIFF值}DD:=(MACD/2+(DEA*(M-l)/(M+l)))/(l-2/(M+l
5、));{计算出明日MACD=MACD时的DIFF值}DIF拐头价:(DIF*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(CZSHORT)+(SHORT+1)*(LONG-1)*EMA(CZLONG))/(2*((LONG+1)-(SHORT+1))兀OLORGREEN丄INETHICK1,POINTDOT;金死叉价:(JCSC*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1)))ZNODRAW;
6、柱变向价:=(DD*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG・1)*EMA(C丄ONG))/(2*((LONG+1)・(SHORT+1))),COLORYELLOW,POINTDOT;黄铢消失见顶:=IF(柱变向价>=DIF拐头价,柱变向价ZDRAWNULL),COLORYELLOW,CIRCLEDOT,LINETHICK1;拐头价:IF(DIF拐头价v柱变向价,DIF拐头价,DRAWNULL),COLORRED丄INETHICK4;DRAWNUMBER(DIF7、CROSS(DEA,DIF))+1),COLORCYAN,NODRAW;DRAWNUMBER(DIF>DEA,DIF拐头价,BARSLAST(CROSS(DIF,DEA))+1),COLORWHITE,NODRAW;ZJ:拐头价,COLOROOOOFF;日丫:=金死叉价ZCOLORFFOOFF;IF(ZJ>REF(ZJ,1),ZJ,DRAWNULL),COLORRED,LINETHICK2;IF(ZJ[REF(HY,1),HY,DRAWNULL),COLORMAGENTA丄INETHICK2,N]
8、ODRAW;IF(HY[ZJANDC>O,H,Cz0,0),COLORRED;STICKLINE(C>ZJANDC>0,LZ0,0,0),COLORRED;STICKLINE(C>ZJANDC>O,OZC,2.8Z1),COLORRED;STICKLINE(C>ZJANDC]