股票-通达信统一MACD指标公式.docx
通达信统一MACD指标公式_正点财经KJ:=IF(DJ=5ORDJ=-55ORDJ=-25ORDJ=35,5,IF(DJ=-15ORDJ=-45ORDJ=15ORDJ=45,15,IF(LLV(DJ,80)=0ANDSJ1=0,240,IF(DJ=0ORDJ=-30ORDJ=30)ANDSJ13ANDSJ2=0,30,IF(LLV(DJ,3)=1ORHHV(DJ,3)=1,1,60);DIF:(EMA(CLOSE,SH)-EMA(CLOSE,LO)/EMA(CLOSE,LO)*1000,COLORGREEN;DEA:EMA(DIF,M);MACD:(DIF-DEA)*2,COLORSTICK;JB:=(LO-SH)*KJ/(14*240);BD:=(MACD-LLV(REF(MACD,1),2)/ABS(REF(DIF,1)/2;该期增减:IF(BD10,10,IF(BD-10,-10,BD),LINETHICK0;L1:IF(DA=1ANDDIF0,PLOYLINE(DIF0,DIF),DRAWNULL),COLORWHITE;L2:IF(DA=1ANDDIF10*JB,PLOYLINE(DIF10*JB,DIF),DRAWNULL),COLORRED;L3:IF(DA=1ANDDIF50*JB,PLOYLINE(DIF50*JB,DIF),DRAWNULL),COLORMAGENTA;MD:=MAX(MAX(DIF,DEA),MACD);MX:=MIN(MIN(DIF,DEA),MACD);MDC:=HHV(MD,50);MXC:=LLV(MX,50);DX:=MDC-MXC;YS:=IF(DIF50*JB,强得发紫,IF(DIF10*JBANDDIF50*JB,多头区,IF(DIF0ANDDIF10*JB,多头观望,IF(DIF0,空头区,DRAWNULL);DRAWTEXT(DA=1ANDCURRBARSCOUNT=1ANDDIF50*JB,MXC+0.6*DX,YS),COLORMAGENTA;DRAWTEXT(DA=1ANDCURRBARSCOUNT=1ANDDIF10*JBANDDIF50*JB,MXC+0.6*DX,YS),COLORRED;DRAWTEXT(DA=1ANDCURRBARSCOUNT=1ANDDIF0ANDDIF10*JB,MXC+0.6*DX,YS),COLORWHITE;DRAWTEXT(DA=1ANDCURRBARSCOUNT=1ANDDIF0,MXC+0.6*DX,YS),COLORGREEN;DRAWTEXT(DA=1ANDDIF0ANDDIFDEAANDCURRBARSCOUNT=1,MXC+0.5*DX,上升通道持续(参数周期)DRAWTEXT(DA=1ANDDIF0ANDDIFDEAANDCURRBARSCOUNT=1,MXC+0.5*DX,上升通道趋缓(参数周期)DRAWTEXT(DA=1ANDDIF0ANDDIFDEAANDCURRBARSCOUNT=1,MXC+0.5*DX,下降通道趋缓(参数周期)DRAWTEXT(CURRBARSCOUNT=1,MXC+0.8*DX,MACD庞辉V2.0大众版请阅用法注释),COLORMAGENTA;DRAWTEXT(CURRBARSCOUNT=1,MXC+0.4*DX,SHOP34328852.TAOBAO.COM),COLORMAGENTA;DRAWTEXT(CURRBARSCOUNT=1ANDMACD=LLV(REF(MACD,1),2),MXC+0.6*DX,增强),COLORRED;DRAWTEXT(CURRBARSCOUNT=1ANDMACDLLV(REF(MACD,1),2),MXC+0.6*DX,减弱),COLORGREEN;通达信统一MACD指标公式实例图解:通达信统一MACD指标公式