通达信1HONRI源码,组合了几位老师的杰作
{牛牛指标网提供:www.tdx001.com}
复制内容到剪贴板
- 1HONRI源码:
- Var1:=MA(CLOSE,152);
- Var2:=MA(CLOSE,194);
- Var3:=Var2+2*STD(CLOSE,170);
- Var4:=Var1+2*STD(CLOSE,170);
- 顶部区域:(CLOSE>Var3)*130;
- 冲顶:(CLOSE>Var4)*100,LINETHICK2,COLORRED;
- Var6:=EMA(HHV(HIGH,500),21);
- Var7:=EMA(HHV(HIGH,250),21);
- Var8:=EMA(HHV(HIGH,90),21);
- Var9:=EMA(LLV(LOW,500),21);
- VarA:=EMA(LLV(LOW,250),21);
- VarB:=EMA(LLV(LOW,90),21);
- VarC:=EMA((Var9*0.96+VarA*0.96+VarB*0.96+Var6*0.558+Var7*0.558+Var8*0.558)/6,21);
- VarD:=EMA((Var9*1.25+VarA*1.23+VarB*1.2+Var6*0.55+Var7*0.55+Var8*0.65)/6,21);
- VarE:=EMA((Var9*1.3+VarA*1.3+VarB*1.3+Var6*0.68+Var7*0.68+Var8*0.68)/6,21);
- VarF:=EMA((VarC*3+VarD*2+VarE)/6*1.738,21);
- Var10:=REF(LOW,1);
- Var11:=SMA(ABS(LOW-Var10),3,1)/SMA(MAX(LOW-Var10,0),3,1)*100;
- Var12:=EMA(IF(CLOSE*1.35<=VarF,Var11*10,Var11/10),3);
- Var13:=LLV(LOW,30);
- Var14:=HHV(Var12,30);
- Var15:=IF(MA(CLOSE,58),1,0);
- Var16:=EMA(IF(LOW<=Var13,(Var12+Var14*2)/2,0),3)/618*Var15;
- Var17:=IF(Var16>50,50,Var16)/3.82*6;
- 底部吸筹:STICKLINE(Var17>0,0,Var17,4,1),colormagenta ;
- Var18:=HHV(HIGH,30);
- Var19:=LLV(LOW,30);
- 能量: EMA((CLOSE-Var19)/(Var18-Var19)*100,5)/8*10,colorred ;
- 趋势线:EMA((CLOSE-Var13)/(Var18-Var13)*100,5)/8*10,colorred;
- Var20:=VOL/FINANCE(7);
- Var21:=100*WINNER(CLOSE);
- Var22:=MA(Var21,3);
- Var23:=MA(Var20,34);
- Var24:=Var22<Var23*100 AND Var21<Var20;
- Var25:=SUM(IF(CLOSE>REF(CLOSE,1),1,0),0);
- Var26:=SUMBARS(VOL,CAPITAL);
- Var27:=IF(CLOSE>LLV(CLOSE,Var26),1,-1)*IF(Var25>LLV(Var25,Var26),1,-1);
- Var28:=COUNT(IF(Var27=-1,1,0)=1,8)>2;
- Var29:=(CLOSE-DMA((3*HIGH+LOW+OPEN+2*CLOSE)/7,VOL/(SUM(AMOUNT,13)/(AMOUNT/VOL/100)/100)))/DMA((3*HIGH+LOW+OPEN+2*CLOSE)/7,VOL/(SUM(AMOUNT,13)/(AMOUNT/VOL/100)/100))*100<-18;
- Var2A:=(CLOSE-MIN(REF(CLOSE,5)*0.865,REF(CLOSE,21)*0.772))/CLOSE<0.01;
- Var2B:=Var28 AND Var29 AND Var2A;
- Var2C:=VOL/CAPITAL>=0.02 AND VOL/CAPITAL<=0.2 AND OPEN=1.105;
- Var2D:=Var2C AND COUNT(Var2C,5)=1;
- Var2E:=Var2B OR Var2C;
- Var2F:=REF(CLOSE,1);
- Var30:=SMA(MAX(CLOSE-Var2F,0),7,1)/SMA(ABS(CLOSE-Var2F),7,1)*100;
- Var31:=SMA(MAX(CLOSE-Var2F,0),13,1)/SMA(ABS(CLOSE-Var2F),13,1)*100;
- Var32:=Var30<20 AND Var31<25;
- Var34:=SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE<REF(CLOSE,1),0-VOL,0)),0);
- Var35:=IF(CLOSE>LLV(CLOSE,Var26),1,-1);
- Var36:=IF(Var34>LLV(Var34,Var26),1,-1);
- Var37:=Var35*Var36;
- Var38:=IF(Var37=-1,1,0);
- Var39:=Var38 AND CLOSE=LLV(CLOSE,120) AND Var21<Var20;
- DRAWTEXT(FILTER(Var24 AND Var2E AND Var32 OR Var32 AND Var39,1),Var2*4-13,'抄底'),colorgreen;
- STICKLINE(IF(Var24 AND Var2E AND Var32 OR Var32 AND Var39,35,0),0,Var2*4-4,15,0);
- Var3B:=(CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100;
- Var3C:=SMA(Var3B,3,1);
- Var3D:=SMA(Var3C,3,1);
- Var3E:=SMA(Var3D,3,1);
- Var3F:=CROSS(Var3D,Var3E) AND Var3D<20;
- Var40:=CROSS(Var3E,Var3D) AND Var3D>80;
- DRAWTEXT(CROSS(5,能量),10,'底部'),colorwhite ;
- Var42:="RSI#WEEK"(12,12,12);
- Var43:="RSI#WEEK"(55,55,55);
- DRAWTEXT(CROSS(5,趋势线),10,'底部'),colorwhite ;
- Var44:=REF(CLOSE,1);
- Var45:=SMA(MAX(CLOSE-Var44,0),6,1)/SMA(ABS(CLOSE-Var44),6,1)*100;
- Var46:=FILTER(Var40,5)=1 AND BARSLAST(CROSS(Var42,Var43) AND Var42<=60)>=20;
- STICKLINE(CROSS(Var42,Var43) AND Var42<=60,0,Var2*10+5,9,0),colorgreen;
- DRAWTEXT(CROSS(Var42,Var43) AND Var42<=60,(Var2*10+3)/2,'加仓'),colorgreen;
- STICKLINE(CROSS(84,Var45),0,80,5,1),colorblue;
- STICKLINE(Var46,Var2*10+10,80,6,0.3),colorblue ;
- DRAWTEXT(CROSS(84,Var45),90,'逃顶'),colorred;
- Var55:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,5);
- Var56:=INDEXC;
- Var57:=MA(Var56,5);
- Var58:=MA(Var56,20);
- Var5B:=Var57>Var56*1.03 AND Var58>Var56*1.13;
- Var5D:=IF(FILTER(Var55<6,5)=1,1,0);
- Var5F:=Var55<6 AND Var5B;
- Var60:=IF(FILTER(Var5F,1)=1,1,0)*80;
- Var61:=Var5F AND Var5D*80;
- Var7B:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0);
- Var7C:=IF(EMA(CLOSE,5)/EMA(EMA(CLOSE,9),16)<=0.85 AND CLOSE/REF(CLOSE,1)>0.905 AND CLOSE/REF(CLOSE,1)<1.05 AND VOL/CAPITAL*100<5,50,0);
- Var7D:=(-100)*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34))+100;
- Var7E:=(-100)*(HHV(HIGH,50)-CLOSE)/(HHV(HIGH,50)-LLV(LOW,50))+100;
- Var7F:=(-100)*(HHV(HIGH,70)-CLOSE)/(HHV(HIGH,70)-LLV(LOW,70))+100;
- Var80:=((CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*100+10)*5;
- Var81:=((CLOSE-MA(CLOSE,50))/MA(CLOSE,50)*100+10)*5;
- Var82:=((CLOSE-MA(CLOSE,70))/MA(CLOSE,70)*100+10)*5;
- Var83:=(Var7D+Var7E+Var7F+Var80+Var81+Var82)/6;
- Var85:=ABS(Var80-Var82);
- Var86:=(Var83+Var85)/2;
- Var87:=(-1)*(EMA(100*(1-WINNER(CLOSE)),1)-50)+50;
- Var88:=Var87+Var86;
- Var89:=IF(Var7C>0 AND Var88<0,200,0);
- Var8A:=IF(Var86<0 AND CLOSE=LLV(CLOSE,5) AND CLOSE/REF(CLOSE,1)>0.905 AND CLOSE/REF(CLOSE,1)<1.05 AND VOL/CAPITAL*100<5,-50,0);
- Var8B:=IF(Var88<0 AND Var8A=-50,100,0);
- Var8D:=REF(CLOSE,2)*0.865;
- Var8E:=REF(CLOSE,13)*0.772;
- Var8F:=MIN(Var8D,Var8E);
- Var90:=100*VOL/CAPITAL;
- Var92:=IF((CLOSE-Var8F)/CLOSE<0.03 AND SUM(Var90,5)/5<1.8,1,0);
- Var96:=(Var89>0 AND Var8B>0 AND SUM(VOL/CAPITAL*100,5)/5<1 OR Var92>0) AND (Var8A<0 OR Var7C>0);
- Var97:=Var89>0 AND Var8B>0 AND SUM(VOL/CAPITAL*100,5)/5<1 OR Var92>0 AND REF(CLOSE,1)/REF(CLOSE,2)>0.902;
- Var98:=Var96 OR Var97;
- VarA4:=AMOUNT/VOL/100;
- VarA5:=(3*HIGH+LOW+OPEN+2*CLOSE)/7;
- VarA7:=SUM(AMOUNT,13)/VarA4/100;
- VarAE:=DMA(VarA5,VOL/VarA7);
- VarB1:=MA(HHV(HIGH,488),18);
- VarB2:=MA(HHV(HIGH,220),18);
- VarB3:=MA(HHV(HIGH,98),18);
- VarB4:=MA(LLV(LOW,488),18);
- VarB5:=MA(LLV(LOW,220),18);
- VarB6:=MA(LLV(LOW,98),18);
- VarB7:=MA((VarB4*0.96+VarB5*0.96+VarB6*0.96+VarB1*0.558+VarB2*0.558+VarB3*0.558)/6,18);
- VarB8:=MA((VarB4*1.25+VarB5*1.23+VarB6*1.2+VarB1*0.55+VarB2*0.55+VarB3*0.65)/6,18);
- VarB9:=MA((VarB4*1.3+VarB5*1.3+VarB6*1.3+VarB1*0.68+VarB2*0.68+VarB3*0.68)/6,18);
- VarBA:=MA((VarB7*3+VarB8*2+VarB9)/6*1.738,18);
- VarBE:=SMA(ABS(L-Var10),3,1)/SMA(MAX(L-Var10,0),3,1)*100;
- VarBF:=MA(IF(CLOSE*1.35,VarBE*10,VarBE/10),3);
- VarC1:=HHV(VarBF,30);
- VarC2:=IF(LOW<=Var13,(VarBF+VarC1*2)/2,0);
- 抄底:(MA(VarC2 AND CLOSE<COST(1),3) AND (CLOSE-VarAE)/VarAE*100<-11)*118,colorblue;
- STICKLINE(Var7B>0,0,100,4,0);
- STICKLINE(Var60>0,0,100,8,0),colorred;
- DRAWTEXT(Var61 OR Var98,70,'获利');
- DRAWTEXT(Var60>0,50,'发现');
- DRAWTEXT(Var7B>0,100,'探底'),coloryellow;
- DRAWTEXT(抄底,80,'★'),colorred ;
- STICKLINE(Var61,0,80,8,0);
- STICKLINE(Var98,0,80,8,0),colorwhite ;
- VarA1:=17;
- VarbB1:=IF(1<=0,VarA1,VarA1*0);
- VarcC1:=LOW;
- VarDd1:=REF(LOW,1);
- VarEe1:=SMA(ABS(VarCc1-VarDd1),3,1)/SMA(MAX(VarCc1-VarDd1,0),3,1)*100;
- VarFf1:=MA(IF(CLOSE*1.35<=VarBb1,VarEe1*10,VarEe1/10),3);
- Var10a:=LLV(LOW,30);
- Var11a:=HHV(VarF,30);
- Var12a:=1;
- IF(0<=Var12a,MA(IF(LOW<=Var10a,(VarF+Var11a*2)/2,0),3),0);
- Y1:=LLV(L,17);
- Y2:=SMA(ABS(L-REF(L,1)),17,1);
- Y3:=SMA(MAX(L-REF(L,1),0),17,2);
- Q:=-(EMA(IF(L<=Y1,Y2/Y3,-3),1));
- STICKLINE(CROSS(Q,0),15,0,4,0), , COLORYELLOW;
- 拉升: IF(CROSS(Q,0),1,0),COLORYELLOW;
- 个股:EMA(100*(C-LLV(LOW,34))/(HHV(H,34)-LLV(LOW,34)),3),color00ff00;
- 黑马:if(cross(个股,9),50,0),stick,linethick3,color00ff00;
- drawtext(cross(个股,9),40,'黑马!'),color00ff00;
- Var1a:=EMA(CLOSE,3);
- Var2a1:=EMA(CLOSE,21);
- Var3a:=BARSLAST(CROSS(Var2a1,Var1a))>15;
- Var4a:=VOL>MA(VOL,5)*2 AND VOL<MA(VOL,5)*5;
- Var5a:=CROSS(Var1a,Var2a1) AND ISUP AND Var4a AND Var3a;
- n:=5;
- var1f:4*SMA((CLOSE-LLV(LOW,n))/(HHV(HIGH,n)-LLV(LOW,n))*100,5,1)-
- 3*SMA(SMA((CLOSE-LLV(LOW,n))/(HHV(HIGH,n)-LLV(LOW,n))*100,5,1),3,1),coloryellow,linethick0;
- var2ff:8,colorgreen,linethick0;
- 买底: IF(CROSS(var1f,var2ff),88,0),STICK,COLOR0000cc,linethick2;
- 跟庄: IF(var1f<=8,28,0),STICK,colorwhite,linethick2;
- DRAWTEXT(CROSS(var1f,var2ff),88,'买底'),COLOR00ffff;
- Varo5:=LLV(LOW,27);
- Varo6:=HHV(HIGH,34);
- Varo7:=EMA((CLOSE-Varo5)/(Varo6-Varo5)*4,4)*25;
- 建仓区: IF((Varo7<10),77,100) ,color00ccff,linethick1;
- 0,linethick2 ,colorffcc00;
黑马=50,拉升=1,探底=75,抄底=118,买底=88共5个选股。
CA71422890.png
|