DIFF:EMA(CLOSE,12)-EMA(CLOSE,26); DEA:EMA(DIFF,9); MACD:=2*(DIFF-DEA); DRAWBAND(DIFF,RGB(90,236,58),DEA,RGB(142,20,251)); 低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1; STICKLINE(低位金叉,DEA*0.86,DEA*0.66,4,0),COLORYELLOW; DRAWTEXT(低位金叉,DEA*1.2,' 金叉'),COLORYELLOW; JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0)); 二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1; STICKLINE(二次金叉,DEA*0.96,DEA*0.76,4,0),COLORFF00FF; DRAWICON(二次金叉,DEA*1.1,1) ; DRAWTEXT(二次金叉,DEA*1.35,' 二叉'),COLORFF00FF; B1:=BARSLAST(REF(CROSS(DIFF,DEA),1)); 底背離:=REF(CLOSE,B1+1)>CLOSE AND DIFF>REF(DIFF,B1+1) AND CROSS(DIFF,DEA); STICKLINE(底背離,DEA*1.09,DEA*0.86,4,0),COLOR00FF00; DRAWLINE(B1=0,DEA,底背離,DEA,0),COLORRED,LINETHICK1; DRAWTEXT(底背離,DEA*1.5,' 底背'),COLOR6600FF; B2:=BARSLAST(REF(CROSS(DEA,DIFF),1)); 頂背離:=REF(CLOSE,B2+1)<CLOSE AND REF(DIFF,B2+1)>DIFF AND CROSS(DEA,DIFF); DRAWLINE(B2=0,DEA,頂背離,DEA,0),COLORGREEN,LINETHICK1; DRAWTEXT(頂背離,DEA*1.2,' 頂背'),COLOR00FF00; 中線:=0; MA5:=MA(C,5); MA10:=MA(C,10); 均線差:MA5-MA10,COLORSTICK,COLORLIBLUE; JC:=MA10-MA5; 綠柱面積:IF (均線差<0,SUM(均線差*0.1,BARSLAST(JC<0)),0),COLORRED,NODRAW; 紅柱面積:IF (均線差>0,SUM(均線差*0.1,BARSLAST(JC>0)),0),COLORFF00FF,NODRAW; A1:=IF(均線差>0,1,-1); A2:=REF(A1,1); A3:=A1*A2; A4:=BARSLAST(A3<0); A5:=A4+1; 趨勢平均力度:(SUM(均線差,0)-REF(SUM(均線差,0),A5))/A5,COLORYELLOW,NODRAW; 時間:(A4+1)/100,LINETHICK0; |
|
來自: zhongguocaicgc > 《股票公式》