牛启动预警源码

[复制链接]
查看105 | 回复0 | 2022-7-24 07:21:04 | 显示全部楼层 |阅读模式

牛启动预警源码

源码:
 VAR0:=(2*CLOSE+HIGH+LOW)/4;
 VAR1:=(HHV(HIGH,24)-CLOSE)/(HHV(HIGH,24)-LLV(LOW,24))*100;
 VAR2:=(CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100;
 B0:=EMA((VAR0-LLV(LOW,26))/(HHV(HIGH,34)-LLV(LOW,26))*100,16);
 AA:SMA(SMA(VAR2,2,1)+3,2,1),COLORRED,LINETHICK1;
浮筹:=EMA(B0,4),LINETHICK1,DOTLINE,COLORYELLOW;
 BB:SMA(VAR1,3,1),COLORGREEN,LINETHICK1;
 {背景}
STICKLINE(AA>BB,6,90,5,0),COLOR000044;
 STICKLINE(BB>AA,6,90,5,0),COLOR422D00;
多方:SMA(SMA(VAR2,2,1)+3,2,1),COLOR0000FF,LINETHICK2;
空方:SMA(VAR1,3,1),COLORFFFF00,LINETHICK1,DOTLINE;
强势线:90,COLORMAGENTA,DOTLINE;
中轴线: 50,COLOR0080FF,DOTLINE;
弱势线:10,COLORLICYAN,DOTLINE;
 STICKLINE(多方>强势线,多方,强势线,1,0),COLOR0000FF;
 STICKLINE(多方<弱势线,多方,弱势线,1,0),COLOR0000FF;
 STICKLINE(空方<弱势线,空方,弱势线,1,0),COLORGREEN;
 STICKLINE(空方>强势线,空方,强势线,1,0),COLORGREEN;

 LC:= REF(C,1);
 
VAR02:=REF(LOW,1);
 VAR3:=SMA(ABS(LOW-VAR02),13,1)/SMA(MAX(LOW-VAR02,0),13,1)*100;
 VAR4:=EMA(IF(CLOSE*1.2,VAR3*13,VAR3/13),13);
 VAR5:=LLV(LOW,34);
 VAR6:=HHV(VAR4,34);
 VAR7:=IF(LLV(LOW,56),1,0);
 VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7;
 VAR9:=EMA(CLOSE,5);
 VAR10:=(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*(-10);
 VAR11:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7*(-1);
 VAR12:=EMA(CLOSE,5)*(-1);
 力度:=VAR10*5, COLORWHITE,LINETHICK2;
 XL1:=MA(LOW,2)*0.96;
 XL2:=MA(LOW,26)*0.85;
 XL3:=REF(XL1,1)<XL2 AND REF(XL1,1)<XL1 AND REF(XL1,1)<REF(XL1,2);
 
WR1:=-120*(HHV(HIGH,40)-CLOSE)/(HHV(HIGH,40)-LLV(LOW,40)),COLORGREEN;
 超跌:=(CLOSE-MA(CLOSE,40))/MA(CLOSE,60)*100*1.1;
 买:力度>7 AND 超跌<-15.5 AND WR1<-100,COLOR3535FF,STICK,LINETHICK1;
 DRAWTEXT(买>0,0.0,'买'),COLORFFFFFF;
 DRAWICON(买>0,买,1 );
 
{私募顶底}
趋势:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);
见底:=10;
见顶:=90;
短期底部:=CROSS(趋势,见底),COLORRED;
 STICKLINE(短期底部,4,40,1,0),COLORRED;
 DRAWTEXT(CROSS(趋势,见底),40,'底');
短期顶部:=CROSS(见顶,趋势),COLORGREEN;
 STICKLINE(短期顶部,4,40,1,0),COLORGREEN;
 DRAWTEXT(CROSS(见顶,趋势),40,'顶'),COLORYELLOW;
 RSVV:=(CLOSE-LLV(LOW,10))/(HHV(HIGH,10)-LLV(LOW,10))*100;
 VARB2:=(RSVV/2+22)*1;
 量:=EMA(VOL,13);
 资金:=EMA(AMOUNT,13);
 过滤:=((资金 /量) / 100);
 提纯:=(((CLOSE -过滤) / 过滤) * 100);
 黄金:=((提纯 < (0)) AND ZXNH),COLORRED,NODRAW;
 
低进:IF(黄金 AND RSVV<VARB2-2,28,0),STICK,COLOR464646;
 DRAWTEXT(低进>0,0.99,'低进'),COLORFFFFFF;
 DRAWICON(低进>0,低进,1 );
 STICKLINE(低进,0,2,0,9),COLOR0000FF;
 
小股民:= EMA(((2*CLOSE+HIGH+LOW)/4-LLV(LOW,5))/(HHV(HIGH,4)-LLV(LOW,5))*100,4);
庄家:= EMA(0.667*REF(小股民,1)+0.333*小股民,2);
高出:100*(CROSS(庄家,小股民) AND 小股民>50),COLOR333333,STICK,LINETHICK1;
DRAWTEXT(高出>0,0.99,'高出'),COLORFFFF00;
 
DRAWICON(高出>0,高出,2 );
 STICKLINE(高出,0,2,0,1),COLOR0000FF,NODRAW;
 A1:=(C-REF(C,1))/REF(C,1)*100;
 MA5:=BARSLAST(A1>3);
 Z1:=MA(C,13);
 ZX:=REF(Z1,13/2+1);
 MA20:=IF(MA5>0,1,0);
 底:CROSS(C,ZX) AND MA20=0,COLOR464646,STICK,LINETHICK1;
 
DRAWICON(底>0,底,1 );
 STICKLINE(底,0,2,0,9),COLOR0000FF;
 主力资金:EMA(100*(C-LLV(LOW,34))/(HHV(H,34)-LLV(LOW,34)),3),
 
COLORRED,LINETHICK1,NODRAW;
 
即将爆发线: 65,COLOR00FF00,NODRAW;
 
爆发线:80,COLORWHITE,LINETHICK1,NODRAW;
 
DRAWTEXT(CROSS(主力资金,爆发线),主力资金,'爆发') ,COLORYELLOW;
 
爆发警戒线: 50,COLOR00FF00,NODRAW;
 
抄底线:20,COLORWHITE,LINETHICK2,NODRAW;
 
DRAWTEXT(CROSS(主力资金,爆发警戒线),主力资金,'加') ,COLORWHITE;
 
DRAWTEXT(CROSS(主力资金,即将爆发线),主力资金,'加') ,COLORWHITE;
 
AA05:=MA(C,5);
 五日乖离率:=(C-AA05)/AA05*100;
 AA30:=MA(C,30);
 三拾日乖离率:=(C-AA30)/AA30*100;
 MR:=COUNT(CROSS(五日乖离率,0),3)>=1 AND 三拾日乖离率>REF(三拾日乖离率,1) AND AA05>REF(AA05,1) AND (C/REF(C,1)-1)*100>5 AND REF(C,1)<AA30;
 翻倍:IF(FILTER(MR,10),1,0)STICK,COLOR464646;
 DRAWTEXT(翻倍>0,0.1,'  翻倍'),COLORFFFFFF;
 DRAWICON(翻倍>0,翻倍,1 );
 DIF:=EMA(DCLOSE,12)-EMA(DCLOSE,26);
 DEA:=EMA(DIF,9);
 AAA:=(DIF-DEA)*2*60;
 启动:CROSS(AAA-REF(AAA,1),15),STICK,COLOR464646;
 DRAWTEXT(启动>0,0.0,'  牛启动'),COLORFFFFFF;
 DRAWICON(启动>0,启动,1 );
 

736277527.png

736277527.png

注意:发现未来函数DCLOSE!

XG:SUM(FL1,10);这个是发出信号的条件  意思是10日FL1条件的累和

 

FL1:=V=HHV(V,30) AND V!=HHV(V,60) AND V!=HHV(V,120) AND V!=HHV(V,250);
 XG:=SUM(FL1,10);
 XG=1.00;

========================================================================================================

量柱上1的时候改成选股
 {突然放量}
 TOTAL:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,240,1)))));
 MTIME:=MOD(FROMOPEN,TOTAL);
 CTIME:=IF(MTIME<0.5,TOTAL,MTIME);
 VV:=IF(CURRBARSCOUNT=1,V*TOTAL/CTIME,DRAWNULL),NODRAW;
 STICKLINE(CURRBARSCOUNT=1 AND (SETCODE=0||SETCODE=1),VV,0,-1,-1),COLOR00C0C0;
 VUME:V,VOLSTICK;
 MV4:MA(VUME,60),COLORGRAY;
 MV3:MA(VUME,20),COLORMAGENTA;
 MV2:MA(VUME,10),COLORWHITE;
 MV1:MA(VUME,5),COLORGREEN;
 FL4:=V=HHV(V,250);
 FL3:=V=HHV(V,120) AND V!=HHV(V,250);
 FL2:=V=HHV(V,60) AND V!=HHV(V,120) AND V!=HHV(V,250);
 FL1:=V=HHV(V,30) AND V!=HHV(V,60) AND V!=HHV(V,120) AND V!=HHV(V,250);
 DRAWTEXT(FL4,0.99*V,'④'),COLORYELLOW;
 DRAWTEXT(FL3,0.99*V,'③'),COLORYELLOW;
 DRAWTEXT(FL2,0.99*V,'②'),COLORYELLOW;
 DRAWTEXT(FL1,0.99*V,'①'),COLORYELLOW;
 
XG:SUM(FL1,10),NODRAW;

如果要量柱上的1  就是这个
 
FL1:V=HHV(V,30) AND V!=HHV(V,60) AND V!=HHV(V,120) AND V!=HHV(V,250);

 

 

回复

使用道具 举报

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

本版积分规则