以下是通达信指标条件选股公式源码2
{日月}
GJTJ1:=100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5));
GJTJ2:=100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10));
GJTJ3:=100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20));
GJTJ4:=100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30));
A:=BARSLAST(CROSS(97,GJTJ1))<= 1 AND BARSLAST(CROSS(GJTJ1,85))<= 1;
B:=BARSLAST(CROSS(97,GJTJ2))<= 1 AND BARSLAST(CROSS(GJTJ2,85))<= 1;
A1:=A AND B;
AA:=BARSLAST(CROSS(97,GJTJ1))<= 2 AND BARSLAST(CROSS(GJTJ1,85))<= 1;
BA:=BARSLAST(CROSS(97,GJTJ2))<= 2 AND BARSLAST(CROSS(GJTJ2,85))<= 1;
A2:=AA AND BA ;
AAA:=BARSLAST(CROSS(97,GJTJ1))<= 3 AND BARSLAST(CROSS(GJTJ1,85))<= 1;
BAA:=BARSLAST(CROSS(97,GJTJ2))<= 3 AND BARSLAST(CROSS(GJTJ2,85))<= 1;
A3:=AAA AND BAA ;
B1:=REF(A1,1);
B2:=REF(A2,1);
B3:=REF(A3,1);
D1:=GJTJ1= 100 AND GJTJ2= 100 AND A1 ;
D2:=GJTJ1= 100 AND GJTJ2= 100 AND A2 ;
D3:=GJTJ1= 100 AND GJTJ2= 100 AND A3 ;
ENTERLONG:D1 OR D2 OR D3;
==============================
{天瀑}
GJTJ1:=100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5));
GJTJ2:=100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10));
GJTJ3:=100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20));
GJTJ4:=100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30));
XG:=BARSLAST(CROSS(GJTJ4,GJTJ1))< 5 AND GJTJ1> GJTJ4;
ENTERLONG:COUNT(XG,3)= 1 AND XG;
=======================
{必涨选股}
VARE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
VAR10:=(HIGH+LOW+CLOSE)/3;
VAR11:=(VAR10-MA(VAR10,14))/(0.015*AVEDEV(VAR10,14));
VAR12:=(VAR10-MA(VAR10,70))/(0.015*AVEDEV(VAR10,70));
VAR13:=IF(VAR11>= 150 AND VAR11< 200 AND VAR12>= 150 AND VAR12< 200,10,0);
VAR14:=IF(VAR11<= -150="" and="" var11=""> -200 AND VAR12<= -150="" and="" var12=""> -200,-10,VAR13);
VAR15:=(CLOSE-MA(CLOSE,11))/MA(CLOSE,11)*100;
VAR16:=100-ABS(VAR15);
VAR17:=IF(VAR16<90,VAR16,100);
VAR1A:=IF(VARE> 0,VARE,0);
VAR1B:=IF(VAR12>= 200 AND VAR11>= 150,15,IF(VAR12<= -200 AND VAR11<= -150,-15,VAR14))+60;
VAR1C:=VAR1A> 48 AND VAR1B> 60 AND VAR17< 100;
出现必大涨:(VAR1C AND COUNT(VAR1C,30)= 1);
=======================================
{搜索低点}
VAR1:=CLOSE<= OPEN;
VAR2:=CLOSE> OPEN;
VAR3:=DMA(EMA(CLOSE,12),SUM(VOL,5)/3/CAPITAL);
VAR4:=(CLOSE-VAR3)/VAR3*100;
Var5:=REF(Var4,1)< -32 AND Var4> REF(Var4,1) AND REF(Var4,1)< REF(Var4,2) AND Var4-REF(Var4,1)> 2.5 AND REF(Var4,2)-REF(Var4,1)> 1;
VAR6:=VAR2 AND REF(VAR1,1) AND REF(VAR1,2) AND REF(VAR1,3) AND REF(VAR1,4) AND REF(VAR1,5) AND REF(VAR2,6) AND HIGH< 2.5 AND VAR4-REF(VAR4,1)> 2 AND (REF(HIGH,1)-REF(CLOSE,2))/REF(CLOSE,2)< 0.05 AND (REF(HIGH,4)-REF(CLOSE,5))/REF(CLOSE,5)< 0.05 AND (REF(HIGH,2)-REF(CLOSE,3))/REF(CLOSE,3)< 0.05 AND (REF(HIGH,3)-REF(CLOSE,4))/REF(CLOSE,4)< 0.05 AND COUNT(INDEXC> INDEXO,6)> 1;
VAR5 OR VAR6;
============================
{踏浪共振}
VAR1:=CLOSE/REF(CLOSE,1)>= 1.09 AND HIGH/CLOSE< 1.005 AND MA(CLOSE,90)/CLOSE>= 1.1;
VAR1 AND COUNT(VAR1,20)= 1;
===========================
{寂寞赢利}
VAR1:=MA(CLOSE,5);
VAR2:=MA(CLOSE,35);
VAR3:=VAR1-VAR2;
VAR4:=IF(VAR3> 0,VAR3,0);
VAR5:=IF(VAR3< 0,VAR3,0);
VAR6:=SMA(VAR4,34,1);
VAR7:=SMA(VAR5,34,1);
VAR8:=IF(VAR4>= VAR6 OR VAR5<= VAR7,VAR3,0);
CROSS(VAR8,0.01);
=============================
{蚂蝗盯盯}
VAR1:=EMA(CLOSE,12)-EMA(CLOSE,26);
VAR2:=EMA(VAR1,9);
CROSS(VAR1,VAR2) AND REF(CLOSE,2)/REF(OPEN,2)< 0.95 AND REF(OPEN,1)< 0.03 AND CLOSE/OPEN> 1.05 AND CLOSE> REF(CLOSE,2);
============================
{黑马显形}
{N=5,M1=2,M2=2,M3=3}
VAR1:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;
VAR2:=SMA(VAR1,5,1);
VAR3:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
VAR4:=SMA(VAR3,2,1);
VAR5:=MA(VOL/CAPITAL,30)*MA(VOL,60)/10000+MA(CLOSE,30)*8;
VAR6:=MA(VOL/CAPITAL,30)*MA(VOL,60)/10000+MA(CLOSE,30);
VAR2> 80 AND CAPITAL<= 1500000="" and=""> 120 AND VOL/CAPITAL> 0.04 AND VOL> REF(HHV(VOL,10),1)*2;
============================
{遍地黄金}
{N=9,M1=3,M2=3,M3=3}
REF(CLOSE,2)/REF(OPEN,2)< 0.98 AND REF(OPEN,1)< 0.04 AND CLOSE/OPEN> 1.06 AND CLOSE> REF(CLOSE,2);
============================
{多头市场}
VAR1:=MA(VOL,5);
VAR2:=REF(VAR1,1);
VOL/VAR2> 2 AND VOL/CAPITAL*100> 2 AND CLOSE/OPEN> 1.08 AND HIGH/LOW< CLOSE/OPEN+0.01;
============================
{不宜割肉}
GJTJ1:=100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5));
GJTJ2:=100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10));
GJTJ3:=100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20));
GJTJ4:=100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30));
A:=BARSLAST(CROSS(30,GJTJ1))< 2 AND BARSLAST(CROSS(GJTJ1,50))< 2;
B:=BARSLAST(CROSS(GJTJ4,GJTJ1))< 2 AND GJTJ1> GJTJ4;
E:=GJTJ1> 60 AND GJTJ4> 70;
ENTERLONG:A AND B AND E;
============================
{铂金选股}
GJTJ1:=100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5));
GJTJ2:=100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10));
GJTJ3:=100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20));
GJTJ4:=100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30));
A:=BARSLAST(CROSS(50,GJTJ1))< 3 AND BARSLAST(CROSS(GJTJ1,50))< 3;
B:=BARSLAST(CROSS(GJTJ4,GJTJ1))< 2 AND GJTJ1> GJTJ4;
ENTERLONG:A AND B;
===============================
{资金流入}
GJTJ1:=100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5));
GJTJ2:=100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10));
GJTJ3:=100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20));
GJTJ4:=100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30));
XG:=BARSLAST(CROSS(GJTJ4,GJTJ1))< 5 AND GJTJ1> GJTJ4;
ENTERLONG:COUNT(XG,3)=1 AND XG;
=================================
{短线出击}
DYNAINFO(14)> -0.02 AND CAPITAL< 5000000 AND DYNAINFO(26)/DYNAINFO(32)> 2 AND DYNAINFO(27)/DYNAINFO(33)> 2 AND DYNAINFO(41)/DYNAINFO(43)> 2 AND DYNAINFO(48)/DYNAINFO(50)> 2 AND DYNAINFO(26)> 1000 AND DYNAINFO(27)> 1000 AND DYNAINFO(41)> 1000 AND DYNAINFO(48)> 1000;
================================
{银边选股}
TJ_5:=100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5));
TJ_10:=100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10));
TJ_20:=100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20));
TJ_30:=100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30));
(TJ_5=100 AND REF(TJ_5,2)= 100 AND REF(TJ_5,1)= 100 AND TJ_10= 100 AND TJ_20= 100 AND TJ_30= 100 AND REF(TJ_10,2)< 100 AND REF(TJ_20,2)< 100 AND REF(TJ_30,2)< 100) OR (TJ_5= 100 AND REF(TJ_5,3)= 100 AND REF(TJ_5,2)= 100 AND REF(TJ_5,1)= 100 AND TJ_10= 100 AND TJ_20= 100 AND TJ_30= 100 AND REF(TJ_10,3)< 100 AND REF(TJ_20,3)< 100 AND REF(TJ_30,3)< 100);
评论(0)