以下是通达信刀锋一键选股公式源码(无源码的请下载附件导入)
参数数量: 1
参数1: 周期, 最小: 1, 最大: 250, 缺省: 1
公式类型: 条件选股公式-其他类型
}
M5:=MA(C,5);
M10:=MA(C,10);
M20:=MA(C,20);
M30:=MA(C,30);
M60:=MA(C,60);
支撑均线:=IF(BARSCOUNT(C)<20,M10,IF(BARSCOUNT(C)<30,M20,IF(BARSCOUNT(C)>=60,M60,M30)));
均4:=REF(支撑均线,3);
支4:=INTPART(均4*100);
均40:=支4/100,LINETHICK0;
均3:=REF(支撑均线,2);
支3:=INTPART(均3*100);
均30:=支3/100;
均2:=REF(支撑均线,1);
支2:=INTPART(均2*100);
均20:=支2/100;
均1:=支撑均线;
支1:=INTPART(均1*100);
均10:=支1/100;
走平或向上:=IF(均10>=均20 AND 均20>=均30 AND 均30>=均40,1,0);
涨停板:=(CLOSE>=ZTPRICE(REF(CLOSE,1),0.1)) AND C>IF(BARSCOUNT(C)<20,M10,IF(BARSCOUNT(C)<30,M20,IF(BARSCOUNT(C)>=60,M60,M30)));
涨停后高开阴线:=IF(REF(涨停板,1) AND O>=REF(C,1) AND O>C,1,0);
低开选股:=(涨停板 AND 走平或向上) OR (REF(涨停板,1) AND 涨停后高开阴线=0);
低走选股1:=IF((C>=ZTPRICE(REF(C,1),0.1)) AND C<>O AND 走平或向上 AND C>IF(BARSCOUNT(C)<20,M10,IF(BARSCOUNT(C)<30,M20,IF(BARSCOUNT(C)>=60,M60,M30))),1,0);
低走选股2:=IF((REF(C,1)>=ZTPRICE(REF(C,2),0.1)) AND REF(C,1)<>REF(O,1) AND 走平或向上 AND 涨停后高开阴线=0 AND C>IF(BARSCOUNT(C)<20,M10,IF(BARSCOUNT(C)<30,M20,IF(BARSCOUNT(C)>=60,M60,M30))),1,0);
低开低走:=低开选股 OR 低走选股1 OR 低走选股2;
多周期低开低走:=COUNT(低开低走,周期)>=1;
涨停:=(CLOSE>=ZTPRICE(REF(CLOSE,1),0.1));
今日跳空涨停:=涨停 AND L>REF(H,1);
今日涨停跳空:=REF(涨停,1) AND L>REF(H,1);
缺口选股:=今日跳空涨停 OR 今日涨停跳空;
多周刀锋缺口:=COUNT(缺口选股,周期)>=1 AND COUNT(L>REF(H,1),10)<=2;
真假阳:=(C>O OR C>REF(C,1)) AND (C-M10)/M10*100<10 AND COUNT(M10>REF(M10,1),3)=3;
涨板:=(C-REF(C,1))/REF(C,1)*100>=9.90 AND (C-M10)/M10*100<10 AND C<>O AND C>IF(BARSCOUNT(C)<20,M10,IF(BARSCOUNT(C)<30,M20,IF(BARSCOUNT(C)>=60,M60,M30)));
涨停踩十:=(涨板 AND (C-M10)/M10*100<10 AND COUNT(M10>REF(M10,1),3)=3) OR (REF(涨板,1) AND 真假阳 AND COUNT(L>M10,1)=1) OR (REF(涨板,2) AND 真假阳 AND COUNT(L>M10,2)=2);
多周期涨停踩十:=COUNT(涨停踩十,周期)>=1;
TP1:=REF(C,3)/REF(C,4)>1.095 AND REF(C,3)=REF(H,3);
TP2:=MAX(C,O)/MIN(C,O)<1.05 AND C/REF(C,1)<1.09;
TP3:=REF(C,2)>REF(C,3) AND REF(C,1)>REF(C,3) AND EVERY(MIN(C,O)>REF(C,3),3);
三只乌鸦:=C<O AND REF(C,1)<REF(O,1) AND REF(C,2)<REF(O,2);
三只喜鹊:=TP1 AND EVERY(TP2,3) AND TP3 AND 三只乌鸦=0 AND REF(C,3)<>REF(O,3) AND REF(C,3)>IF(BARSCOUNT(C)<20,M10,IF(BARSCOUNT(C)<30,M20,IF(BARSCOUNT(C)>=60,M60,M30)));
取前实底:=IF(REF(C,1)>=REF(O,1),REF(O,1),REF(C,1));
喜一:=IF(REF(三只喜鹊,1) AND O<=取前实底,O,IF(REF(三只喜鹊,1) AND L<=取前实底,取前实底,0));
三日实体底:=LLV(取前实底,3);
喜二:=IF(REF(三只喜鹊,1) AND O<=三日实体底,O,IF(REF(三只喜鹊,1) AND L<=三日实体底,三日实体底,0));
三日最低:=LLV(REF(L,1),3);
喜三:=IF(REF(三只喜鹊,1) AND O<=三日最低,O,IF(REF(三只喜鹊,1) AND L<=三日最低 ,三日最低,0));
喜鹊闹梅XG:=(三只喜鹊 AND 走平或向上) OR (REF(三只喜鹊,1) AND 喜一=0 AND 喜二=0 AND 喜三=0 AND 走平或向上);
多周期喜鹊闹梅:=COUNT(喜鹊闹梅XG,周期)>=1;
空中加油:=COUNT(M5>M10,周期)=周期;
两阴:=REF(C,2)>=REF(O,2) AND REF(C,1)<REF(O,1) AND C<O AND C<REF(C,1);
两阴夹阳:=REF(C,3)>=REF(O,3) AND REF(C,2)<REF(O,2) AND REF(C,1)>REF(O,1) AND REF(C,1)>REF(C,2) AND C<O AND C<REF(C,2);
空中加油选股:=空中加油 AND (两阴 OR 两阴夹阳);
多周期空中加油:=COUNT(空中加油选股,周期)>=1;
涨停1:=(CLOSE>=ZTPRICE(REF(CLOSE,1),0.1));
双龙出海1:=涨停1 AND REF(涨停1,2) AND COUNT(REF(涨停1,1),1)=0 AND COUNT(REF(涨停1,2),5)<=3;
双龙出海2:=涨停1 AND REF(涨停1,3) AND COUNT(REF(涨停1,1),2)=0 AND COUNT(REF(涨停1,3),5)<=3;
双龙出海3:=涨停1 AND REF(涨停1,4) AND COUNT(REF(涨停1,1),3)=0 AND COUNT(REF(涨停1,4),5)<=3;
双龙出海4:=涨停1 AND REF(涨停1,5) AND COUNT(REF(涨停1,1),4)=0 AND COUNT(REF(涨停1,5),5)<=3;
双龙出海5:=涨停1 AND REF(涨停1,6) AND COUNT(REF(涨停1,1),5)=0 AND COUNT(REF(涨停1,6),5)<=3;
双龙出海6:=涨停1 AND REF(涨停1,7) AND COUNT(REF(涨停1,1),6)=0 AND COUNT(REF(涨停1,7),5)<=3;
双龙出海7:=涨停1 AND REF(涨停1,8) AND COUNT(REF(涨停1,1),7)=0 AND COUNT(REF(涨停1,8),5)<=3;
双龙出海8:=涨停1 AND REF(涨停1,9) AND COUNT(REF(涨停1,1),8)=0 AND COUNT(REF(涨停1,9),5)<=3;
双龙出海9:=涨停1 AND REF(涨停1,10) AND COUNT(REF(涨停1,1),9)=0 AND COUNT(REF(涨停1,10),5)<=3;
双龙出海10:=涨停1 AND REF(涨停1,11) AND COUNT(REF(涨停1,1),10)=0 AND COUNT(REF(涨停1,11),5)<=3;
双龙出海11:=涨停1 AND REF(涨停1,12) AND COUNT(REF(涨停1,1),11)=0 AND COUNT(REF(涨停1,12),5)<=3;
双龙出海选股:=双龙出海1 OR 双龙出海2 OR 双龙出海3 OR 双龙出海4 OR 双龙出海5 OR 双龙出海6 OR 双龙出海7 OR 双龙出海8 OR 双龙出海9 OR 双龙出海10 OR 双龙出海11;
多周期双龙出海:=COUNT(双龙出海选股,周期)>=1;
一键选股: 多周期双龙出海 OR 多周期空中加油 OR 多周期喜鹊闹梅 OR 多周期涨停踩十 OR 多周刀锋缺口 OR 多周期低开低走;
|