通达信【金龙出海】涨停牛股天天抓主图+选股指标用法详解
VAR1:=(PERIOD=5) AND (C>0) AND V>0;
VAR2:=(MA(C,30)+MA(C,72))/2;
VAR3:=VAR2*0.75;
VAR4:=VAR2*0.71;
VAR5:=VAR2*0.68;
VAR6:=EMA(EMA(CLOSE,9),9);
VAR7:=(VAR6-REF(VAR6,1))/REF(VAR6,1)*1000;
VAR8:=EMA(EMA(CLOSE,8),8);
VAR9:=(VAR8-REF(VAR8,1))/REF(VAR8,1)*1000;
VAR10:=VAR9>0;
VAR11:=VAR9<=0;
VAR12:=EMA(C,3);
VAR13:=EMA(SLOPE(C,22)*20+C,54);
VAR14:=CROSS(VAR12,VAR13);
VAR15:=CROSS(VAR13,VAR12);
VAR16:=IF(VAR14 AND VAR10,1,IF(COUNT(VAR14 AND VAR11,BARSLAST(VAR15)+1)=1 AND CROSS(VAR9,0),1,0));
VAR17:=VAR16 AND COUNT(VAR16,BARSLAST(VAR15)+1)=1;
VAR18:=VAR15 AND COUNT(VAR15,BARSLAST(VAR17)+1)=1;
VAR19:=C/REF(O,BARSLAST(VAR17))<(1-7/100) AND COUNT(VAR17,BARSLAST(VAR17)+1)=1 AND COUNT(VAR18,BARSLAST(VAR17)+1)=0;
VAR20:=IF(VAR19 AND COUNT(VAR19,BARSLAST(VAR17)+1)=1,1,IF(VAR18 AND COUNT(VAR19,BARSLAST(VAR17)+1)=0,1,0));
VAR21:=COUNT(VAR19,BARSLAST(VAR17)+1)>=1 AND CROSS(C,0.965*REF(O,BARSLAST(VAR17)));
VAR22:=((VAR21 AND VAR20)=0);
VAR23:=((VAR17 AND COUNT(VAR20,1)=0) OR VAR21) AND VAR22;
VAR24:=(C/REF(O,BARSLAST(VAR21))<(1-7/100) AND COUNT(VAR21,BARSLAST(VAR21)+1)=1 AND COUNT(VAR18,BARSLAST(VAR21)+1)=0);
VAR25:=(VAR18 AND COUNT(VAR21,BARSLAST(VAR23)+1)=1) OR (VAR24 AND SUM(VAR24,0)=1);
VAR26:=((VAR25 AND VAR23)=0);
VAR27:=((VAR20 AND COUNT(VAR20,BARSLAST(VAR23)+1)=1) OR VAR25) AND VAR26;
VAR28:=VAR23 AND COUNT(VAR23,BARSLAST(VAR27)+1)=1;
VAR29:=VAR27 AND COUNT(VAR27,BARSLAST(VAR28)+1)=1;
VAR30:=BARSLAST(VAR28)+1>=1 AND COUNT(VAR29,BARSLAST(VAR28)+1)=0;
VAR31:=BARSLAST(VAR29)+1>=1 AND COUNT(VAR28,BARSLAST(VAR29)+1)=0;
VAR32:=IFF(COUNT(VAR29,BARSCOUNT(C))=0 AND COUNT(VAR28,BARSCOUNT(C))=0,1,0);
VAR33:=VAR32 AND CROSS(VAR7,0);
VAR34:=VAR32 AND CROSS(0,VAR7) AND COUNT(VAR33,BARSLAST(C>0))>=1;
VAR35:=COUNT(VAR33,BARSLAST(VAR33)+1)=1 AND COUNT(VAR34,BARSLAST(VAR33)+1)=0 AND COUNT(VAR29,BARSCOUNT(C))=0;
VAR36:=COUNT(VAR34,BARSLAST(VAR34)+1)=1 AND COUNT(VAR33,BARSLAST(VAR34)+1)=0 AND COUNT(VAR28,BARSCOUNT(C))=0;
VAR37:=COUNT(VAR33,BARSCOUNT(C));
VAR38:=COUNT(VAR34,BARSCOUNT(C));
VAR39:=IFF(VAR32,VAR33,VAR28);
VAR40:=IFF(VAR32,VAR34 AND (VAR37=VAR38 AND VAR37>=0 AND COUNT(VAR29,BARSCOUNT(C))=1 AND COUNT(VAR28,BARSCOUNT(C))=0)=0,VAR29 AND (VAR37==VAR38 AND VAR37>=0 AND COUNT(VAR29,BARSCOUNT(C))=1 AND COUNT(VAR28,BARSCOUNT(C))=0)=0);
VAR41:=(COUNT(VAR33,BARSLAST(C>0))=0 AND COUNT(VAR39,BARSLAST(C>0))=0)=0;
VAR42:=VAR39 AND COUNT(L<VAR5,10)>=1;
VAR43:=VAR39 AND COUNT(L<VAR4,10)>=1;
VAR44:=VAR39 AND COUNT(L<VAR3,10)>=1;
VAR45:=EXIST(VAR42,BARSLAST(VAR17)+1) AND VAR21 AND VAR39;
VAR46:=EXIST(VAR43,BARSLAST(VAR17)+1) AND VAR21 AND VAR39;
VAR47:=EXIST(VAR44,BARSLAST(VAR17)+1) AND VAR21 AND VAR39;
VAR48:=IFF(VAR42,5,IFF(VAR43,4,IFF(VAR44,3,0)));
VAR49:=IFF(VAR45,5,IFF(VAR46,4,IFF(VAR47,3,0)));
VAR50:=IFF(VAR48>0,VAR48,VAR49);
VAR51:=(VAR30 AND VAR1) OR (VAR35 AND VAR1);
VAR52:=(VAR31 AND VAR41 AND VAR1) OR (VAR36 AND VAR1);
VAR53:=VAR51=0 AND VAR52=0;
VAR54:=BARSLAST(VAR39);
VAR55:=BARSLAST(VAR40);
VAR56:=IFF(VAR54<VAR55 AND VAR53,1,IFF(VAR54>VAR55 AND VAR53,2,0));
VAR57:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
VAR58:=(1-7/100)*(DMA(CLOSE,VAR57));
VAR59:=(1+7/100)*(DMA(CLOSE,VAR57));
VAR60:=C/REF(C,1)>1.097;
VAR61:=BARSLAST(VAR60);
VAR62:=100*(C-REF(C,1))/REF(C,1);
VAR88:=IF(C<REF(O,1) AND VAR62<0,1,0);
VAR89:=IF(C<REF(O,2) AND VAR62<0,1,0);
YDF:IF((REF(C,1)-LOW)/REF(C,1)*100>0,(REF(C,1)-LOW)/REF(C,1)*100,0),LINETHICK1,NODRAW;
三日均跌:MA(YDF,3),COLORWHITE,NODRAW;
BD:EMA(C,5),COLORYELLOW,LINETHICK1;
HS1:IF(BD>REF(BD,1),BD,DRAWNULL),COLORRED,LINETHICK1;
LJ1:IF(BD<REF(BD,1),BD,DRAWNULL),COLORFFFF00,LINETHICK1,DOTLINE;
BD10:EMA(C,10),COLORYELLOW,LINETHICK1;
HS2:IF(BD10>REF(BD10,1),BD10,DRAWNULL),COLOR00FFFF,LINETHICK1;
LJ2:IF(BD10<REF(BD10,1),BD10,DRAWNULL),COLORFFFF00,LINETHICK1,DOTLINE;
BD20:EMA(C,20),COLORYELLOW,LINETHICK1;
HS3:IF(BD20>REF(BD20,1),BD20,DRAWNULL),COLORFF00FF,LINETHICK1;
LJ3:IF(BD20<REF(BD20,1),BD20,DRAWNULL),COLORFFFF00,LINETHICK1,DOTLINE;
CZ30:EMA(C,30),COLORYELLOW,LINETHICK4;
HS:IF(CZ30>REF(CZ30,1),CZ30,DRAWNULL),COLORRED,LINETHICK4;
LJ:IF(CZ30<REF(CZ30,1),CZ30,DRAWNULL),COLOR009300,LINETHICK4;
QS55:EMA(C,55),COLORYELLOW,LINETHICK1,NODRAW;
HS4:IF(QS55>REF(QS55,1),QS55,DRAWNULL),COLOR0080FF,LINETHICK1;
LJ4:IF(QS55<REF(QS55,1),QS55,DRAWNULL),COLORFFFF00,DOTLINE,LINETHICK1;
BNX:EMA(C,120),COLORYELLOW,LINETHICK1,NODRAW;
BNHS:IF(BNX>REF(BNX,1),BNX,DRAWNULL),COLORFFFFFF,LINETHICK1;
BNLJ:IF(BNX<REF(BNX,1),BNX,DRAWNULL),COLORFFFF00,DOTLINE,LINETHICK1;
年线:EMA(C,250),COLORYELLOW,LINETHICK1,NODRAW;
年红升:IF(年线>REF(年线,1),年线,DRAWNULL),COLOR8000FF,LINETHICK1;
DRAWTEXT_FIX(C>O,0,0.07,0,'股票指标网http://'),COLOR222222;
年绿降:IF(年线<REF(年线,1),年线,DRAWNULL),COLORFFFF00,DOTLINE,LINETHICK1;
STICKLINE((VAR30 AND VAR1) OR (VAR35 AND VAR1),H,L,0.00,0),COLOR0000FF;
STICKLINE((VAR30 AND VAR1) OR (VAR35 AND VAR1),C,O,3.00,0),COLOR0000FF;
STICKLINE((VAR31 AND VAR41 AND VAR1) OR (VAR36 AND VAR1),H,L,0,0),COLORFFFF00;
STICKLINE((VAR31 AND VAR41 AND VAR1) OR (VAR36 AND VAR1),C,O,3,0),COLORFFFF00;
STICKLINE(C=O AND (VAR30 OR VAR35) AND VAR1,C,C,3,0),COLOR0000FF;
STICKLINE(C=O AND (VAR31 AND VAR41) AND VAR1,C,C,3,0),COLORFFFF00;
STICKLINE(VAR1 AND VAR56=1,H,L,0.00,0),COLOR0000FF;
STICKLINE(VAR1 AND VAR56=1,C,O,3.00,0),COLOR0000FF;
STICKLINE(VAR1 AND VAR56=2,H,L,0.00,0),COLORFFFF00;
STICKLINE(VAR1 AND VAR56=2,C,O,3,0),COLORFFFF00;
DRAWICON(VAR39 AND VAR1,LOW,1);
DRAWICON(VAR39 AND VAR1,LOW*0.995,34);
DRAWICON(VAR40 AND VAR1,HIGH,2);
DRAWICON(VAR40 AND VAR1,HIGH*1.005,35);
DRAWICON(VAR50==5 AND VAR1,L*0.97,14);
DRAWICON(VAR50==4 AND VAR1,L*0.97,13);
DRAWICON(VAR50==3 AND VAR1,L*0.97,11);
DRAWTEXT_FIX(ISLASTBAR,0.988,0.06,1,'★ 开盘价收盘价低于昨日的收盘价买,半仓操作,永不满仓。★ '),COLOR00FFFF;
CC:IF(CURRBARSCOUNT<18,CONST(REF(C,1)),DRAWNULL),COLOR000000,NODRAW;
止赢:1.05*CC,COLORMAGENTA,LINETHICK1;
DRAWTEXT(ISLASTBAR,止赢,'止赢'),LINETHICK1;
止损:0.97*CC,COLORYELLOW,LINETHICK1;
DRAWTEXT(ISLASTBAR,止损,'止损'),LINETHICK1;
支撑:REFDATE(VAR58,DATE),LINETHICK1,COLOR454545;
DRAWTEXT(ISLASTBAR,支撑,'支撑'),LINETHICK1;
阻力:REFDATE(VAR59,DATE),LINETHICK1,COLOR454545;
DRAWTEXT(ISLASTBAR,阻力,'阻力'),LINETHICK1;
STICKLINE(VAR60,REF(O,VAR61),REF(C,VAR61),5,0),COLORYELLOW;
DRAWTEXT(VAR60,L*0.98,'★涨停'),COLOR4080FF;
STICKLINE(VAR88=0 AND REF(VAR88,1)=1 AND VAR89=0 AND REF(VAR89,1)=1,O,C,3,0),COLORFF09FF;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
VAR1赋值:(PERIOD=5) AND (C>0) AND V>0
VAR2赋值:(C的30日简单移动平均+C的72日简单移动平均)/2
VAR3赋值:VAR2*0.75
VAR4赋值:VAR2*0.71
VAR5赋值:VAR2*0.68
VAR6赋值:收盘价的9日指数移动平均,9)
VAR7赋值:(VAR6-1日前的VAR6)/1日前的VAR6*1000
VAR8赋值:收盘价的8日指数移动平均,8)
VAR9赋值:(VAR8-1日前的VAR8)/1日前的VAR8*1000
VAR10:=VAR9>0
VAR11:=VAR9<=0
VAR12:=C的3日指数移动平均
VAR13:=EMA(SLOPE(C,22)*20+C,54)
VAR14:=VAR12上穿VAR13
VAR15:=VAR13上穿VAR12
VAR16:=IF(VAR14 AND VAR10,1,IF(COUNT(VAR14 AND VAR11,上次VAR15距今天数+1)=1 AND VAR9上穿0,1,0))
VAR17:=VAR16 AND COUNT(VAR16,上次VAR15距今天数+1)=1
VAR18:=VAR15 AND COUNT(VAR15,上次VAR17距今天数+1)=1
VAR19:=C/REF(O,上次VAR17距今天数)<(1-7/100) AND COUNT(VAR17,上次VAR17距今天数+1)=1 AND COUNT(VAR18,上次VAR17距今天数+1)=0
VAR20:=IF(VAR19 AND COUNT(VAR19,上次VAR17距今天数+1)=1,1,IF(VAR18 AND COUNT(VAR19,上次VAR17距今天数+1)=0,1,0))
VAR21:=COUNT(VAR19,上次VAR17距今天数+1)>=1 AND CROSS(C,0.965*REF(O,上次VAR17距今天数))
VAR22:=((VAR21 AND VAR20)=0)
VAR23:=((VAR17 AND 统计1日满足VAR20的天数=0) OR VAR21) AND VAR22
VAR24:=(C/REF(O,上次VAR21距今天数)<(1-7/100) AND COUNT(VAR21,上次VAR21距今天数+1)=1 AND COUNT(VAR18,上次VAR21距今天数+1)=0)
VAR25:=(VAR18 AND COUNT(VAR21,上次VAR23距今天数+1)=1) OR (VAR24 AND 0的VAR24日累和=1)
VAR26:=((VAR25 AND VAR23)=0)
VAR27:=((VAR20 AND COUNT(VAR20,上次VAR23距今天数+1)=1) OR VAR25) AND VAR26
VAR28:=VAR23 AND COUNT(VAR23,上次VAR27距今天数+1)=1
VAR29:=VAR27 AND COUNT(VAR27,上次VAR28距今天数+1)=1
VAR30:=上次VAR28距今天数+1>=1 AND COUNT(VAR29,上次VAR28距今天数+1)=0
VAR31:=上次VAR29距今天数+1>=1 AND COUNT(VAR28,上次VAR29距今天数+1)=0
VAR32:=IFF(COUNT(VAR29,C的有效数据周期数)=0 AND COUNT(VAR28,C的有效数据周期数)=0,1,0)
VAR33:=VAR32 AND VAR7上穿0
VAR34:=VAR32 AND 0上穿VAR7 AND COUNT(VAR33,上次C>0距今天数)>=1
VAR35:=COUNT(VAR33,上次VAR33距今天数+1)=1 AND COUNT(VAR34,上次VAR33距今天数+1)=0 AND COUNT(VAR29,C的有效数据周期数)=0
VAR36:=COUNT(VAR34,上次VAR34距今天数+1)=1 AND COUNT(VAR33,上次VAR34距今天数+1)=0 AND COUNT(VAR28,C的有效数据周期数)=0
VAR37:=COUNT(VAR33,C的有效数据周期数)
VAR38:=COUNT(VAR34,C的有效数据周期数)
VAR39:=IFF(VAR32,VAR33,VAR28)
VAR40:=IFF(VAR32,VAR34 AND (VAR37=VAR38 AND VAR37>=0 AND COUNT(VAR29,C的有效数据周期数)=1 AND COUNT(VAR28,C的有效数据周期数)=0)=0,VAR29 AND (VAR37==VAR38 AND VAR37>=0 AND COUNT(VAR29,C的有效数据周期数)=1 AND COUNT(VAR28,C的有效数据周期数)=0)=0)
VAR41:=(COUNT(VAR33,上次C>0距今天数)=0 AND COUNT(VAR39,上次C>0距今天数)=0)=0
VAR42:=VAR39 AND 统计10日满足L=1
VAR43:=VAR39 AND 统计10日满足L=1
VAR44:=VAR39 AND 统计10日满足L=1
VAR45:=EXIST(VAR42,上次VAR17距今天数+1) AND VAR21 AND VAR39
VAR46:=EXIST(VAR43,上次VAR17距今天数+1) AND VAR21 AND VAR39
VAR47:=EXIST(VAR44,上次VAR17距今天数+1) AND VAR21 AND VAR39
VAR48:=IFF(VAR42,5,IFF(VAR43,4,IFF(VAR44,3,0)))
VAR49:=IFF(VAR45,5,IFF(VAR46,4,IFF(VAR47,3,0)))
VAR50:=IFF(VAR48>0,VAR48,VAR49)
VAR51:=(VAR30 AND VAR1) OR (VAR35 AND VAR1)
VAR52:=(VAR31 AND VAR41 AND VAR1) OR (VAR36 AND VAR1)
VAR53:=VAR51=0 AND VAR52=0
VAR54:=上次VAR39距今天数
VAR55:=上次VAR40距今天数
VAR56:=IFF(VAR54VAR55 AND VAR53,2,0))
VAR57:=(2*收盘价+最高价+最低价的绝对值/4-收盘价的20日简单移动平均)/收盘价的20日简单移动平均
VAR58:=(1-7/100)*(D收盘价的VAR57日简单移动平均)
VAR59:=(1+7/100)*(D收盘价的VAR57日简单移动平均)
VAR60:=C/1日前的C>1.097
VAR61:=上次VAR60距今天数
VAR62:=100*(C-1日前的C)/1日前的C
VAR88:=IF(C<1日前的O AND VAR62<0,1,0)
VAR89:=IF(C<2日前的O AND VAR62<0,1,0)
输出YDF:IF((1日前的C-最低价)/1日前的C*100>0,(1日前的C-最低价)/1日前的C*100,0),LINETHICK1,NODRAW
输出三日均跌:YDF的3日简单移动平均,画白色,NODRAW
输出BD:C的5日指数移动平均,画黄色,LINETHICK1
输出HS1:IF(BD>1日前的BD,BD,DRAWNULL),画红色,LINETHICK1
输出LJ1:IF(BD<1日前的BD,BD,DRAWNULL),COLORFFFF00,LINETHICK1,DOTLINE
BD10:C的10日指数移动平均,画黄色,LINETHICK1
输出HS2:IF(BD10>1日前的BD10,BD10,DRAWNULL),COLOR00FFFF,LINETHICK1
输出LJ2:IF(BD10<1日前的BD10,BD10,DRAWNULL),COLORFFFF00,LINETHICK1,DOTLINE
BD20:C的20日指数移动平均,画黄色,LINETHICK1
输出HS3:IF(BD20>1日前的BD20,BD20,DRAWNULL),COLORFF00FF,LINETHICK1
输出LJ3:IF(BD20<1日前的BD20,BD20,DRAWNULL),COLORFFFF00,LINETHICK1,DOTLINE
输出CZ30:C的30日指数移动平均,画黄色,LINETHICK4
输出HS:IF(CZ30>1日前的CZ30,CZ30,DRAWNULL),画红色,LINETHICK4
输出LJ:IF(CZ30<1日前的CZ30,CZ30,DRAWNULL),COLOR009300,LINETHICK4
输出QS55:C的55日指数移动平均,画黄色,LINETHICK1,NODRAW
HS4:IF(QS55>1日前的QS55,QS55,DRAWNULL),COLOR0080FF,LINETHICK1
LJ4:IF(QS55<1日前的QS55,QS55,DRAWNULL),COLORFFFF00,DOTLINE,LINETHICK1
输出BNX:C的120日指数移动平均,画黄色,LINETHICK1,NODRAW
BN输出HS:IF(BNX>1日前的BNX,BNX,DRAWNULL),COLORFFFFFF,LINETHICK1
BN输出LJ:IF(BNX<1日前的BNX,BNX,DRAWNULL),COLORFFFF00,DOTLINE,LINETHICK1
输出年线:C的250日指数移动平均,画黄色,LINETHICK1,NODRAW
输出年红升:IF(年线>1日前的年线,年线,DRAWNULL),COLOR8000FF,LINETHICK1
当满足条件C>O时,在横轴0纵轴0.07位置书写文字
输出年绿降:IF(年线<1日前的年线,年线,DRAWNULL),COLORFFFF00,DOTLINE,LINETHICK1
STICKLINE((VAR30 AND VAR1) OR (VAR35 AND VAR1),H,L,0.00,0),COLOR0000FF
STICKLINE((VAR30 AND VAR1) OR (VAR35 AND VAR1),C,O,3.00,0),COLOR0000FF
STICKLINE((VAR31 AND VAR41 AND VAR1) OR (VAR36 AND VAR1),H,L,0,0),COLORFFFF00
STICKLINE((VAR31 AND VAR41 AND VAR1) OR (VAR36 AND VAR1),C,O,3,0),COLORFFFF00
STICKLINE(C=O AND (VAR30 OR VAR35) AND VAR1,C,C,3,0),COLOR0000FF
STICKLINE(C=O AND (VAR31 AND VAR41) AND VAR1,C,C,3,0),COLORFFFF00
当满足条件VAR1 AND VAR56=1时,在H和L之间画柱状线
当满足条件VAR1 AND VAR56=1时,在C和O之间画柱状线
当满足条件VAR1 AND VAR56=2时,在H和L之间画柱状线
当满足条件VAR1 AND VAR56=2时,在C和O之间画柱状线
当满足条件VAR39 AND VAR1时,在最低价和1之间画图标
当满足条件VAR39 AND VAR1时,在最低价*0.995和34之间画图标
当满足条件VAR40 AND VAR1时,在最高价和2之间画图标
当满足条件VAR40 AND VAR1时,在最高价*1.005和35之间画图标
当满足条件VAR50==5 AND VAR1时,在L*0.97和14之间画图标
当满足条件VAR50==4 AND VAR1时,在L*0.97和13之间画图标
当满足条件VAR50==3 AND VAR1时,在L*0.97和11之间画图标
当满足条件ISLASTBAR时,在横轴0.988纵轴0.06位置书写文字
输出CC:IF( 到最后交易的周期<18,CONST(1日前的C),DRAWNULL),COLOR000000,NODRAW
输出止赢:1.05*CC,画洋红色,LINETHICK1
当满足条件ISLASTBAR时,在止赢和'止赢'位置书写文字
输出止损:0.97*CC,画黄色,LINETHICK1
当满足条件ISLASTBAR时,在止损和'止损'位置书写文字
输出支撑:REFDATE(VAR58,DATE),LINETHICK1,COLOR454545
当满足条件ISLASTBAR时,在支撑和'支撑'位置书写文字
输出阻力:REFDATE(VAR59,DATE),LINETHICK1,COLOR454545
当满足条件ISLASTBAR时,在阻力和'阻力'位置书写文字
STICKLINE(VAR60,VAR61日前的O,VAR61日前的C,5,0),画黄色
当满足条件VAR60时,在L*0.98和'★涨停'位置书写文字
STICKLINE(VAR88=0 AND 1日前的VAR88=1 AND VAR89=0 AND 1日前的VAR89=1,O,C,3,0),COLORFF09FF