最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 通达信特色MACD指标公式

    正文概述    2024-05-04 04:17:05  
    input:N1(13,1,1000,1),N2(34,1,1000,1),N3(144,1,1000,1); OBV:SUM(IF(ISUP,VOL,IF(ISDOWN,-VOL,0)),0),layer1; {Q6:=ATAN((ma5/REF(ma5,1)-1)*100)*180/3.1416;} MAOBV1:MA(OBV,N1),layer1; MAOBV2:MA(OBV,N2),layer1; DIF:EMA(CLOSE,12)-EMA(CLOSE,26);DEA:EMA(DIF,9);MACD:(DIF-DEA)*2COLORSTICK;TJ:=MACD T:=MACD A:=LLV(MACD,50)=MACD;DRAWICON(AANDFILTERX(A,20),MACD,1);DRAWTEXT(BARSLAST(TJ)=1,MACD,'1'),COLORYELLOW;DRAWTEXT(BARSLAST(TJ)=2,MACD,'2'),COLORYELLOW;DRAWTEXT(BARSLAST(TJ)=3,MACD,'3'),COLORYELLOW;DRAWTEXT(BARSLAST(TJ)=5,MACD,'5'),COLORYELLOW;DRAWTEXT(BARSLAST(TJ)=8,MACD,'8'),COLORYELLOW;DRAWTEXT(BARSLAST(TJ)=13,MACD,'13'),COLORYELLOW;DRAWTEXT(BARSLAST(TJ)=21,MACD,'21'),COLORYELLOW;DRAWTEXT(BARSLAST(TJ)=34,MACD,'34'),COLORYELLOW;DRAWTEXT(BARSLAST(TJ)=55,MACD,'55'),COLORYELLOW;DRAWTEXT(BARSLAST(T)=1,MACD,'1'),COLORGREEN;DRAWTEXT(BARSLAST(T)=2,MACD,'2'),COLORGREEN;DRAWTEXT(BARSLAST(T)=3,MACD,'3'),COLORGREEN;DRAWTEXT(BARSLAST(T)=5,MACD,'5'),COLORGREEN;DRAWTEXT(BARSLAST(T)=8,MACD,'8'),COLORGREEN;DRAWTEXT(BARSLAST(T)=13,MACD,'13'),COLORGREEN;DRAWTEXT(BARSLAST(T)=21,MACD,'21'),COLORGREEN;DRAWTEXT(BARSLAST(T)=34,MACD,'34'),COLORGREEN;DRAWTEXT(BARSLAST(T)=55,MACD,'55'),COLORGREEN; 新高:OBV=HHV(OBV,N3),LINETHICK0; 新高1:OBV=HHV(OBV,N2),LINETHICK0; 新高2:OBV=HHV(OBV,N1),LINETHICK0; FILLRGN(OBV,MAOBV1, OBV MAOBV1and(NOT(新高)andNOT(新高1)andNOT(新高2)),RGB(88,0,0), OBV MAOBV1and(NOT(新高)andNOT(新高1)and新高2),RGB(88,88,88), OBV MAOBV1and(NOT(新高)and新高1),RGB(255,88,0), OBV MAOBV1and(新高),RGB(255,0,0), OBV MAOBV1,RGB(0,255,0)),layer2; DIF:=100*(EMA(CLOSE,12)-EMA(CLOSE,26));DEA:=EMA(DIF,9);死叉:=CROSS(DEA,DIF);N1:=BARSLAST(死叉);{最近一次死叉的位置}N2:=REF(BARSLAST(死叉),N1+1);{倒数第二次死叉与倒数第一次死叉的区间}N3:=REF(BARSLAST(死叉),N2+N1+2);{倒数第三次死叉与倒数第二次死叉的区间}CL1:=LLV(C,N1+1);{最近一次死叉后,最低收盘价}DIFL1:=LLV(DIF,N1+1);CL2:=REF(CL1,N1+1);{倒数第二次死叉与倒数第一次死叉之间的最低收盘价}DIFL2:=REF(DIFL1,N1+1);CL3:=REF(CL2,N1+1);{倒数第三次死叉与倒数第二次死叉之间的最低收盘价}DIFL3:=REF(DIFL2,N1+1);PDIFL2:=IF(DIFL2 0,INTPART(LOG(DIFL2))-1,INTPART(LOG(-DIFL2))-1);MDIFL2:=INTPART(DIFL2/POW(10,PDIFL2));PDIFL3:=IF(DIFL3 0,INTPART(LOG(DIFL3))-1,INTPART(LOG(-DIFL3))-1);MDIFL3:=INTPART(DIFL3/POW(10,PDIFL3));MDIFB2:=INTPART(DIF/POW(10,PDIFL2));MDIFB3:=INTPART(DIF/POW(10,PDIFL3));直接底:=(CL1 CL2)AND(MDIFB2 MDIFL2)AND(MACD 0ANDREF(macd,1) 0)ANDMDIFB2 =REF(MDIFB2,1);隔峰底背离:=(CL1 CL3ANDCL3 CL2)AND(MDIFB3 MDIFL3)AND(MACD 0ANDREF(MACD,1) 0)ANDMDIFB3 =REF(MDIFB3,1);底部钝化:直接底背离OR隔峰底背离;

    公式解读:

    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 通达信特色MACD指标公式 加入收藏