通达信指标公式源码短线进出指标
N:=20;
N1:=7;
N2:=69;
T1:=IF((DATE <=1341231),1,0);
M3:=EMA(CLOSE,3);
VAR2:=(CLOSE+HIGH+LOW)/(3);
VAR3:=(EMA(VAR2,10))*(T1);
VAR4:=(REF(VAR3,1))*(T1);
VAR5:=((REF(HIGH,1)+REF(LOW,1))/(2))*(T1);
VAR6:=MA(CLOSE,N)+((2)*(STD(CLOSE,N)))*(T1);
VAR7:=REF(CLOSE,1);
VAR8:=((SMA(MAX(CLOSE-VAR7,0),N1,1))/(SMA(ABS(CLOSE-VAR7),N1,1)))*(100);
VAR9:=CROSS(N2,VAR8);
VARA:=(FILTER(VAR9,4))*(T1);
STICKLINE((VAR3 > VAR4),VAR3,VAR4,4,0),COLOR00FFFF;
STICKLINE((VAR3 < VAR4),VAR3,VAR4,4,0),COLORFF0000;
DRAWTEXT(CROSS(VAR3,VAR4),(VAR3)*(0.98),'进'),COLOR00FFFF;
DRAWTEXT(CROSS(VAR5,VAR6),(HIGH)*(1.004),'险'),COLOR008000;
DRAWTEXT(VARA,(HIGH)*(1.004),'出'),COLORFFFFFF;
{
(20*VAR1+19*REF(VAR1,1)+18*REF(VAR1,2)+17*REF(VAR1,3)+16*REF(VAR1,4)+15*REF(VAR1,5)+14*REF(VAR1,6)+13*REF(VAR1,7)+12*REF(VAR1,8)+
11*REF(VAR1,9)+10*REF(VAR1,10)+9*REF(VAR1,11)+8*REF(VAR1,12)+7*REF(VAR1,13)+6*REF(VAR1,14)+5*REF(VAR1,15)+4*REF(VAR1,16)+3*REF(VAR1,17)+2*REF(VAR1,18)+REF(VAR1,20))/210,COLORRED,LINETHICK2;
B:MA(A,6),COLORGREEN,LINETHICK2;
DRAWBAND(A,RGB(240,140,240),B,RGB(255,255,0));
趋势:EMA(C,55),LINETHICK2;
}
风险提示:本指标公式仅作为知识分享,不构成任何投资建议,不作投资依据。