两个通达信公式
1、首板涨停股
A1:=IF(CODELIKE('300,688'),C/REF(C,1)>=1.192 AND C=H,C/REF(C,1)>1.092 AND C=H);{涨停}
A2:=COUNT(A1,3)=1{3天内只有一次涨停};
A4:=COUNT(A1,1)=1{最近一次涨停};
A3:=DYNAINFO(17)>0;
XG:A1 AND A2 AND A3 AND A4;
2、一阳穿三线
A:=MA(C,5);
B:=MA(C,10);
D:=MA(C,20);
S1:=DYNAINFO(8)>0;
S2:=C > DYNAINFO(11);
XG:A > B AND B >D AND C>A AND S1 AND S2;
3、均线粘合向上发散源码
A5:=MA(C,5);
A13:=MA(C,13);
A24:=MA(C,24);
A55:=MA(C,55);
均线粘合:=COUNT(MAX(MAX(A5,A13),A24)/MIN(MIN(A5,A13),A24)<1.03,5)>=5;
向上突破:=A5>REF(A5,1)AND A13>REF(A13,1)AND A24>REF(A24,1)AND C>A5 AND C>A24;
成交量突破:=V/MA(V,5)>1.5 AND MA(V,5)>MA(V,13);
A1:=A13>A24 AND A24>A55 AND A55>=REF(A55,1);
XG: 均线粘合 AND 向上突破 AND 成交量突破 AND A1;
MA5:=MA(C,5);
MA10:=MA(C,10);
MA20:=MA(C,20);
MA30:=MA(C,30);
MAX_MA:=MAX(MA5,MAX(MA10,MAX(MA20,MA30)));
MIN_MA:=MIN(MA5,MIN(MA10,MIN(MA20,MA30)));
粘合度:=(MAX_MA-MIN_MA)/MIN_MA*100;
角度MA5:=ATAN((MA5/REF(MA5,1)-1)*100)*180/3.1416;
角度MA10:=ATAN((MA10/REF(MA10,1)-1)*100)*180/3.1416;
角度MA20:=ATAN((MA20/REF(MA20,1)-1)*100)*180/3.1416;
角度MA30:=ATAN((MA30/REF(MA30,1)-1)*100)*180/3.1416;
X1:=粘合度<=5;
X2:=角度MA5>0 AND 角度MA10>0 AND 角度MA20>0;
X3:=C>MA5 AND MA5>MA10 AND MA10>MA20 AND V/MA(V,5)>1.5;
XG:X1 AND X2 AND X3;