当前位置: 网站首页 > 股票软件公式 > 通达信公式 > 文章 当前位置: 通达信公式 > 文章

通达信公式源码:霸道总裁,刀锋一键选股,自适应涨停变色

点击: 次    来源:顶尖财经    作者:股市狙击 - 小 + 大

1、霸道总裁

{公式名称: 霸道总裁

公式源码:}
VAR1:=CLOSE>MA(CLOSE,20) AND CLOSE>MA(CLOSE,60);
VAR2:=MA(CLOSE,20);
VAR3:=CLOSE>VAR2;
VAR4:=SMA(HIGH,21,2)*1.05;
VAR5:=SMA(LOW,21,2)*0.95;
VAR6:=SMA(LOW,5,1);
VAR7:=(HIGH-CLOSE)/CLOSE*100<1;
VAR8:=CLOSE/REF(CLOSE,1)>1.03;
VAR9:=SMA(CLOSE,2,1);
VAR10:=IF(CROSS(VAR9,VAR6),VAR4*1.05,VAR6);
VAR11:=IF(CROSS(VAR9,VAR4),VAR4*1.1,VAR5);

霸道总裁:VAR11>VAR5 OR VAR10>VAR6 AND VAR7 AND VAR8 AND VAR1 AND VAR3;


2、刀锋一键选股

{公式名称: 刀锋一键选股
公式描述: 
参数数量: 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 多周期低开低走;


3、自适应涨停变色

5%10%20%及改制前后自适应涨跌停变色源码

略微修改自坛内其他老的源码
 

{涨停颜色粉色,完美区分20%10%5%,创业板20200823前10%照样变色}
BK:=IF(INBLOCK('科创板'),0.2,IF(INBLOCK('创业板'),0.2,IF(INBLOCK('ST板块'),0.05,0.1)));
XA_1:=IF(DATE<=1200823,1,0);{}
STICKLINE((C>=ZTPRICE(REF(CLOSE,1),0.1) AND C=H) AND XA_1=1,O,C,4,0),COLORRED;
STICKLINE((C<=DTPRICE(REF(CLOSE,1),0.1) AND C=L) AND XA_1=1,O,C,4,0),COLORBLUE;
STICKLINE((C>=ZTPRICE(REF(C,1),BK) AND C=H),C,O,4,0),COLORRED;
STICKLINE((C<=DTPRICE(REF(C,1),BK) AND C=L),C,O,4,0),COLORBLUE;
STICKLINE((H>=ZTPRICE(REF(C,1),BK) AND C<H) OR (H>=ZTPRICE(REF(CLOSE,1),0.1) AND C<H AND XA_1=1),H,MAX(C,O),0.1,0),COLORRED;{涨停后回落}
STICKLINE((L<=DTPRICE(REF(C,1),BK) AND C>L) OR (L<=DTPRICE(REF(CLOSE,1),0.1) AND C>L AND XA_1=1),L,MIN(C,O),0.1,0),COLORBLUE;{跌停后回升}


上一篇:通达信公式下载:新规新K线,涨跌停K线变色,涨跌停炸板K线,涨跌停主图,虚拟涨停,散户操盘,大炮发射,西部短..

下一篇:通达信公式下载:涨停秘籍,暴利启动点,双线共振,有肉Ⅲ版,龙轩军规,龙轩MACD序列,龙轩量柱,立体金黄涨停..