以下是通达信判断个股及大盘趋势源码
V1:=(C*2+H+L)/4*10;
V2:=EMA(V1,13)-EMA(V1,34);
V3:=EMA(V2,5);
V4:=(V2-V3)*11;
V8:=(INDEXC*2+INDEXH+INDEXL)/4;
V9:=EMA(V8,13)-EMA(V8,34);
VA:=EMA(V9,3);
VB:=(V9-VA)/2;
A1:=EMA(C,13);
A2:=EMA(CLOSE,34);
A3:=EMA(CLOSE,55);
A4:=EMA(CLOSE,89);
A5:=EMA(CLOSE,144);
A6:=EMA(CLOSE,233);
粘:=MAX(EMA(C,13),MAX(EMA(C,34),EMA(C,55)))/MIN(EMA(C,13),MIN(EMA(C,34),EMA(C,55)))<1.03;
LIANGBI:=EVERY(RANGE(MA(V,5)/MA(V,20),0.8,1.20),5);
金叉:=CROSS(A1,A2) OR A1>REF(A1,1);
多排:=A2>A3 AND A3>A4 AND A4>A5 AND A5>A6;
好:= 粘 AND 金叉 AND 多排 AND LIANGBI;
个股:IF(V4>=0,V4,0);
大盘:IF(VB>=0,VB,0);
IF(大盘>0,大盘,DRAWNULL),COLORMAGENTA,LINETHICK2;{粉}
IF(个股>0,个股,DRAWNULL),COLORCC3299,LINETHICK1;
区间:=REF(C,1)/REF(C,3)<1.15 AND REF(C,1)/REF(C,4)<1.2
AND REF(C,1)/REF(C,5)<1.25 AND REF(C,1)/REF(C,6)<1.3;
买:=个股>0 AND 大盘>0 AND 区间;
新趋:=买 AND 好;
DRAWICON(新趋,15,9);
评论(0)