通达信副图获利出局公式源码
A1:=(HIGH+LOW+CLOSE*2)/4;
A2:=EMA(A1,10);
A3:=STD(A1,10);
A4:=(A1-A2)*100/A3;
A5:=EMA(A4,5);
涨:=EMA(A5,10)+100/2-5,COLORYELLOW,LINETHICK2;
多:IF(涨>0,涨,0),COLORRED,LINESTICK;
空:IF(涨<0,ABS(涨),0),COLORGREEN,LINESTICK;
跌:ABS(EMA(涨,4)),COLORGREEN,LINETHICK2;
获利了结:IF(涨>150,130,150),COLORCYAN,LINETHICK2;
出局:IF(涨>170,150,180),COLORYELLOW,LINETHICK2;
DRAWICON(CROSS(多,跌),多,1);
DRAWICON(CROSS(跌,多),跌,2);
DRAWTEXT(涨>150 AND REF(涨,1)<150,105,'获利'),COLORYELLOW;
DRAWTEXT(涨>150 AND REF(涨,1)<150,85,'了结'),COLORYELLOW;
V1:=(C+H+L)/3;
V2:=MA(V1,2);
V3:=MA(V1,5);
N1:=BARSLAST(CROSS(V2,V3));
N2:=BARSLAST(CROSS(V3,V2));
N:=IF(N1<N2,N1+1,0-N2-1);
STICKLINE(N>0,0,0+N,10,1),COLORRED;
STICKLINE(N<0,0,0-N,10,1),COLORCYAN;
赞 (0)