黄龙帝国副图和选股(通达信公式 副图 选股 源码 测试图)

[复制链接]
查看29 | 回复0 | 2022-6-27 17:25:19 | 显示全部楼层 |阅读模式

 {黄龙帝国}

VAR1:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2));
VAR2:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);
VAR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR4:=REF(VAR2 OR VAR3,1) AND VAR1;
VAR5:=VAR4 AND CLOSE>OPEN;
VAR7:=IF(C>MA(C,4),1,0);
VAR8:=IF(C<MA(C,4),-1,0);
VAR9:=IF(MA(C,5)>REF(MA(C,5),1),1,0);
VAR10:=IF(MA(C,5)<REF(MA(C,5),1),-1,0);
VAR11:=VAR7+VAR8+VAR9+VAR10;
VAR12:=VAR11=2 AND C<O;
VAR13:= EMA((CLOSE*2+HIGH+LOW)/4,13)-EMA((CLOSE*2+HIGH+LOW)/4,73);
VAR14:=(CROSS(VAR13,EMA(VAR13,2)) AND VAR13<=0.05 AND (C/REF(C,1)>0.035));
VAR15:=VAR14 AND NOT(VAR12);
VAR16:=IF(C>MA(C,4),1,0)+IF(C<MA(C,4),-1,0)+IF(MA(C,5)>REF(MA(C,5),1),1,0)+IF(MA(C,5)<REF(MA(C,5),1),-1,0);
VAR17:=VAR16=-2 AND C>O;
VAR18:=VAR17;
VAR20:=VAR5 AND VAR18=0 AND VAR15=0;
VAR21:=(CLOSE/OPEN)>1.04 AND CLOSE<SMA(HIGH,19,3) AND C>REF(C,1) AND VAR18=0 AND VAR15=0;
VAR22:=REF(VAR1,1) AND VAR2 AND NOT(REF(C,3)=LLV(C,4));
MA30:=MA(C,30);
MA60:=MA(C,60);
MA120:=MA(C,120);
VAR23:=MA(REF(LLV(C,30),1),2);
VAR24:=MA(REF(HHV(C,30),1),2);
LC:=REF(C,1);
DT:=REF(C,1)/C>1.1;
ZT:=C>REF(C,1)*1.095 AND C=H;
VAR26:=BARSLASTCOUNT(DT)>=2;
VAR28:=C/REF(C,1)<=1.09 AND O=C AND H=L;
VAR29:=BARSLASTCOUNT(VAR28)>=2;
VAR31:=(MAX(C,O)-MIN(C,O))/MIN(C,O)*100;
VAR32:=(H-MAX(C,O))/MAX(C,O)*100;
VAR33:=(MIN(C,O)-L)/L*100;
VAR35:=(REF(MIN(C,O),1)-MAX(C,O))/MAX(C,O)*100;
VAR38:=(HHV(H,9)-LLV(C,9))/LLV(C,9)*100;
VAR39:=(HHV(H,7)-LLV(C,7))/LLV(C,7)*100;
VAR40:=MAX(MA30,MAX(MA60,MA120));
VAR41:=MIN(MA30,MIN(MA60,MA120));
VAR42:=IF(MA30<>VAR40 AND MA30<>VAR41,MA30,IF(MA60<>VAR40 AND MA60<>VAR41,MA60,MA120));
VAR43:=(VAR40-VAR41)/VAR41*100;
VAR44:=(VAR40-VAR42)/VAR42*100;
VAR46:=(VAR24-MAX(C,O))/MAX(C,O)*100;
VAR47:=(MIN(C,O)-VAR23)/VAR23*100;
VAR48:=(VAR40-C)/C*100;
VAR49:=MA120>MA60 AND MA60>MA30;
VAR50:=MA30>MA60 AND MA60>MA120;
VAR51:=MA30>REF(MA30,1) AND MA60>REF(MA60,1) AND MA120>=REF(MA120,1);
VAR52:=BARSLASTCOUNT(VAR24=REF(VAR24,1));
VAR53:=VAR52>=9;
VAR54:=BARSLASTCOUNT(VAR23=REF(VAR23,1));
VAR55:=VAR54>=4;
VAR56:=VAR54>=9;
VAR58:=VAR23<REF(VAR23,1);
VAR59:=ATAN((VAR23/REF(VAR23,1)-1)*100)*180/3.1416;
VAR60:=(REF(VAR23,1)-VAR23)/VAR23*100;
VAR61:=REF(VAR23,1)>REF(VAR23,2) AND VAR23<REF(VAR23,1);
VAR63:=C<OPEN AND VAR31>5.4 AND VAR35>4.5;
VAR64:=VAR22 AND VAR31>5.4 AND VAR35>3.5;
VAR65:=VAR22 AND VAR31>7.9 AND VAR35>0.9;
VAR66:=C<OPEN AND VAR31>8.4 AND VAR35>1.5;
VAR67:=VAR63 OR VAR64 OR VAR65 OR VAR66;
VAR68:=VAR12 AND VAR31>7;
VAR69:=C<OPEN AND VAR31>8;
VAR70:=(C<OPEN AND VAR31>5.4) OR (VAR22 AND VAR31>4) OR (REF(C<OPEN AND VAR31>4.5,1) AND VAR35>1.4) OR (C<OPEN AND VAR31>4 AND VAR35>3);
VAR71:=BARSLASTCOUNT(C<OPEN AND VAR31>1.9)=3 AND BARSLASTCOUNT(C<LC AND OPEN<REF(OPEN,1))>=2 AND COUNT(VAR22 AND VAR31>6,3)>=1 AND COUNT(VAR31>4.9,3)>=2;
VAR72:=BARSLASTCOUNT(C<OPEN AND VAR31>2.1)=3 AND BARSLASTCOUNT(C<LC AND OPEN<REF(OPEN,1))>=2 AND COUNT(VAR22 AND VAR31>4,3)>=1 AND COUNT(VAR31>4,3)>=2;
VAR73:=BARSLASTCOUNT(C<OPEN AND VAR31>2.7)=3 AND BARSLASTCOUNT(C<LC AND OPEN<REF(OPEN,1))>=2 AND COUNT(VAR22 AND VAR31>3.6,3)>=1;
VAR74:=VAR71 OR VAR72 OR VAR73;
VAR75:=C>OPEN OR (C>LC AND C=OPEN);
VAR76:=VAR70 AND REF(VAR75,1) AND OPEN<REF(H,1) AND REF(VAR75,2) AND OPEN<REF(H,2) AND COUNT(VAR20,3)>=1;
VAR77:=IF(VAR70 AND VAR76=0,1,0);
VAR79:=IF(COUNT(VAR69,9)>=1 AND VAR38<14,1,0);
VAR80:=BARSLASTCOUNT(C<OPEN AND VAR31>3.5)=3 AND BARSLASTCOUNT(C<LC AND OPEN<REF(OPEN,1))=2 AND COUNT(VAR77,3)>=2;
VAR81:=BARSLASTCOUNT(C<OPEN AND VAR31>1)>=5 AND BARSLASTCOUNT(OPEN<LC)>=4 AND COUNT(VAR35>2.5,5)>=2;
VAR82:=BARSLASTCOUNT(C<OPEN AND VAR31>0.3)>=5 AND BARSLASTCOUNT(C<LC AND OPEN<REF(OPEN,1))>=4 AND COUNT(VAR69,5)>=1;
VAR83:=VAR81 OR VAR82;
VAR84:=VAR32>7 AND VAR33<1.4 OR VAR32>VAR31*5.4 AND VAR32>VAR33*5.4;
VAR85:=REF(VAR84,1) AND REF(VAR31+VAR32,1)>VAR31*0.7 AND C>LC;
VAR86:=COUNT(VAR31>9 OR ZT OR DT,108)>=1;
VAR91:=REF(COUNT(C>OPEN,3)>=1,1);
VAR92:=C*1.021>HHV(C,4);
VAR93:=COUNT(VAR29 OR VAR68,15)=0 AND COUNT(VAR26 OR VAR35>4.9 OR VAR83 OR VAR67,9)=0 AND VAR79=0 AND COUNT(VAR74 OR VAR80,7)=0 AND COUNT(VAR35>2.4 OR VAR77 OR (VAR15 AND OPEN>C),4)=0;
VAR94:=C<VAR41;
VAR95:=VAR49 AND MA120<REF(MA120,1);
VAR96:=OPEN*1.01>=REF(MAX(C,OPEN),1);
VAR97:=VAR96 AND VAR58 AND VAR93 AND REF(C>OPEN AND VAR31>3.9,1)=0;
VAR98:=VAR31>3.6 AND VAR31<9 AND OPEN<VAR23*1.007 AND C>VAR23 AND VAR32<VAR31/2.1 AND VAR33<VAR31/2.1;
VAR99:=VAR98 AND REF(COUNT(C>LC,3)>=1,1) AND (VAR93 OR VAR85) AND VAR54<2 AND REF(BARSLASTCOUNT(VAR31<1.74)>=4,1)=0;
VAR100:=(VAR97 OR VAR99);
VAR101:=VAR21 AND VAR95 AND VAR86 AND VAR100 AND VAR94 AND VAR92 AND VAR91;
VAR106:=BARSLAST(VAR56);
VAR107:=REF(VAR23,VAR106);
VAR108:=REF(VAR107,VAR106-1);
VAR109:=VAR23 AND VAR56;
VAR110:=IF(VAR109>0,VAR23,0);
VAR111:=IF(VAR110>0,(VAR110-OPEN)/OPEN*100,(REF(VAR23,14)-OPEN)/OPEN*100);
VAR112:=(VAR108-VAR110)/VAR110*100;
VAR113:=VAR108>VAR110 AND VAR112>=9;
VAR114:=VAR112<9 AND VAR112>-9;
VAR115:=VAR108<VAR110 AND VAR112<=-9;
VAR117:=(VAR31>3.6 OR (C>OPEN AND VAR18 AND REF(VAR18,1))) AND OPEN<VAR23*1.007 AND C>VAR23 AND VAR32<VAR31/1.84 AND VAR33<VAR31/2.1;
VAR118:=REF(VAR54>=7,1) AND VAR59>-45 AND VAR59<-30 AND VAR60>0.9;
VAR119:=VAR21 AND VAR49 AND VAR117 AND VAR113 AND VAR118;
VAR120:=REF(VAR54>=9,1) AND VAR59>-45 AND VAR59<-30 AND VAR60>0.9;
VAR121:=VAR59<-45;
VAR122:=VAR120 OR VAR121;
VAR123:=VAR49 AND COUNT(VAR56,4)>=1 AND LLV(L,4)=LLV(L,72) AND (HHV(VAR23,4)-C)/C*100<15;
VAR124:=VAR21 AND VAR122 AND VAR117 AND VAR123;
VAR125:=VAR21 AND REF(VAR122 AND VAR117 AND VAR123,1);
VAR126:=BARSLASTCOUNT(VAR58)>=4 AND VAR59>-21 AND REF(VAR39<9,1) AND COUNT(VAR54>=4,9)>=1;
VAR127:=VAR21 AND VAR126;
VAR128:=VAR21 AND COUNT(VAR61,7) AND COUNT(VAR114,14) AND VAR117 AND VAR23=LLV(VAR23,81);
VAR129:=VAR119 OR VAR124 OR VAR125 OR VAR127 OR VAR128;
VAR130:=VAR96 AND (VAR31>3.6 AND VAR32<VAR31/1.84 AND VAR33<VAR31/2.1 AND REF(MAX(OPEN,C)<VAR23,1) AND MIN(OPEN,C)>VAR23 OR REF(VAR117,1));
VAR131:=BARSLASTCOUNT(VAR58)>=4 AND VAR59<-45 AND VAR111<30 AND (VAR113 OR VAR114) AND COUNT(VAR54>=4,9)>=1 AND REF(VAR54>=4,2);
VAR132:=VAR21 AND
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则