通达信异动及严重异动提示完整版主图指标
{涨停炸板标注}
SHZB:=CODELIKE('60');{上证主板}
KCB:=CODELIKE('68');{科创板}
SZZB:=CODELIKE('00');{深证主板}
CYB:=CODELIKE('30');{创业板}
BZ:=INBLOCK('北证A股');
KZZ:=CODELIKE('11') OR CODELIKE('12');{可转债}
GP:=SHZB OR KCB OR SZZB OR CYB;
L1:=IF(KCB OR CYB OR KZZ,0.2,IF(INBLOCK('ST板块'),0.05,IF(BZ,0.3,0.1)));{取涨停值}
ZTJ:=ZTPRICE(REF(CLOSE,1),L1);{计算当前K线的涨停价}
Z1:=ZTJ=C;{涨停}
Z2:=ZTJ=H AND C<H;{炸板}
STICKLINE(GP OR KZZ OR BZ AND Z1 AND PERIOD=5,C,O,-1,0),COLORMAGENTA;
STICKLINE(GP OR KZZ OR BZ AND Z2 AND PERIOD=5,C,O,-1,0),RGBXF1C232;
{异动及严重异动提示}
PLZ:=IF(KCB OR CYB,30,20);{各市场股票构成异动所对应的涨幅偏离值}
TM:=IF(SHZB AND DATE>=1230410,1,IF(SZZB AND DATE>=1220713,1,0));{上证主板、深证主板全面注册制异动新规实施时间}
GGLJ2:=SUM((C/REF(C,1)-1),2)*100;{个股两日累加涨跌幅}{适用于全面注册制异动新规实施前}
GGLJ3:=SUM((C/REF(C,1)-1),3)*100;{个股三日累加涨跌幅}
GGQJ2:=(C/REF(C,2)-1)*100;{个股两日区间涨跌幅}{适用于全面注册制异动新规实施后}
GGQJ3:=(C/REF(C,3)-1)*100;{个股三日区间涨跌幅}
ZSLJ2:=IF(SHZB,SUM("999998$C"/REF("999998$C",1)-1,2),IF(SZZB,SUM("399106$C"/REF("399106$C",1)-1,2),0))*100;{A股指数、深证A指两日累加涨跌幅}{适用于全面注册制异动新规实施前}
ZSLJ3:=IF(SHZB,SUM("999998$C"/REF("999998$C",1)-1,3),IF(SZZB,SUM("399106$C"/REF("399106$C",1)-1,3),0))*100;{A股指数、深证A指三日累加涨跌幅}
ZSQJ2:=IF(SHZB,"999998$C"/REF("999998$C",2)-1,"399107$C"/REF("399107$C",2)-1)*100;{A股指数、深证A指两日区间涨跌幅}{适用于全面注册制异动新规实施后}
ZSQJ3:=IF(SHZB,"999998$C"/REF("999998$C",3)-1,"399107$C"/REF("399107$C",3)-1)*100;{A股指数、深证A指三日区间涨跌幅}
XXQJ2:=IF(CYB,"399102$C"/REF("399102$C",2)-1,IF(KCB,"SH000688$C"/REF("SH000688$C",2)-1,0))*100;{创业板综、科创50两日区间涨跌幅}
XXQJ3:=IF(CYB,"399102$C"/REF("399102$C",3)-1,IF(KCB,"SH000688$C"/REF("SH000688$C",3)-1,0))*100;{创业板综、科创50三日区间涨跌幅}
R2:=IF(KCB OR CYB,GGQJ2-XXQJ2>=PLZ,IF(TM=0,GGLJ2-ZSLJ2>=PLZ,GGQJ2-ZSQJ2>=PLZ));{个股两日异动}
R3:=IF(KCB OR CYB,GGQJ3-XXQJ3>=PLZ,IF(TM=0,GGLJ3-ZSLJ3>=PLZ,GGQJ3-ZSQJ3>=PLZ));{个股三日异动}
{10个交易日内的连续同向异动统计}
YD:=R2 OR R3;
YD1:=YD AND EXISTR(YD,5,1)=0 AND COUNT(AMO>0,0)>5;{前5日内无异动,且上市天数大于5}{10日内第1次异动}
SJ1:=BARSLAST(YD1);{第一次异动距今交易日}
T1:=R2 AND SJ1>=2;{若第二次异动为两日异动,则距离第一次异动至少两个交易日}
T2:=R3 AND SJ1>=3 AND REF(T1,1)=0;{若第二次异动为三日异动,则距离第一次异动至少三个交易日}{前一日不存在两日异动}
YD2:=T1 OR T2 AND COUNT(T1 OR T2,SJ1)=1 AND SJ1<=9;{第一次异动至今,两日或三日异动有且只有一次}{且距离第一次异动不超过9个交易日}{10日内第2次异动}
SJ2:=BARSLAST(YD2);{第二次异动距今交易日}
T3:=R2 AND SJ2>=2 AND SJ2<SJ1;
T4:=R3 AND SJ2>=3 AND SJ2<SJ1 AND REF(T3,1)=0;
YD3:=T3 OR T4 AND COUNT(T3 OR T4,SJ1)=1 AND SJ1<=9;{10日内第3次异动}
SJ3:=BARSLAST(YD3);
T5:=R2 AND SJ3>=2 AND SJ3<SJ2 AND SJ2<SJ1;
T6:=R3 AND SJ3>=3 AND SJ3<SJ2 AND SJ2<SJ1 AND REF(T5,1)=0;
YD4:=T5 OR T6 AND COUNT(T5 OR T6,SJ1)=1 AND SJ1<=9;{10日内第4次异动}{触发10个交易日内连续四次同向严重异动}
SJ4:=BARSLAST(YD4);
T7:=R2 AND SJ4>=2 AND SJ4<SJ3 AND SJ3<SJ2 AND SJ2<SJ1;
YD5:=T7 AND COUNT(T7,SJ1)=1 AND SJ1<=9;{10日内第5次异动}
SJ5:=BARSLAST(YD5);
{10个、30个交易日内涨幅偏离值分别达到100%、200%统计}
W1:=LLVBARS(C,11);{11个交易日内最低收盘价距今周期数}
W2:=LLVBARS(C,31);{31个交易日内最低收盘价距今周期数}
V1:=C/REF(C,W1)-1;{个股11个交易日内最低收盘价距今涨跌幅}
V2:=C/REF(C,W2)-1;{个股31个交易日内最低收盘价距今涨跌幅}
P1:=IF(SHZB,"999998$C"/REF("999998$C",W1)-1,IF(CYB,"399102$C"/REF("399102$C",W1)-1,IF(KCB,"SH000688$C"/REF("SH000688$C",W1)-1,"399107$C"/REF("399107$C",W1)-1)));{W1期间指数涨跌幅}
P2:=IF(SHZB,"999998$C"/REF("999998$C",W2)-1,IF(CYB,"399102$C"/REF("399102$C",W2)-1,IF(KCB,"SH000688$C"/REF("SH000688$C",W2)-1,"399107$C"/REF("399107$C",W2)-1)));{W2期间指数涨跌幅}
GL1:=IF(KCB OR CYB,3,6);
GL2:=IF(KCB OR CYB,6,11);
X1:=FILTER(V1-P1>=1,GL1);{个股10个交易日内涨幅偏离值>=100%}{其后3或6个交易日不再显示该异动}
X2:=FILTER(V2-P2>=2,GL2);{个股30个交易日内涨幅偏离值>=200%}{其后6或11个交易日不再显示该异动}
CY101:=X1 AND EXISTR(X1,9,1)=0 AND EXISTR(X2,9,1)=0 AND DATE>=1230103;{创业板个股10日内首次涨幅偏离值>=100%}
CYT1:=BARSLAST(CY101);{创业板个股首次涨幅偏离值>=100%距今周期数}
V3:=C/REF(C,CYT1)-1;{创业板个股首次涨幅偏离值>=100%距今涨幅}
P3:="399102$C"/REF("399102$C",CYT1)-1;{期间创业板综指数涨幅}
G1:=V3-P3>=1;{偏离值计算}
CY102:=G1 AND COUNT(G1,CYT1)=1 AND DATE>=1230101;{第二次涨幅偏离值大于100%}
CY201:=X2 AND EXISTR(X1,29,1)=0 AND EXISTR(X2,29,1)=0;{30日内不存在涨幅严重异动,首次涨幅偏离值大于200%}
G2:=V3-P3>=2;
CY202:=G2 AND COUNT(G2,CYT1)=1 AND DATE>=1230101;{30日内存在10日涨幅偏离值大于100%严重异动,首次涨幅偏离值大于200%}
Y1:=X1 AND EXISTR(X1,9,1)=0;
Y2:=X2 AND EXISTR(X2,29,1)=0;
{创业板10日内存在涨幅偏离值严重异动,重新计算异动次数}
CY3:=EXISTR(Y1,9,1) OR EXISTR(Y2,9,1) AND YD3 AND CYB;
CY4:=EXISTR(CY3,5,1) AND YD4 AND CYB;
{超出首次10日内计数范围,但前5日存在异动,重新计数}
JK1:=EXISTR(YD2,5,1) AND EXISTR(YD3,5,1)=0 AND SJ2>=2 AND SJ2<SJ1 AND R2;
JK2:=EXISTR(YD2,5,1) AND EXISTR(YD3,5,1)=0 AND SJ2>=2 AND SJ2<SJ1 AND R3 AND REF(R2,1)=0;
JK:=JK1 OR JK2;
K1:=EXISTR(YD3,5,1) AND EXISTR(YD4,5,1)=0 AND SJ3>=2 AND SJ3<SJ2 AND SJ2<SJ1 AND R2;
K2:=EXISTR(YD3,5,1) AND EXISTR(YD4,5,1)=0 AND SJ3>=3 AND SJ3<SJ2 AND SJ2<SJ1 AND R3 AND REF(R2,1)=0;
J1:=K1 OR K2;
K3:=EXISTR(YD4,5,1) AND EXISTR(YD5,5,1)=0 AND SJ4>=2 AND SJ4<SJ3 AND SJ3<SJ2 AND SJ2<SJ1 AND R2;
K4:=EXISTR(YD4,5,1) AND EXISTR(YD5,5,1)=0 AND SJ4>=3 AND SJ4<SJ3 AND SJ3<SJ2 AND SJ2<SJ1 AND R3 AND REF(R2,1)=0;
J2:=K3 OR K4;
K5:=EXISTR(YD5,5,1) AND SJ5>=2 AND SJ5<SJ4 AND SJ4<SJ3 AND SJ3<SJ2 AND SJ2<SJ1 AND R2;
K6:=EXISTR(YD5,5,1) AND SJ5>=3 AND SJ5<SJ4 AND SJ4<SJ3 AND SJ3<SJ2 AND SJ2<SJ1 AND R3 AND REF(R2,1)=0;
J3:=K5 OR K6;
YDX:=FILTER(JK OR J1 OR J2 OR J3 AND SJ1>9,3);{前5日存在异动}
SJ6:=BARSLAST(YDX);
U2:=R2 AND SJ6>=2;
U3:=R3 AND SJ6>=3 AND REF(U2,1)=0;
YDX2:=U2 OR U3 AND COUNT(U2 OR U3,SJ6)=1 AND SJ6<=9 AND EXISTR(YDX,5,1);{10日内第2次异动}
SJ7:=BARSLAST(YDX2);
U4:=R2 AND SJ7>=2 AND SJ7<SJ6;
U5:=R3 AND SJ7>=3 AND SJ7<SJ6 AND REF(U4,1)=0;
YDX3:=U4 OR U5 AND COUNT(U4 OR U5,SJ7)=1 AND SJ6<=9;{10日内第3次异动}
{深证主板第4次异动}
SZZB4:=EXISTR(Y1,9,1)=0 AND EXISTR(Y2,9,1)=0 AND YD4 AND SZZB;{10日内第4次异动,且前9日无严重异动}
XJ:=BARSLAST(SZZB4);
SZZB1:=EXISTR(Y1,9,1) OR EXISTR(Y2,9,1) AND YD4 AND SZZB;{前9日存在涨幅严重异动,重新计算异动次数}
SJ8:=BARSLAST(SZZB1);
B1:=R2 AND SJ8>=2;
B2:=R3 AND SJ8>=3 AND REF(B1,1)=0;
SZZB2:=B1 OR B2 AND COUNT(B1 OR B2,SJ8)=1 AND SJ8<=9 AND EXISTR(SZZB1,5,1);
SJ9:=BARSLAST(SZZB2);
B3:=R2 AND SJ9>=2 AND SJ8>SJ9;
B4:=R2 AND SJ9>=3 AND SJ8>SJ9 AND REF(B3,1)=0;
SZZB3:=B3 OR B4 AND COUNT(B3 OR B4,SJ9)=1 AND SJ8<=9 AND EXISTR(SZZB2,5,1);
{深证主板超出首次计数范围,但前5日存在异动,重新计数}
D3:=EXISTR(SZZB4,5,1) AND XJ>=2 AND XJ<SJ3 AND SJ3<SJ2 AND SJ2<SJ1 AND R2;
D4:=EXISTR(SZZB4,5,1) AND XJ>=3 AND XJ<SJ3 AND SJ3<SJ2 AND SJ2<SJ1 AND R3 AND REF(R2,1)=0;
D5:=D3 OR D4;
SZ1:=FILTER(J1 OR D5 AND SJ1>9,3);
SS1:=BARSLAST(SZ1);
C1:=SS1>=2 AND R2;
C2:=SS1>=3 AND R3 AND REF(C1,1)=0;
SZ2:=C1 OR C2 AND COUNT(C1 OR C2,SS1)=1 AND SS1<=9 AND EXISTR(SZ1,5,1);
SS2:=BARSLAST(SZ2);
C3:=SS2>=2 AND SS2<SS1 AND R2;
C4:=SS2>=3 AND SS2<SS1 AND REF(C3,1)=0 AND R3;
SZ3:=C3 OR C4 AND COUNT(C3 OR C4,SS2)=1 AND SS1<=9 AND EXISTR(SZ2,5,1);
{输出}
{全市场适用}
DRAWTEXT(GP AND PERIOD=5 AND YD1 AND COUNT(AMO>0,0)>5,0.992*L,'↖▲'),COLORB4B4B4;
DRAWTEXT(GP AND PERIOD=5 AND YD2 AND COUNT(AMO>0,0)>5,0.992*L,'↖2'),COLORB4B4B4;
{上证A股连续异动}
DRAWTEXT(GP AND PERIOD=5 AND YD3 AND CYB=0,0.992*L,'↖3'),COLORB4B4B4;
DRAWTEXT(GP AND PERIOD=5 AND YD4 AND INBLOCK('上证A股'),0.992*L,'↖4'),COLORWHITE;
DRAWTEXT(GP AND PERIOD=5 AND YD5 AND SHZB,0.992*L,'↖5'),COLORLIGRAY;
DRAWTEXT(GP AND PERIOD=5 AND YDX AND INBLOCK('上证A股'),0.992*L,'↖▲'),COLORB4B4B4;
DRAWTEXT(GP AND PERIOD=5 AND YDX2 AND INBLOCK('上证A股'),0.992*L,'↖2'),COLORB4B4B4;
DRAWTEXT(GP AND PERIOD=5 AND YDX3 AND INBLOCK('上证A股'),0.992*L,'↖3'),COLORB4B4B4;
{深证A股连续异动}
DRAWTEXT(GP AND PERIOD=5 AND CY3,0.992*L,'↖▲'),COLORB4B4B4;
DRAWTEXT(GP AND PERIOD=5 AND CY4,0.992*L,'↖2'),COLORB4B4B4;
DRAWTEXT(GP AND PERIOD=5 AND YD4 AND SZZB AND DATE<1230410,0.992*L,'↖4'),COLORWHITE;
DRAWTEXT(GP AND PERIOD=5 AND YD5 AND SZZB AND DATE<1230410,0.992*L,'↖5'),COLORB4B4B4;
DRAWTEXT(GP AND PERIOD=5 AND YDX AND SZZB AND DATE<1230410,0.992*L,'↖▲'),COLORB4B4B4;
DRAWTEXT(GP AND PERIOD=5 AND YDX2 AND SZZB AND DATE<1230410,0.992*L,'↖2'),COLORB4B4B4;
DRAWTEXT(GP AND PERIOD=5 AND YDX3 AND SZZB AND DATE<1230410,0.992*L,'↖3'),COLORB4B4B4;
DRAWTEXT(GP AND PERIOD=5 AND SZZB4 AND SZZB AND DATE>=1230410,0.992*L,'↖4'),COLORWHITE;
DRAWTEXT(GP AND PERIOD=5 AND SZZB1 AND SZZB AND DATE>=1230410,0.992*L,'↖▲'),COLORB4B4B4;
DRAWTEXT(GP AND PERIOD=5 AND SZZB2 AND SZZB AND DATE>=1230410,0.992*L,'↖2'),COLORB4B4B4;
DRAWTEXT(GP AND PERIOD=5 AND SZZB3 AND SZZB AND DATE>=1230410,0.992*L,'↖3'),COLORB4B4B4;
DRAWTEXT(GP AND PERIOD=5 AND SZ1 AND SZZB,0.992*L,'↖▲'),COLORB4B4B4;
DRAWTEXT(GP AND PERIOD=5 AND SZ2 AND SZZB,0.992*L,'↖2'),COLORB4B4B4;
DRAWTEXT(GP AND PERIOD=5 AND SZ3 AND SZZB,0.992*L,'↖3'),COLORB4B4B4;
{10个交易日内涨幅偏离值大于100%,30个交易日内涨幅偏离值大于200%}
DRAWICON(GP AND PERIOD=5 AND Y1 AND SHZB AND DATE>=1230417,L,1);
DRAWICON(GP AND PERIOD=5 AND Y2 AND SHZB AND DATE>=1230524,L,38);
DRAWICON(GP AND PERIOD=5 AND Y1 AND KCB,L,1);
DRAWICON(GP AND PERIOD=5 AND Y2 AND KCB AND DATE>=1230101,L,38);
DRAWICON(GP AND PERIOD=5 AND CY101 AND CYB,L,1);
DRAWICON(GP AND PERIOD=5 AND CY102 AND CYB,L,1);
DRAWICON(GP AND PERIOD=5 AND CY201 AND CYB AND DATE>=1230101,L,38);
DRAWICON(GP AND PERIOD=5 AND CY202 AND CYB AND DATE>=1230101,L,38);
DRAWICON(GP AND PERIOD=5 AND Y1 AND SZZB AND EXISTR(YD4,9,1)=0 AND DATE>=1230417,L,1);
DRAWICON(GP AND PERIOD=5 AND Y2 AND SZZB AND EXISTR(X1,W2,1)=0 AND DATE>=1230524,L,38);
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
{涨停炸板标注}SHZB赋值:CODELIKE('60')
{上证主板}KCB赋值:CODELIKE('68')
{科创板}SZZB赋值:CODELIKE('00')
{深证主板}CYB赋值:CODELIKE('30')
{创业板}BZ赋值:INBLOCK('北证A股')
KZZ赋值:CODELIKE('11') OR CODELIKE('12')
{可转债}GP赋值:SHZB OR KCB OR SZZB OR CYB
L1赋值:IF(KCB OR CYB OR KZZ,0.2,IF(INBLOCK('ST板块'),0.05,IF(BZ,0.3,0.1)))
{取涨停值}ZTJ赋值:ZTPRICE(1日前的收盘价,L1)
{计算当前K线的涨停价}Z1赋值:ZTJ=C
{涨停}Z2赋值:ZTJ=H AND C当满足条件GP OR KZZ OR BZ AND Z1 AND PERIOD=5时,在C和O之间画柱状线
当满足条件GP OR KZZ OR BZ AND Z2 AND PERIOD=5时,在C和O之间画柱状线
如果KCB OR CYB返回30否则返回20
{各市场股票构成异动所对应的涨幅偏离值}TM赋值:IF(SHZB AND DATE>=1230410,1,IF(SZZB AND DATE>=1220713,1,0))
{上证主板、深证主板全面注册制异动新规实施时间}GGLJ2赋值:SUM((C/1日前的C-1),2)*100
{个股两日累加涨跌幅}{适用于全面注册制异动新规实施前}GGLJ3赋值:SUM((C/1日前的C-1),3)*100
{个股三日累加涨跌幅}GGQJ2赋值:(C/2日前的C-1)*100
{个股两日区间涨跌幅}{适用于全面注册制异动新规实施后}GGQJ3赋值:(C/3日前的C-1)*100
{个股三日区间涨跌幅}ZSLJ2赋值:IF(SHZB,2的"999998$C"/1日前的"999998$C"-1日累和,IF(SZZB,2的"399106$C"/1日前的"399106$C"-1日累和,0))*100
{A股指数、深证A指两日累加涨跌幅}{适用于全面注册制异动新规实施前}ZSLJ3赋值:IF(SHZB,3的"999998$C"/1日前的"999998$C"-1日累和,IF(SZZB,3的"399106$C"/1日前的"399106$C"-1日累和,0))*100
{A股指数、深证A指三日累加涨跌幅}ZSQJ2赋值:IF(SHZB,"999998$C"/2日前的"999998$C"-1,"399107$C"/2日前的"399107$C"-1)*100
{A股指数、深证A指两日区间涨跌幅}{适用于全面注册制异动新规实施后}ZSQJ3赋值:IF(SHZB,"999998$C"/3日前的"999998$C"-1,"399107$C"/3日前的"399107$C"-1)*100
{A股指数、深证A指三日区间涨跌幅}XXQJ2赋值:IF(CYB,"399102$C"/2日前的"399102$C"-1,IF(KCB,"SH000688$C"/2日前的"SH000688$C"-1,0))*100
{创业板综、科创50两日区间涨跌幅}XXQJ3赋值:IF(CYB,"399102$C"/3日前的"399102$C"-1,IF(KCB,"SH000688$C"/3日前的"SH000688$C"-1,0))*100
{创业板综、科创50三日区间涨跌幅}R2赋值:IF(KCB OR CYB,GGQJ2-XXQJ2>=PLZ,IF(TM=0,GGLJ2-ZSLJ2>=PLZ,GGQJ2-ZSQJ2>=PLZ))
{个股两日异动}R3赋值:IF(KCB OR CYB,GGQJ3-XXQJ3>=PLZ,IF(TM=0,GGLJ3-ZSLJ3>=PLZ,GGQJ3-ZSQJ3>=PLZ))
{个股三日异动}{10个交易日内的连续同向异动统计}YD赋值:R2 OR R3
YD1赋值:YD AND EXISTR(YD,5,1)=0 AND 统计0日满足AMO>0的天数>5
{前5日内无异动,且上市天数大于5}{10日内第1次异动}SJ1赋值:上次YD1距今天数
{第一次异动距今交易日}T1赋值:R2 AND SJ1>=2
{若第二次异动为两日异动,则距离第一次异动至少两个交易日}T2赋值:R3 AND SJ1>=3 AND 1日前的T1=0
{若第二次异动为三日异动,则距离第一次异动至少三个交易日}{前一日不存在两日异动}YD2赋值:T1 OR T2 AND 统计SJ1日满足T1 OR T2的天数=1 AND SJ1<=9
{第一次异动至今,两日或三日异动有且只有一次}{且距离第一次异动不超过9个交易日}{10日内第2次异动}SJ2赋值:上次YD2距今天数
{第二次异动距今交易日}T3赋值:R2 AND SJ2>=2 AND SJ2T4赋值:R3 AND SJ2>=3 AND SJ2YD3赋值:T3 OR T4 AND 统计SJ1日满足T3 OR T4的天数=1 AND SJ1<=9
{10日内第3次异动}SJ3赋值:上次YD3距今天数
T5赋值:R2 AND SJ3>=2 AND SJ3T6赋值:R3 AND SJ3>=3 AND SJ3YD4赋值:T5 OR T6 AND 统计SJ1日满足T5 OR T6的天数=1 AND SJ1<=9
{10日内第4次异动}{触发10个交易日内连续四次同向严重异动}SJ4赋值:上次YD4距今天数
T7赋值:R2 AND SJ4>=2 AND SJ4YD5赋值:T7 AND 统计SJ1日满足T7的天数=1 AND SJ1<=9
{10日内第5次异动}SJ5赋值:上次YD5距今天数
{10个、30个交易日内涨幅偏离值分别达到100%、200%统计}W1赋值:LLVBARS(C,11)
{11个交易日内最低收盘价距今周期数}W2赋值:LLVBARS(C,31)
{31个交易日内最低收盘价距今周期数}V1赋值:C/W1日前的C-1
{个股11个交易日内最低收盘价距今涨跌幅}V2赋值:C/W2日前的C-1
{个股31个交易日内最低收盘价距今涨跌幅}P1赋值:IF(SHZB,"999998$C"/W1日前的"999998$C"-1,IF(CYB,"399102$C"/W1日前的"399102$C"-1,IF(KCB,"SH000688$C"/W1日前的"SH000688$C"-1,"399107$C"/W1日前的"399107$C"-1)))
{W1期间指数涨跌幅}P2赋值:IF(SHZB,"999998$C"/W2日前的"999998$C"-1,IF(CYB,"399102$C"/W2日前的"399102$C"-1,IF(KCB,"SH000688$C"/W2日前的"SH000688$C"-1,"399107$C"/W2日前的"399107$C"-1)))
如果KCB OR CYB返回3否则返回6
如果KCB OR CYB返回6否则返回11
X1赋值:V1-P1>=1的GL1过滤
{个股10个交易日内涨幅偏离值>=100%}{其后3或6个交易日不再显示该异动}X2赋值:V2-P2>=2的GL2过滤
{个股30个交易日内涨幅偏离值>=200%}{其后6或11个交易日不再显示该异动}CY101赋值:X1 AND EXISTR(X1,9,1)=0 AND EXISTR(X2,9,1)=0 AND DATE>=1230103
{创业板个股10日内首次涨幅偏离值>=100%}CYT1赋值:上次CY101距今天数
{创业板个股首次涨幅偏离值>=100%距今周期数}V3赋值:C/CYT1日前的C-1
{创业板个股首次涨幅偏离值>=100%距今涨幅}P3赋值:"399102$C"/CYT1日前的"399102$C"-1
{期间创业板综指数涨幅}G1赋值:V3-P3>=1
{偏离值计算}CY102赋值:G1 AND 统计CYT1日满足G1的天数=1 AND DATE>=1230101
{第二次涨幅偏离值大于100%}CY201赋值:X2 AND EXISTR(X1,29,1)=0 AND EXISTR(X2,29,1)=0
{30日内不存在涨幅严重异动,首次涨幅偏离值大于200%}G2赋值:V3-P3>=2
CY202赋值:G2 AND 统计CYT1日满足G2的天数=1 AND DATE>=1230101
{30日内存在10日涨幅偏离值大于100%严重异动,首次涨幅偏离值大于200%}Y1赋值:X1 AND EXISTR(X1,9,1)=0
Y2赋值:X2 AND EXISTR(X2,29,1)=0
{创业板10日内存在涨幅偏离值严重异动,重新计算异动次数}CY3赋值:EXISTR(Y1,9,1) OR EXISTR(Y2,9,1) AND YD3 AND CYB
CY4赋值:EXISTR(CY3,5,1) AND YD4 AND CYB
{超出首次10日内计数范围,但前5日存在异动,重新计数}JK1赋值:EXISTR(YD2,5,1) AND EXISTR(YD3,5,1)=0 AND SJ2>=2 AND SJ2JK2赋值:EXISTR(YD2,5,1) AND EXISTR(YD3,5,1)=0 AND SJ2>=2 AND SJ2JK赋值:JK1 OR JK2
K1赋值:EXISTR(YD3,5,1) AND EXISTR(YD4,5,1)=0 AND SJ3>=2 AND SJ3K2赋值:EXISTR(YD3,5,1) AND EXISTR(YD4,5,1)=0 AND SJ3>=3 AND SJ3J1赋值:K1 OR K2
K3赋值:EXISTR(YD4,5,1) AND EXISTR(YD5,5,1)=0 AND SJ4>=2 AND SJ4K4赋值:EXISTR(YD4,5,1) AND EXISTR(YD5,5,1)=0 AND SJ4>=3 AND SJ4J2赋值:K3 OR K4
K5赋值:EXISTR(YD5,5,1) AND SJ5>=2 AND SJ5K6赋值:EXISTR(YD5,5,1) AND SJ5>=3 AND SJ5J3赋值:K5 OR K6
YDX赋值:JK OR J1 OR J2 OR J3 AND SJ1>9的3过滤
{前5日存在异动}SJ6赋值:上次YDX距今天数
U2赋值:R2 AND SJ6>=2
U3赋值:R3 AND SJ6>=3 AND 1日前的U2=0
YDX2:=U2 OR U3 AND 统计SJ6日满足U2 OR U3的天数=1 AND SJ6<=9 AND EXISTR(YDX,5,1)
{10日内第2次异动}SJ7赋值:上次YDX2距今天数
U4赋值:R2 AND SJ7>=2 AND SJ7U5赋值:R3 AND SJ7>=3 AND SJ7YDX3:=U4 OR U5 AND 统计SJ7日满足U4 OR U5的天数=1 AND SJ6<=9
{10日内第3次异动}{深证主板第4次异动}SZZB4赋值:EXISTR(Y1,9,1)=0 AND EXISTR(Y2,9,1)=0 AND YD4 AND SZZB
{10日内第4次异动,且前9日无严重异动}XJ赋值:上次SZZB4距今天数
SZZB1赋值:EXISTR(Y1,9,1) OR EXISTR(Y2,9,1) AND YD4 AND SZZB
{前9日存在涨幅严重异动,重新计算异动次数}SJ8赋值:上次SZZB1距今天数
B1赋值:R2 AND SJ8>=2
B2赋值:R3 AND SJ8>=3 AND 1日前的B1=0
SZZB2赋值:B1 OR B2 AND 统计SJ8日满足B1 OR B2的天数=1 AND SJ8<=9 AND EXISTR(SZZB1,5,1)
SJ9赋值:上次SZZB2距今天数
B3赋值:R2 AND SJ9>=2 AND SJ8>SJ9
B4赋值:R2 AND SJ9>=3 AND SJ8>SJ9 AND 1日前的B3=0
SZZB3赋值:B3 OR B4 AND 统计SJ9日满足B3 OR B4的天数=1 AND SJ8<=9 AND EXISTR(SZZB2,5,1)
{深证主板超出首次计数范围,但前5日存在异动,重新计数}D3赋值:EXISTR(SZZB4,5,1) AND XJ>=2 AND XJD4赋值:EXISTR(SZZB4,5,1) AND XJ>=3 AND XJD5赋值:D3 OR D4
SZ1赋值:J1 OR D5 AND SJ1>9的3过滤
SS1赋值:上次SZ1距今天数
C1赋值:SS1>=2 AND R2
C2赋值:SS1>=3 AND R3 AND 1日前的C1=0
SZ2赋值:C1 OR C2 AND 统计SS1日满足C1 OR C2的天数=1 AND SS1<=9 AND EXISTR(SZ1,5,1)
SS2赋值:上次SZ2距今天数
C3赋值:SS2>=2 AND SS2C4赋值:SS2>=3 AND SS2SZ3赋值:C3 OR C4 AND 统计SS2日满足C3 OR C4的天数=1 AND SS1<=9 AND EXISTR(SZ2,5,1)
{输出}{全市场适用}DRAWTEXT(GP AND PERIOD=5 AND YD1 AND 统计0日满足AMO>0的天数>5,0.992*L,'↖▲'),COLORB4B4B4
DRAWTEXT(GP AND PERIOD=5 AND YD2 AND 统计0日满足AMO>0的天数>5,0.992*L,'↖2'),COLORB4B4B4
当满足条件GP AND PERIOD=5 AND YD3 AND CYB=0时,在0.992*L和'↖3'位置书写文字
DRAWTEXT(GP AND PERIOD=5 AND YD4 AND INBLOCK('上证A股'),0.992*L,'↖4'),画白色
当满足条件GP AND PERIOD=5 AND YD5 AND SHZB时,在0.992*L和'↖5'位置书写文字
DRAWTEXT(GP AND PERIOD=5 AND YDX AND INBLOCK('上证A股'),0.992*L,'↖▲'),COLORB4B4B4
DRAWTEXT(GP AND PERIOD=5 AND YDX2 AND INBLOCK('上证A股'),0.992*L,'↖2'),COLORB4B4B4
DRAWTEXT(GP AND PERIOD=5 AND YDX3 AND INBLOCK('上证A股'),0.992*L,'↖3'),COLORB4B4B4
当满足条件GP AND PERIOD=5 AND CY3时,在0.992*L和'↖▲'位置书写文字
当满足条件GP AND PERIOD=5 AND CY4时,在0.992*L和'↖2'位置书写文字
当满足条件GP AND PERIOD=5 AND YD4 AND SZZB AND DATE<1230410时,在0.992*L和'↖4'位置书写文字
当满足条件GP AND PERIOD=5 AND YD5 AND SZZB AND DATE<1230410时,在0.992*L和'↖5'位置书写文字
当满足条件GP AND PERIOD=5 AND YDX AND SZZB AND DATE<1230410时,在0.992*L和'↖▲'位置书写文字
当满足条件GP AND PERIOD=5 AND YDX2 AND SZZB AND DATE<1230410时,在0.992*L和'↖2'位置书写文字
当满足条件GP AND PERIOD=5 AND YDX3 AND SZZB AND DATE<1230410时,在0.992*L和'↖3'位置书写文字
当满足条件GP AND PERIOD=5 AND SZZB4 AND SZZB AND DATE>=1230410时,在0.992*L和'↖4'位置书写文字
当满足条件GP AND PERIOD=5 AND SZZB1 AND SZZB AND DATE>=1230410时,在0.992*L和'↖▲'位置书写文字
当满足条件GP AND PERIOD=5 AND SZZB2 AND SZZB AND DATE>=1230410时,在0.992*L和'↖2'位置书写文字
当满足条件GP AND PERIOD=5 AND SZZB3 AND SZZB AND DATE>=1230410时,在0.992*L和'↖3'位置书写文字
当满足条件GP AND PERIOD=5 AND SZ1 AND SZZB时,在0.992*L和'↖▲'位置书写文字
当满足条件GP AND PERIOD=5 AND SZ2 AND SZZB时,在0.992*L和'↖2'位置书写文字
当满足条件GP AND PERIOD=5 AND SZ3 AND SZZB时,在0.992*L和'↖3'位置书写文字
当满足条件GP AND PERIOD=5 AND Y1 AND SHZB AND DATE>=1230417时,在L和1之间画图标
当满足条件GP AND PERIOD=5 AND Y2 AND SHZB AND DATE>=1230524时,在L和38之间画图标
当满足条件GP AND PERIOD=5 AND Y1 AND KCB时,在L和1之间画图标
当满足条件GP AND PERIOD=5 AND Y2 AND KCB AND DATE>=1230101时,在L和38之间画图标
当满足条件GP AND PERIOD=5 AND CY101 AND CYB时,在L和1之间画图标
当满足条件GP AND PERIOD=5 AND CY102 AND CYB时,在L和1之间画图标
当满足条件GP AND PERIOD=5 AND CY201 AND CYB AND DATE>=1230101时,在L和38之间画图标
当满足条件GP AND PERIOD=5 AND CY202 AND CYB AND DATE>=1230101时,在L和38之间画图标
DRAWICON(GP AND PERIOD=5 AND Y1 AND SZZB AND EXISTR(YD4,9,1)=0 AND DATE>=1230417,L,1)
DRAWICON(GP AND PERIOD=5 AND Y2 AND SZZB AND EXISTR(X1,W2,1)=0 AND DATE>=1230524,L,38)