通达信涨停先锋套装指标 使用方法 源码附图
{涨停先锋副图源码如下}
M6:=10;
M8:=20;
N6:=20;
ABC1:=(1+M6/100)*MA(CLOSE,N6),COLORYELLOW;
ABC2:=(1-M8/100)*MA(CLOSE,N6),COLORBLUE;
ABC3:=(ABC1+ABC2)/2,COLORWHITE DOTLINE;
ABC4:=8*(ABC1+ABC2)/14,COLORRED;
ABC5:=6*(ABC1+ABC2)/14,COLORGREEN;
好股网:=1200823;
涨停:=IF(DATE< 好股网,ZTPRICE(REF(C,1),IF(CODELIKE('688'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1))),ZTPRICE(REF(C,1),IF(CODELIKE('688') OR CODELIKE('300'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1)))),NODRAW,COLORRED;
跌停:=IF(DATE< 好股网,DTPRICE(REF(C,1),IF(CODELIKE('688'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1))),DTPRICE(REF(C,1),IF(CODELIKE('688') OR CODELIKE('300'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1)))),NODRAW,COLORGREEN;
M涨停:=IF(DATE< 好股网,C*IF(CODELIKE('688'),1.2,IF(NAMEINCLUDE('S'),1.05,1.1)),C*(IF(CODELIKE('688') OR CODELIKE('300'),1.2,IF(NAMEINCLUDE('S'),1.05,1.1)))),NODRAW,COLORLIMAGENTA;
M跌停:=IF(DATE< 好股网,C*IF(CODELIKE('688'),0.8,IF(NAMEINCLUDE('S'),0.45,0.9)),C*(IF(CODELIKE('688') OR CODELIKE('300'),0.8,IF(NAMEINCLUDE('S'),0.45,0.9)))),NODRAW,COLORFFFF00;
ACC:=C>=涨停 AND PERIOD=5 AND H=C;
ACC1:=H>=涨停 AND PERIOD=5 AND H>C;
ACB:=C<=跌停 AND PERIOD=5 AND L=C;
ACB1:=L<=跌停 AND PERIOD=5 AND L< C;
TJ:=V=HHV(V,100);
N:=9;
M1:=3;
M2:=3;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,M1,1);
D:=SMA(K,M2,1);
J:=3*K-2*D;
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
XG:=MACD>0;
K1:=SUMBARS(TJ,1);
涨停先锋:=C>ABC4 AND REF(C,1)< ABC4 AND (C-REF(C,1))/REF(C,1)>0.09;
STICKLINE(涨停先锋,0,1,2,0),COLORMAGENTA;
DRAWTEXT(涨停先锋,0.8,' ★涨停先锋'),COLORRED;
DRAWICON(涨停先锋,1,9);
{涨停先锋主图源码如下}
M6:=10;
M8:=20;
N6:=20;
ABC1:=(1+M6/100)*MA(CLOSE,N6),COLORYELLOW;
ABC2:(1-M8/100)*MA(CLOSE,N6),COLORBLUE;
ABC3:(ABC1+ABC2)/2,COLORWHITE DOTLINE;
ABC4:8*(ABC1+ABC2)/14,COLORRED;
ABC5:6*(ABC1+ABC2)/14,COLORGREEN;
好股网:=1200823;
涨停:IF(DATE< 好股网,ZTPRICE(REF(C,1),IF(CODELIKE('688'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1))),ZTPRICE(REF(C,1),IF(CODELIKE('688') OR CODELIKE('300'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1)))),NODRAW,COLORRED;
跌停:=IF(DATE< 好股网,DTPRICE(REF(C,1),IF(CODELIKE('688'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1))),DTPRICE(REF(C,1),IF(CODELIKE('688') OR CODELIKE('300'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1)))),NODRAW,COLORGREEN;
M涨停:IF(DATE< 好股网,C*IF(CODELIKE('688'),1.2,IF(NAMEINCLUDE('S'),1.05,1.1)),C*(IF(CODELIKE('688') OR CODELIKE('300'),1.2,IF(NAMEINCLUDE('S'),1.05,1.1)))),NODRAW,COLORLIMAGENTA;
M跌停:=IF(DATE< 好股网,C*IF(CODELIKE('688'),0.8,IF(NAMEINCLUDE('S'),0.45,0.9)),C*(IF(CODELIKE('688') OR CODELIKE('300'),0.8,IF(NAMEINCLUDE('S'),0.45,0.9)))),NODRAW,COLORFFFF00;
ACC:=C>=涨停 AND PERIOD=5 AND H=C;
ACC1:=H>=涨停 AND PERIOD=5 AND H>C;
ACB:=C<=跌停 AND PERIOD=5 AND L=C;
ACB1:=L<=跌停 AND PERIOD=5 AND L< C;
TJ:=V=HHV(V,100);
N:=9;
M1:=3;
M2:=3;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,M1,1);
D:=SMA(K,M2,1);
J:=3*K-2*D;
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
XG:=MACD>0;
DRAWICON(CROSS(J,50)AND XG,L,26);
K1:=SUMBARS(TJ,1);
涨停先锋:=C>ABC4 AND REF(C,1)< ABC4 AND (C-REF(C,1))/REF(C,1)>0.09;
STICKLINE(涨停先锋,OPEN,CLOSE,2,0),COLORMAGENTA;
STICKLINE(CROSS(J,50)AND XG,OPEN,CLOSE,0.6,0),COLORYELLOW;
DRAWTEXT(涨停先锋,L,'★涨停先锋');
DRAWICON(涨停先锋,L,9);
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
{涨停先锋副图源码如下}M6赋值:10
M8赋值:20
N6赋值:20
ABC1赋值:(1+M6/100)*收盘价的N6日简单移动平均,画黄色
ABC2赋值:(1-M8/100)*收盘价的N6日简单移动平均, 画蓝色
ABC3赋值:(ABC1+ABC2)/2,画白色 DOTLINE
ABC4赋值:8*(ABC1+ABC2)/14,COLORRED
ABC5赋值:6*(ABC1+ABC2)/14,COLORGREEN
好股网赋值:1200823
涨停赋值:IF(DATE< 好股网,ZTPRICE(1日前的C,IF(CODELIKE('688'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1))),ZTPRICE(1日前的C,IF(CODELIKE('688') OR CODELIKE('300'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1)))),NODRAW,COLORRED
跌停赋值:IF(DATE< 好股网,DTPRICE(1日前的C,IF(CODELIKE('688'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1))),DTPRICE(1日前的C,IF(CODELIKE('688') OR CODELIKE('300'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1)))),NODRAW,COLORGREEN
M涨停赋值:IF(DATE< 好股网,C*IF(CODELIKE('688'),1.2,IF(NAMEINCLUDE('S'),1.05,1.1)),C*(IF(CODELIKE('688') OR CODELIKE('300'),1.2,IF(NAMEINCLUDE('S'),1.05,1.1)))),NODRAW,COLORLIMAGENTA
M跌停赋值:IF(DATE< 好股网,C*IF(CODELIKE('688'),0.8,IF(NAMEINCLUDE('S'),0.45,0.9)),C*(IF(CODELIKE('688') OR CODELIKE('300'),0.8,IF(NAMEINCLUDE('S'),0.45,0.9)))),NODRAW,COLORFFFF00
ACC赋值:C>=涨停 AND PERIOD=5 AND H=C
ACC1:=H>=涨停 AND PERIOD=5 AND H>C
ACB赋值:C<=跌停 AND PERIOD=5 AND L=C
ACB1:=L<=跌停 AND PERIOD=5 AND L< C
TJ赋值:V=100日内V最高值
N赋值:9
M1赋值:3
M2赋值:3
RSV赋值:(收盘价-N日内最低价最低值)/(N日内最高价最高值-N日内最低价最低值)*100
RSV的M1日[1日权重]移动平均
K的M2日[1日权重]移动平均
J赋值:3*K-2*D
DIF:=收盘价的12日指数移动平均-收盘价的26日指数移动平均
DEA:=DIF的9日指数移动平均
MACD赋值:(DIF-DEA)*2
XG赋值:MACD>0
K1:=TJ累加至1的天数
涨停先锋:=C>ABC4 AND 1日前的C< ABC4 AND (C-1日前的C)/1日前的C>0.09
当满足条件涨停先锋时,在0和1之间画柱状线
当满足条件涨停先锋时,在0.8和' ★涨停先锋'位置书写文字
当满足条件涨停先锋时,在1和9之间画图标
{涨停先锋主图源码如下}M6:=10
M8赋值:20
N6赋值:20
ABC1赋值:(1+M6/100)*收盘价的N6日简单移动平均,画黄色
输出ABC2:(1-M8/100)*收盘价的N6日简单移动平均, 画蓝色
输出ABC3:(ABC1+ABC2)/2,画白色 DOTLINE
输出ABC4:8*(ABC1+ABC2)/14,COLORRED
输出ABC5:6*(ABC1+ABC2)/14,COLORGREEN
好股网赋值:1200823
输出涨停:IF(DATE< 好股网,ZTPRICE(1日前的C,IF(CODELIKE('688'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1))),ZTPRICE(1日前的C,IF(CODELIKE('688') OR CODELIKE('300'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1)))),NODRAW,COLORRED
跌停赋值:IF(DATE< 好股网,DTPRICE(1日前的C,IF(CODELIKE('688'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1))),DTPRICE(1日前的C,IF(CODELIKE('688') OR CODELIKE('300'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1)))),NODRAW,COLORGREEN
M输出涨停:IF(DATE< 好股网,C*IF(CODELIKE('688'),1.2,IF(NAMEINCLUDE('S'),1.05,1.1)),C*(IF(CODELIKE('688') OR CODELIKE('300'),1.2,IF(NAMEINCLUDE('S'),1.05,1.1)))),NODRAW,COLORLIMAGENTA
M跌停赋值:IF(DATE< 好股网,C*IF(CODELIKE('688'),0.8,IF(NAMEINCLUDE('S'),0.45,0.9)),C*(IF(CODELIKE('688') OR CODELIKE('300'),0.8,IF(NAMEINCLUDE('S'),0.45,0.9)))),NODRAW,COLORFFFF00
ACC赋值:C>=涨停 AND PERIOD=5 AND H=C
ACC1:=H>=涨停 AND PERIOD=5 AND H>C
ACB赋值:C<=跌停 AND PERIOD=5 AND L=C
ACB1:=L<=跌停 AND PERIOD=5 AND L< C
TJ赋值:V=100日内V最高值
N赋值:9
M1赋值:3
M2赋值:3
RSV赋值:(收盘价-N日内最低价最低值)/(N日内最高价最高值-N日内最低价最低值)*100
RSV的M1日[1日权重]移动平均
K的M2日[1日权重]移动平均
J赋值:3*K-2*D
DIF:=收盘价的12日指数移动平均-收盘价的26日指数移动平均
DEA:=DIF的9日指数移动平均
MACD赋值:(DIF-DEA)*2
XG赋值:MACD>0
DRAWICON(J上穿50AND XG,L,26)
K1:=TJ累加至1的天数
涨停先锋:=C>ABC4 AND 1日前的C< ABC4 AND (C-1日前的C)/1日前的C>0.09
当满足条件涨停先锋时,在OPEN和收盘价之间画柱状线
STICKLINE(J上穿50AND XG,OPEN,收盘价,0.6,0),画黄色
当满足条件涨停先锋时,在L和'★涨停先锋'位置书写文字
当满足条件涨停先锋时,在L和9之间画图标