改进版趋势平均力度 通达信副图指标 源码 贴图 显示背驰面积顶底背离
{趋势平均力度改进版}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) ;{www.9m8.cn 九毛八公式指标网}
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;{www.9m8.cn 九毛八公式指标网}
绿柱面积: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
A5:=A4+1;
趋势平均力度:(SUM(均线差,0)-REF(SUM(均线差,0),A5))/A5,COLORYELLOW,NODRAW;
时间:(A4+1)/100,LINETHICK0;