DIF:100*(EMA(CLOSE,12)-EMA(CLOSE,26)),COLORRED;DEA:EMA(DIF,9);MACD:(DIF-DEA)*2,COLORSTICK;死叉:=CROSS(DEA,DIF);N1:BARSLAST(死叉),NODRAW;N2:REF(BARSLAST(死叉),N1+1),NODRAW;N3:REF(BARSLAST(死叉),N2+N1+2),NODRAW;CL1:=LLV(C,N1+1),NODRAW;DIFL1:=LLV(DIF,N1+1),NODRAW;CL2:=REF(CL1,N1+1),NODRAW;DIFL2:=REF(DIFL1,N1+1),NODRAW;CL3:=REF(CL2,N1+1),NODRAW;DIFL3:=REF(DIFL2,N1+1),NODRAW;PDIFL2:=IF(DIFL2>0,INTPART(LOG10(DIFL2))-1,INTPART(LOG10(-1*DIFL2))-1);MDIFL2:=INTPART(DIFL2/POW(10,PDIFL2));PDIFL3:=IF(DIFL3>0,INTPART(LOG10(DIFL3))-1,INTPART(LOG10(-1*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<CL3)AND(MDIFB3>MDIFL3)AND(MACD<0ANDREF(MACD,1)<0)ANDMDIFB3<=REF(MDIFB3,1);B:直接底背离OR隔峰底背离,NODRAW;BG:((MDIFB2>REF(MDIFB2,1))*REF(直接底背离,1))OR((MDIFB3>REF(MDIFB3,1))*REF(隔峰底背离,1)),NODRAW;底背离消失:=(REF(直接底背离,1)ANDDIFL1<=DIFL2)OR(REF(隔峰底背离,1)ANDDIFL1<=DIFL3);STICKLINE(BORBG,DIF,DEA,2,1),REEN;DRAWTEXT((BANDCOUNT(B,2)=1),(DIF*),'钝化'),COLORYELLOW;DRAWTEXT(FILTER(BG,10),DIF*,'底部结构'),COLORMAGENTA;DRAWTEXT(FILTER(BG,10)ANDMACD<=0,DIF*,'MACD<0,成功率高'),COLORMAGENTA;DRAWTEXT(FILTER(底背离消失,10),(DIF+MACD),'消失'),REEN;STICKLINE(BG,0,DIF+DEA,2,0),COLORRED;金叉:=CROSS(DIF,DEA);M1:=BARSLAST(金叉),NODRAW;M2:=REF(BARSLAST(金叉),M1+1),NODRAW;M3:=REF(BARSLAST(金叉),M2
文华财经指标公式期货软件指标公式赢顺云指标期货趋势多空 来自淘豆网m.daumloan.com转载请标明出处.