通达信【启动拉升】副图指标 附使用方法 源码
"启动"、"拉升"是两个单独的信号,没有连接性;当"主力线"上穿"散户线",出"红钻石"启动信号,不管是出现启动还是拉升信号后,红色主力线向上运行时持有;绿色散户线向上运行时卖出。
做一个"启动拉升"同时出现的指标;
MA6:=MA(CLOSE,6);
MA18:=MA(CLOSE,18);
散户线:(3)*(MA18) - (2)*(MA6),LINETHICK2,COLORGREEN;
主力线:(3)*(MA6) - (2)*(MA18),LINETHICK2,COLORRED;
M1:SUM((EMA((CLOSE + LOW)/(2),2))/(2.98),3),POINTDOT,COLORFFFFFF;
M2:EMA(M1,21),COLORFF00FF;
M30:MA(CLOSE,30),LINETHICK1,COLORFF0000;
ABC1:=(2)*(MA((LLV((CLOSE + LOW)/(2),8))*(1.1),13)) - EMA((CLOSE + LOW)/(2),3) - ((CLOSE + LOW)/(2))*(0.1);
ABC2:=IF(((EMA((CLOSE + LOW)/(2),3) - ABC1)*(5) > 0),(POW((EMA((CLOSE + LOW)/(2),3) - ABC1)*(5),2))/(10),(((-1))*(POW((EMA((CLOSE + LOW)/(2),3) - ABC1)*(5),2)))/(10));
ABC3:=IF((ABC2 > 0),ABC2 - 0,(-1));
STICKLINE(CROSS(ABC3,0) AND ((CLOSE + LOW)/(2) > MA((CLOSE + LOW)/(2),8)),(LOW)*(0.99),(LOW)*(0.95),4,0),COLORYELLOW;
DRAWTEXT(CROSS(ABC3,0) AND ((CLOSE+LOW)/(2)>MA((CLOSE+LOW)/(2),8)),(M30),' 拉升'),LINETHICK2,COLORFF00FF;
N:=5;
UABC1:4*SMA((C-LLV(L,N))/(HHV(H,N)-LLV(L,N))*100,5,1)-
3*SMA(SMA((C-LLV(L,N))/(HHV(H,N)-LLV(L,N))*100,5,1),3.2,1),COLORYELLOW,NODRAW;
UABC2:8,COLORGREEN,NODRAW;
DRAWICON(CROSS(主力线,散户线),散户线*1.002,25);