通达信竞价模式通达信公式 源码测试图
S1:=IF(NAMELIKE('S'),0,1);
S2:=IF(NAMELIKE('*'),0,1);
S3:=DYNAINFO(17)>0;
S4:=IF(INBLOCK('科创板'),0,1);
S5:=IF(NAMELIKE('C'),0,1);
S6:=IF(INBLOCK('创业板'),0,1);
S7:=IF(INBLOCK('创业板'),1,0);
S8:=IF(CODELIKE('301'),1,0);
S9:=IF(CODELIKE('301'),0,1);
S10:=IF(NAMELIKE('C'),1,0);
去停ST1:=S1 AND S2 AND S3 AND S4 AND S5 AND S6;
涨幅:=100*(C-REF(C,1))/REF(C,1);
开幅:=100*(O-REF(C,1))/REF(C,1);
跌幅:=100*(L-REF(C,1))/REF(C,1);
高幅:=100*(H-REF(C,1))/REF(C,1);
昨开幅:=REF((OPEN-REF(CLOSE,1))/REF(CLOSE,1)*100,1);
开换手Z:=DYNAINFO(15)/OPEN/FINANCE(46)*100;
昨换手Z:=REF(V*10000/FINANCE(46),1);
开换比:=开换手Z/昨换手Z*100;
去股本:=FINANCE(46)/1000000000>1.001;{数值可自调}
板块:=IF(INBLOCK('科创板'),0.2,IF(INBLOCK('创业板'),0.2,IF(INBLOCK('ST板块'),0.05,0.1)));
涨停价:=IF(板块=0.2,ZTPRICE(REF(C,1),0.2),IF(NAMELIKE('S') OR NAMELIKE('*'),ZTPRICE(REF(C,1),0.05),ZTPRICE(REF(C,1),0.1)));
跌停价:=IF(板块=0.2,DTPRICE(REF(C,1),0.2),IF(NAMELIKE('S') OR NAMELIKE('*'),DTPRICE(REF(C,1),0.05),DTPRICE(REF(C,1),0.1)));
去开板:=NOT(OPEN=涨停价);{NOT(OPEN=涨停价)};
涨停:=涨停价=C;
跌停:=跌停价=C;
昨涨停:=REF(涨停,1);
昨跌停:=REF(跌停,1);
G1:=REF(涨停价=O AND 涨停价=C AND L<C,1);
G2:=REF(COUNT(涨停价=C,5)>=1,1);{数值可自调}
前高:=REF(高幅,1)>9.76;{数值可自调}
主板头:去停ST1 AND 昨涨停=0 AND G2=1 AND 去股本=0 AND 前高=1 AND 开幅>-2; {自定义基础头池}
未来函数检测结果如下:
该公式包含未来函数:DYNAINFO
该公式包含未来函数:FINANCE
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
S1赋值:IF(NAMELIKE('S'),0,1)
S2赋值:IF(NAMELIKE('*'),0,1)
S3赋值:DYNAINFO(17)>0
S4赋值:IF(INBLOCK('科创板'),0,1)
S5赋值:IF(NAMELIKE('C'),0,1)
S6赋值:IF(INBLOCK('创业板'),0,1)
S7赋值:IF(INBLOCK('创业板'),1,0)
S8赋值:IF(CODELIKE('301'),1,0)
S9赋值:IF(CODELIKE('301'),0,1)
S10:=IF(NAMELIKE('C'),1,0)
去停ST1赋值:S1 AND S2 AND S3 AND S4 AND S5 AND S6
涨幅赋值:100*(C-1日前的C)/1日前的C
开幅赋值:100*(O-1日前的C)/1日前的C
跌幅赋值:100*(L-1日前的C)/1日前的C
高幅赋值:100*(H-1日前的C)/1日前的C
昨开幅赋值:REF((开盘价-REF(收盘价,1))/REF(收盘价,1)*100,1)
开换手Z赋值:开盘金额/开盘价/FINANCE(46)*100
昨换手Z赋值:REF(V*10000/FINANCE(46),1)
开换比赋值:开换手Z/昨换手Z*100
去股本赋值:FINANCE(46)/1000000000>1.001
{数值可自调}
板块赋值:IF(INBLOCK('科创板'),0.2,IF(INBLOCK('创业板'),0.2,IF(INBLOCK('ST板块'),0.05,0.1)))
涨停价赋值:IF(板块=0.2,ZTPRICE(1日前的C,0.2),IF(NAMELIKE('S') OR NAMELIKE('*'),ZTPRICE(1日前的C,0.05),ZTPRICE(1日前的C,0.1)))
跌停价赋值:IF(板块=0.2,DTPRICE(1日前的C,0.2),IF(NAMELIKE('S') OR NAMELIKE('*'),DTPRICE(1日前的C,0.05),DTPRICE(1日前的C,0.1)))
去开板赋值:NOT(开盘价=涨停价)
{NOT(开盘价=涨停价)}
涨停赋值:涨停价=C
跌停赋值:跌停价=C
昨涨停赋值:1日前的涨停
昨跌停赋值:1日前的跌停
G1赋值:1日前的涨停价=O AND 涨停价=C AND L
G2赋值:1日前的统计5日满足涨停价=C的天数>=1
{数值可自调}
前高赋值:1日前的高幅>9.76
输出{数值可自调}
主板头:去停ST1 AND 昨涨停=0 AND G2=1 AND 去股本=0 AND 前高=1 AND 开幅>-2
{自定义基础头池}