公式如下:
M5:=5;M10:=10;M22:=22;M120:=120;ZF:=(C-REF(C,1))/REF(C,1)*100;EMA5:=EMA(C,M5),;EMA10:=EMA(C,M10);EMA22:=EMA(C,M22);JFH:=EMA5>=EMA10 && EMA10>=EMA22;FHW:=EMA22>=EMA10 && EMA10>=EMA5;RSVK:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;XZQ:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;ZLL:=(EMA(XZQ,3)-50)*5,;K1:=SMA(RSVK,10,1);D1:=SMA(K1,5,1);KK:=EMA(K1,2);DD:=EMA(D1,2);TFXXS:=KK+DD;TGLXS:=(TFXXS-REF(TFXXS,1))*10;TYCFX:=TFXXS+TGLXS;XS2:=TGLXS>69;XS3:=COUNT(ZLL>40,2)>0;XS4:=XS2 AND XS3;主力异动:=REF(XS4,1)=0 AND XS4 AND C>O;主力异动1:=CROSS(主力异动,0.9);STICKLINE(C,REF(C,BARSLAST(主力异动1)),REF(L,BARSLAST(主力异动1)),6,0),COLORC08080;STICKLINE(C,REF(C,BARSLAST(主力异动)),REF(C,BARSLAST(主力异动)),4,1),COLORRED;TT0:=BARSLAST(CURRBARSCOUNT=CONST(主力异动));DRAWTEXT(TT0=0,REF(H,TT0)*1.003,VARCAT(VARCAT('牛线等突破 : ',VAR2STR(REF(H,TT0),2)),'元'))COLORWHITE;EMA120:EMA(CLOSE,M120);DRAWKLINE(H,O,L,C);DRAWICON(CROSS(EMA5,EMA10),L,1);DRAWICON(CROSS(EMA10,EMA5),H,2);STICKLINE(JFH>REF(JFH,1),OPEN,CLOSE,2,0),COLOR4080FF;STICKLINE(主力异动,OPEN,CLOSE,2,0),COLORYELLOW;STICKLINE(ZF<-9.8,O,C,3,0),COLORGREEN;STICKLINE(LOW >REF(HIGH,1),LOW,REF(HIGH,1),5,1),COLORRED;STICKLINE(C[H,REF(L,1),H,5,1),COLORMAGENTA;DRAWTEXT(主力异动,EMA22,'主力异动'),COLORYELLOW,LINETHICK2;VVAR1:=2*MA(LLV((C+L)/2,8)*1.1,13)-EMA((C+L)/2,3)-((C+L)/2)*0.1;VVAR2:=IF((EMA((C+L)/2,3)-VVAR1)*5>0,POW((EMA((C+L)/2,3)-VVAR1)*5,2)/10,-1*POW((EMA((C+L)/2,3)-VVAR1)*5,2)/10);VVAR3:=IF(VVAR2>0,VVAR2-0,0);STICKLINE(VVAR3>0 AND REF(VVAR3,1)=0 AND (C+L)/2>MA((C+L)/2,8),OPEN,CLOSE,2,0),COLORFF00FF;高不破价:=REF(C,BARSLAST(主力异动));低不破价:=REF(L,BARSLAST(主力异动));单阳不破:=CURRBARSCOUNT<100 AND BARSLAST(主力异动)<11 AND (LLV(L,BARSLAST(主力异动))>低不破价 OR LLV(L,BARSLAST(主力异动))=低不破价);STICKLINE(单阳不破,低不破价-低不破价*0.0005,低不破价,4,0),COLORGREEN;STICKLINE(单阳不破,高不破价,高不破价,4,0),COLORRED;DRAWTEXT_FIX(C>O,0.01,0.9,0,'微信公众号:彩虹桥投资学习'),COLORRED;XGH:=CROSS(主力异动,0.9);QF:=BACKSET(XGH=1,主力异动+1);QFT:=BARSLAST(CROSS(QF=1,0.5));NOTEXT:IF(QF=1,L,DRAWNULL),COLORGREEN;STICKLINE(QFT>=0,REF(H,QFT),REF(H,QFT),4,-1),COLORYELLOW;DRAWTEXT(QFT=0,H*1.03,VARCAT(VARCAT('异动价等突破:',VAR2STR(REF(H,QFT),2)),'元'))COLORYELLOW;LLT:=LLVBARS(L,60);LTLT:=BARSLAST(CURRBARSCOUNT=CONST(LLT)+1);HGT:=FINDHIGHBARS(H,LLT+1,60,1);牛线:DRAWLINE(CURRBARSCOUNT=CONST(HGT)+1,H,ISLASTBAR,REF(H,HGT),0),COLORFF80FF,LINETHICK2;牛线1:DRAWLINE(CURRBARSCOUNT=CONST(HGT)+1,H,ISLASTBAR,REF(H,HGT),0),COLORYELLOW,LINETHICK4,POINTDOT;TGT0:=BARSLAST(CURRBARSCOUNT=CONST(HGT)+1);DRAWTEXT(TGT0=0,REF(H,TGT0)*1.003,VARCAT(VARCAT('牛等突破 : ',VAR2STR(REF(H,TGT0),2)),'元'))COLORWHITE;]
信号不多,就做一个“主力异动黄K”选股吧。
选股公式如下:
RSVK:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;XZQ:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;ZLL:=(EMA(XZQ,3)-50)*5;K1:=SMA(RSVK,10,1);D1:=SMA(K1,5,1);KK:=EMA(K1,2);DD:=EMA(D1,2);TFXXS:=KK+DD;TGLXS:=(TFXXS-REF(TFXXS,1))*10;TYCFX:=TFXXS+TGLXS;XS2:=TGLXS>69;XS3:=COUNT(ZLL>40,2)>0;XS4:=XS2 AND XS3;主力异动:=REF(XS4,1)=0 AND XS4 AND C>O;XGH:=CROSS(主力异动,0.9);QF:=BACKSET(XGH=1,主力异动+1);QFT:=BARSLAST(CROSS(QF=1,0.5));XH:REF(XS4,1)=0 AND XS4 AND C>O AND QFT>=0;
测试一下,平仓规则是,不论盈亏,以持股20天后平仓为条件。
胜率66.93%
END
|