通达信个股情绪空间副图指标 显示连板龙头股 周期高度 源码附图
B1:=1.2;
B2:=1.06;
X1:=1;
X2:=1;
XC:=1;
DYX:=1;
下跌:"880003$DECLINE",COLORGREEN NODRAW;
上涨:"880003$ADVANCE",COLORRED NODRAW;
跌停数:SCJYVALUE(24,2,0),COLORGREEN NODRAW;
涨停数:SCJYVALUE(24,1,0), COLOR5E409B NODRAW ;
连板高度:SCJYVALUE(30,1,0)COLORWHITE NODRAW;
连板个数:SCJYVALUE(23,2,0), COLOR808080,NODRAW;
LBGD:=连板高度;
TJ1:=LBGD;
TJ2:=REFX(TJ1,1);
NOTEXTLBGD1:IF(TJ1<2 AND TJ2>2,TJ2-1,TJ1),COLORD6A82E LINETHICK2;
NOTEXTLBGD2:IF(LBGD>1,LBGD,DRAWNULL), CIRCLEDOT COLORC0C0C0 ;
NOTEXTLBGD3:IF(LBGD>1 AND LBGD<REF(LBGD,1),LBGD,DRAWNULL),COLOR408000 LINETHICK2;
NOTEXTLBGD4:IF(LBGD>1 AND LBGD>REFX(LBGD,1),LBGD,DRAWNULL),COLOR408000 LINETHICK2;
NOTEXTLBGD5:IF(LBGD>1 AND LBGD>REF(LBGD,1),LBGD,DRAWNULL),COLOR3AABDC LINETHICK2;
NOTEXTLBGD6:IF(LBGD>1 AND LBGD<REFX(LBGD,1),LBGD,DRAWNULL),COLOR3AABDC LINETHICK2;
NOTEXTLBGD7:IF(LBGD>1 AND LBGD>REF(LBGD,1) AND LBGD>4,LBGD,DRAWNULL),COLOR6A2EE9 LINETHICK2;
DRAWNUMBER(LBGD>1,LBGD,LBGD)DRAWABOVE;
HZT:=CONST(HHV(涨停数,300));
HLB:=CONST(HHV(LBGD,300));
HLBGS:=CONST(HHV(连板个数,300));
TEMP1:=HLB*涨停数/HZT;
NOTEXT涨停:HLB*涨停数/HZT,COLOR5E409B ;
NOTEXT涨停2:IF(TEMP1>0 AND X1=1,TEMP1,DRAWNULL),COLOR5E409B POINTDOT LINETHICK4;
DRAWNUMBER(涨停数>0 AND X1=1,TEMP1,涨停数)DRAWABOVE COLOR5E409B;
NOTEXT连板:HLB*连板个数/HLBGS, COLOR808080;
TEMP2:=HLB*连板个数/HLBGS;
NOTEXT连板2:IF(连板个数>0 AND X2=1,TEMP2,DRAWNULL), POINTDOT LINETHICK4 COLOR808080;
DRAWNUMBER(连板个数>1 AND X2=1,TEMP2*B2,连板个数)COLOR808080 DRAWABOVE;
LD:=BARSLAST(LBGD<REF(LBGD,1) AND REF(LBGD,1)>=REF(LBGD,2));
周期高度:IF(LBGD<REF(LBGD,LD+1) AND REFX(LD,1)<>0,REF(LBGD,LD+1),LBGD)COLOR808080 DOTLINE;
DRAWNUMBER(LBGD<REF(LBGD,LD+1) AND REFX(LD,1)<>0,REF(LBGD,LD+1)*1.15,REF(LBGD,LD+1))COLOR808080;
股票代码:INSUM('历史连板股','LBZG',1,2),NODRAW COLOR6A2EE9;
股票名称:=INSUM('历史连板股','LBMC',1,2);
T1:=股票代码;
E1:=MOD(INTPART(T1/100000),10);
E2:=MOD(INTPART(T1/10000),10);
E3:=MOD(INTPART(T1/1000),10);
E4:=MOD(INTPART(T1/100),10);
E5:=MOD(INTPART(T1/10),10);
E6:=MOD(T1,10);
DRAWTEXT(XC=0 AND LBGD>5 AND LBGD>REFV(LBGD,1) AND LBGD>REFX(LBGD,1),LBGD*B1,股票名称)COLOR6A2EE9;
DRAWTEXT(XC=0 AND ISLASTBAR,LBGD*B1,股票名称)COLOR6A2EE9;
DRAWTEXT(XC=1 AND LBGD>5 AND LBGD>REFV(LBGD,1) AND LBGD>REFX(LBGD,1),LBGD*B1,VARCAT(VAR2STR(E1,0),VARCAT(VAR2STR(E2,0),VARCAT(VAR2STR(E3,0),VARCAT(VAR2STR(E4,0),VARCAT(VAR2STR(E5,0),VAR2STR(E6,0)))))))COLOR6A2EE9;
DRAWTEXT(XC=1 AND ISLASTBAR,LBGD*B1,VARCAT(VAR2STR(E1,0),VARCAT(VAR2STR(E2,0),VARCAT(VAR2STR(E3,0),VARCAT(VAR2STR(E4,0),VARCAT(VAR2STR(E5,0),VAR2STR(E6,0)))))))COLOR6A2EE9;
WK:=WEEKDAY;
DRAWTEXT(WK=1,0,'一')COLOR808080;
DRAWTEXT(WK=2,0,'二')COLOR808080;
DRAWTEXT(WK=3,0,'三')COLOR808080;
DRAWTEXT(WK=4,0,'四')COLOR808080;
DRAWTEXT(WK=5,0,'五')COLOR808080;
DY:=DAY;
DRAWNUMBER(LBGD>1 AND DYX=1,18,DY) COLOR808080;
STICKLINE(MONTH<>REF(MONTH,1) AND DYX=1,0,17,0,-1)COLOR5B6867;
未来函数检测结果如下:
该公式包含未来函数:REFX
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
B1赋值:1.2
B2赋值:1.06
X1赋值:1
X2赋值:1
XC赋值:1
DYX赋值:1
输出下跌:"880003$DECLINE",画绿色 NODRAW
输出上涨:"880003$ADVANCE",画红色 NODRAW
输出跌停数:SCJYVALUE(24,2,0),画绿色 NODRAW
输出涨停数:SCJYVALUE(24,1,0), COLOR5E409B NODRAW
输出连板高度:SCJYVALUE(30,1,0)画白色 NODRAW
输出连板个数:SCJYVALUE(23,2,0), COLOR808080,NODRAW
LBGD赋值:连板高度
TJ1赋值:LBGD
TJ2赋值:REFX(TJ1,1)
如果TJ1<2 AND TJ2>2返回TJ2-1否则返回TJ1
如果LBGD>1返回LBGD否则返回DRAWNULL
NOTEXTLBGD3:IF(LBGD>1 AND LBGD<1日前的LBGD,LBGD,DRAWNULL),COLOR408000 线宽为2
NOTEXTLBGD4:IF(LBGD>1 AND LBGD>REFX(LBGD,1),LBGD,DRAWNULL),COLOR408000 线宽为2
NOTEXTLBGD5:IF(LBGD>1 AND LBGD>1日前的LBGD,LBGD,DRAWNULL),COLOR3AABDC 线宽为2
NOTEXTLBGD6:IF(LBGD>1 AND LBGD
NOTEXTLBGD7:IF(LBGD>1 AND LBGD>1日前的LBGD AND LBGD>4,LBGD,DRAWNULL),COLOR6A2EE9 线宽为2
DRAWNUMBER(LBGD>1,LBGD,LBGD)DRAWABOVE
HZT赋值:CONST(300日内涨停数最高值)
HLB赋值:CONST(300日内LBGD最高值)
HLBGS:=CONST(300日内连板个数最高值)
TEMP1赋值:HLB*涨停数/HZT
输出NOTEXT涨停:HLB*涨停数/HZT,COLOR5E409B
如果TEMP1>0 AND X1=1返回TEMP1否则返回DRAWNULL
DRAWNUMBER(涨停数>0 AND X1=1,TEMP1,涨停数)DRAWABOVE COLOR5E409B
输出NOTEXT连板:HLB*连板个数/HLBGS, COLOR808080
TEMP2赋值:HLB*连板个数/HLBGS
如果连板个数>0 AND X2=1返回TEMP2否则返回DRAWNULL
DRAWNUMBER(连板个数>1 AND X2=1,TEMP2*B2,连板个数)COLOR808080 DRAWABOVE
LD赋值:上次LBGD<1日前的LBGD AND 1日前的LBGD>=2日前的LBGD距今天数
输出周期高度:IF(LBGD0,LD+1日前的LBGD,LBGD)COLOR808080 DOTLINE
DRAWNUMBER(LBGD0,LD+1日前的LBGD*1.15,LD+1日前的LBGD)COLOR808080
输出股票代码:INSUM('历史连板股','LBZG',1,2),NODRAW COLOR6A2EE9
股票名称赋值:INSUM('历史连板股','LBMC',1,2)
T1赋值:股票代码
E1赋值:MOD(INTPART(T1/100000),10)
E2赋值:MOD(INTPART(T1/10000),10)
E3赋值:MOD(INTPART(T1/1000),10)
E4赋值:MOD(INTPART(T1/100),10)
E5赋值:MOD(INTPART(T1/10),10)
E6赋值:MOD(T1,10)
DRAWTEXT(XC=0 AND LBGD>5 AND LBGD>REFV(LBGD,1) AND LBGD>REFX(LBGD,1),LBGD*B1,股票名称)COLOR6A2EE9
当满足条件XC=0 AND ISLASTBAR时,在LBGD*B1和股票名称位置书写文字
DRAWTEXT(XC=1 AND LBGD>5 AND LBGD>REFV(LBGD,1) AND LBGD>REFX(LBGD,1),LBGD*B1,VARCAT(VAR2STR(E1,0),VARCAT(VAR2STR(E2,0),VARCAT(VAR2STR(E3,0),VARCAT(VAR2STR(E4,0),VARCAT(VAR2STR(E5,0),VAR2STR(E6,0)))))))COLOR6A2EE9
DRAWTEXT(XC=1 AND ISLASTBAR,LBGD*B1,VARCAT(VAR2STR(E1,0),VARCAT(VAR2STR(E2,0),VARCAT(VAR2STR(E3,0),VARCAT(VAR2STR(E4,0),VARCAT(VAR2STR(E5,0),VAR2STR(E6,0)))))))COLOR6A2EE9
WK赋值:WEEKDAY
当满足条件WK=1时,在0和'一'位置书写文字
当满足条件WK=2时,在0和'二'位置书写文字
当满足条件WK=3时,在0和'三'位置书写文字
当满足条件WK=4时,在0和'四'位置书写文字
当满足条件WK=5时,在0和'五'位置书写文字
DY赋值:DAY
DRAWNUMBER(LBGD>1 AND DYX=1,18,DY) COLOR808080
STICKLINE(MONTH<>1日前的MONTH AND DYX=1,0,17,0,-1)COLOR5B6867