//黑马组合选股公式出炉,给大家(源码)送上来了.
//选股指标源码,记得顶哟.
//{G: 1 60 15
//Z: 1 100 5}
g:=15;
z:=5;
RV:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;
RG:=(CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100;
RV1:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*1;
RG1:=(CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*1;
VAR04:=SMA(RV1,3,1);
VAR05:=SMA(VAR04,3,1);
KK:=EMA(SMA(RG1,3,1),2),LINETHICK2,COLOR0000FF;
DD:=SMA(KK,3,1),LINETHICK1,COLORFF0000;
P:=(HIGH+LOW+CLOSE)/3;
CCI1:=(P-MA(P,14))*1000/(15*AVEDEV(P,14)),COLORRED;
CCI2:=(P-MA(P,36))*1000/(15*AVEDEV(P,36)),COLORGREEN;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
抄底王:=CROSS(CCI1,CCI2) AND REF(CCI1,1)=LLV(CCI1,70) AND CROSS(K,D);
A2:=MA(C,18);
A3:=(C-A2)/A2*100>=-9.9 AND C<A2;
美人如玉剑如虹:=A3 AND C/REF(C,1)>1.080,COLORRED;
ROC:=100*(CLOSE-REF(CLOSE,12))/REF(CLOSE,12);
MAROC:=MA(ROC,6);
变动速率:=ROC/MAROC*Z;
P1:=(HIGH+LOW+CLOSE)/3;
CCI01:=(P1-MA(P1,14))*1000/(G*AVEDEV(P1,14)),COLORRED;
CCI02:=(P1-MA(P1,36))*1000/(G*AVEDEV(P1,36)),COLORGREEN;
B1:=BARSLAST(CCI01=LLV(CCI01,60));
DD1:=C<REF(C,B1) AND CCI01>REF(CCI01,B1);
底背离:=IF(DD1,100,0),LINETHICK2,COLORRED;
机会难得:=IF(CROSS(CCI01,CCI02) AND REF(CCI01,1)=LLV(CCI01,70),1,0),LINETHICK2,COLORYELLOW;
KD:=CROSS(K,D);
{选股:机会难得 AND KD;}
{百年难遇:DRAWICON(机会难得 AND KD,1,1),COLORYELLOW;};
腰线:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4,,;
KKA:=EMA(C-L,5) ;
顶线:=MA((C+REF(C,1)+REF(C,1))/3+KKA,5);
底线:=MA(REF(C,1)-KKA,5);
MA10:= MA(C,10);
MA20:= MA(C,20);
MA60:= MA(C,60);
BBA:=MA(C,2);
CCA:=MA(C,10);
DDA:=MA(C,20);
EEA:=EXIST(CROSS(BBA,CCA) AND CROSS(BBA,DDA),1);
J0:=(HIGH+LOW)/2;
QJ:=EMA(J0,3);
J1:=IF(CLOSE>QJ,VOL,0);
J2:=IF(CLOSE<QJ,VOL,0);
BB:=MA(SUM(J1-J2,22),3);
累加:=21*BB+20*REF(BB,1)+19*REF(BB,2)+18*REF(BB,3)+17*REF(BB,4)
+16*REF(BB,5)+15*REF(BB,6)+14*REF(BB,7)+13*REF(BB,8)+12*REF
(BB,9)+11*REF(BB,10)+10*REF(BB,11)+9*REF(BB,12)+8*REF(BB,13)
+7*REF(BB,14)+6*REF(BB,15)+5*REF(BB,16)+4*REF(BB,17)+3*REF
(BB,18)+2*REF(BB,19)+REF(BB,20);
wwMA:=累加/(21+1)/21*2;
CC1:=WwMA;
VAR3:=(BB-CC1);
VAR4:=SMA(RV,3,1);
VAR5:=SMA(VAR4,3,1);
T:=IF((BARSCOUNT(C) > 7),(100)*((MA(C,7))/(LLV(MA(C,7),7)) - 1),1);
N:=IF((T > 0.35),6,65);
W:=((-((100)*(HHV(H,N) - C))/(HHV(HIGH,N) - LLV(L,N))));
RV2:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;
RG2:=(CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100;
J01:=(HIGH+LOW)/2;
QJ1:=EMA(J01,3);
J11:=IF(CLOSE>QJ1,VOL,0);
J21:=IF(CLOSE<QJ1,VOL,0);
BB1:=MA(SUM(J11-J21,22),3);
累加1:=21*BB1+20*REF(BB1,1)+19*REF(BB1,2)+18*REF(BB1,3)+17*REF(BB1,4)
+16*REF(BB1,5)+15*REF(BB1,6)+14*REF(BB1,7)+13*REF(BB1,8)+12*REF
(BB1,9)+11*REF(BB1,10)+10*REF(BB1,11)+9*REF(BB1,12)+8*REF(BB1,13)
+7*REF(BB1,14)+6*REF(BB1,15)+5*REF(BB1,16)+4*REF(BB1,17)+3*REF
(BB1,18)+2*REF(BB1,19)+REF(BB1,20);
WMA1:=累加1/(21+1)/21*2;
CC:=WMA1;
VAR03:=(BB-CC);VAR004:=SMA(RV,3,1);
VAR005:=SMA(VAR004,3,1);
KK1:=EMA(SMA(RG,3,1),2),COLORFFFFFF;
DD2:=SMA(KK1,3,1),COLOR00FFFF;
天天涨停:=CROSS(W,-2) AND CROSS(VAR004,VAR005) AND CROSS(KK1,DD2);
明月战神:=(腰线>O AND O>底线 AND C>顶线 AND C>MA20 AND C>腰线 AND EEA AND CROSS(VAR4,VAR5) AND CROSS(KK,DD));
RSV3:=(((CLOSE - LLV(LOW,9)) / (HHV(HIGH,9) - LLV(LOW,9))) * 100);
K11:=SMA(RSV3,3,1);
D11:=SMA(K11,3,1);
KK5:=INTPART(SMA(RSV3,3,1));
DD5:=INTPART(SMA(K11,3,1));
JJ5:=INTPART(((3 * K11) - (2 * D11)));
N1:=(KK5 + DD5);
KX:=(N1 < 25);
KX1:=REF(KX,29);
XX:=(N1 < 18);
XX1:=REF(XX,31);
XXX:=(N1 < 23);
XXX1:=REF(XXX,198);
KP:=((KX1 OR XX1) OR XXX1);
KA1:=(((REF(CLOSE,2) / REF(OPEN,2)) < 0.95) AND (REF(CLOSE,2) < REF(CLOSE,3)));
KA2:=(((REF(OPEN,1) < REF(CLOSE,2)) AND (REF(CLOSE,1) > REF(CLOSE,2))) AND (REF(CLOSE,1) > ((REF(CLOSE,2) + REF(OPEN,2)) / 2)));
KA3:=(CLOSE > REF(CLOSE,1));
KA4:=(LLV(LOW,13) = REF(LOW,1));
KP2:=(COUNT((((KA1 AND KA2) AND KA3) AND KA4),3) > 0);
KP3:=CROSS((-100*(HHV(HIGH,14)-CLOSE)/(HHV(HIGH,14)-LLV(LOW,14))),80);
KD3:=(N1 < 45);
KD1:=(((((REF(KD3,180) OR REF(KD3,179)) OR REF(KD3,31)) OR REF(KD3,29)) OR REF(KD3,13)) OR REF(KD3,11));
KP4:=((KP2 AND KP3) AND KD1);
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
KP5:=2*(DIFF-DEA);
KD2:=((((REF(KD3,180) OR REF(KD3,261)) OR REF(KD3,98)) OR REF(KD3,77)) OR REF(KD3,1));
KP6:=((KP2 AND KP5) AND KD2);
KP7:=(N1 < 34);
KP8:=REF(KP7,11);
KP9:=(N1 < 45);
KP10:=((REF(KP9,83) AND KP8) AND KP2);
KP11:=(N1 < 38);
KP12:=((REF(KP11,19) AND REF(KP11,32)) AND KP2);
KP13:=((REF(KP9,28) AND REF(KP11,101)) AND KP2);
KP14:=(N1 < 43);
KP15:=((REF(KP14,28) AND REF(KP14,189)) AND KP2);
I:=((((((REF(CLOSE,2) / REF(OPEN,2)) < 0.95) AND (REF(OPEN,1) < REF(CLOSE,2))) AND ((ABS((REF(OPEN,1) - REF(CLOSE,1))) / REF(CLOSE,1)) < 0.03)) AND ((CLOSE / OPEN) > 1.05)) AND (CLOSE > REF(CLOSE,2)));
I1:=2*(DIFF-DEA);
T3:=(N1 < 40);
T4:=((REF(T3,34) OR REF(T3,28)) OR REF(T3,57));
KP16:=((I AND I1) AND T4);
黑马出击:=IF(KP AND KP2 OR KP4 OR KP6 OR KP10 OR KP12 OR KP13 OR KP15 OR KP16,100,0);
VAR6:="KDJ.J#WEEK"(9,3,3);
VAR8:="KDJ.J#MONTH"(9,3,3);
DEA7:="MACD.DEA#WEEK";
DIFF7:="MACD.DIF#WEEK";
D7:=DIFF7-DEA7;
DEA8:="MACD.DEA#MONTH";
DIFF8:="MACD.DIF#MONTH";
D8:=DIFF8-DEA8;
黑马抄底:=CROSS(VAR6,0) AND D8>0 OR CROSS(VAR8,0) AND D7>0;
QUAN:=(CLOSE-DMA(CLOSE,VOL/SUM(VOL,13)))/DMA(CLOSE,VOL/SUM(VOL,13))*100<=-28 AND (CLOSE-DMA(CLOSE,VOL/SUM(VOL,34)))/DMA(CLOSE,VOL/SUM(VOL,34))*100<=-19
AND C/REF(C,25)<=1.1 AND IF((((HIGH > (LOW * 1.051)) AND (COUNT((HIGH > (LOW * 1.051)),5) > 1)) AND ((((CLOSE / MA(CLOSE,40)) * 100) < 78) OR
(((CLOSE / MA(CLOSE,60)) * 100)< 74))),2,0) AND(SMA(MAX(C-REF(C,2),0),7,1)/SMA(ABS(C-REF(C,2)),7,1)*100)<15 AND IF(SMA((CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100,2,1)>REF(SMA((CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100,2,1),1)
AND REF(SMA((CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100,2,1),1)<REF(SMA((CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100,2,1),2)
AND SMA((CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100,2,1)<23 ,1.5,0) AND FILTER((C/MA(C,48))<0.75 AND (C/MA(C,70))<0.70 AND
((C-L)/C>0.02 OR C>REF(C,1)*1.01) AND V<REF(V,1)*2.8 AND (COUNT(C<O*0.93,2)=2 OR COUNT(H/L>1.1,5)>3),3) ;
机会难得 OR 明月战神 OR 美人如玉剑如虹 OR 抄底王 OR 黑马出击 OR 天天涨停 OR 黑马抄底 OR QUAN;
测试结果(利润1:用目标周期内最高价计算的全部指示的平均利润,利润2:期末价平均利润)
测试证券数:1388 曾指示证券数:1363
共发出指示:13991 成功指示:7852 失败指示:5931 未完成指示:208
平均成功率:56.97%, 成功率达到50%的股票有:68.2%
利润1总平均:16.49% 利润1最大值:64.27% 利润1最小值:0.00%
最高利润达到2倍目标利润以上指示: 4154 (30.14%)
最高利润达到3倍目标利润以上指示: 2178 (15.80%)
利润2总平均: 1.74%&nbs |