起飞主图红线持股通达信公式 主图 源码附图
大盘上涨数:=INDEXADV;
大盘下跌数:=INDEXDEC;
大盘上涨率:=大盘上涨数/(大盘上涨数+大盘下跌数)*100;
大于70:=IF(大盘上涨率>=70,大盘上涨率,DRAWNULL);
小于70:=IF(大盘上涨率<70,大盘上涨率,DRAWNULL);
DRAWTEXT_FIX(1,0.0,0.18,0,'大盘上涨率:');
DRAWNUMBER_FIX(1,0.07,0.18,0,CONST(大于70)),COLORRED;
DRAWNUMBER_FIX(1,0.07,0.18,0,CONST(小于70)),COLORGREEN;
DRAWTEXT_FIX(1,0.11,0.18,0,'%');
行业上涨数:=HY_INDEXADV;
行业下跌数:=HY_INDEXDEC;
行业上涨率:=行业上涨数/(行业上涨数+行业下跌数)*100;
大于70以上:=IF(行业上涨率>=70,行业上涨率,DRAWNULL);
小于70以下:=IF(行业上涨率<70,行业上涨率,DRAWNULL);
DRAWTEXT_FIX(1,0.13,0.18,0,'行业上涨率:');
DRAWNUMBER_FIX(1,0.20,0.18,0,CONST(大于70以上)),COLORRED;
DRAWNUMBER_FIX(1,0.20,0.18,0,CONST(小于70以下)),COLORGREEN;
DRAWTEXT_FIX(1,0.24,0.18,0,'%');
X11:=(FINANCE(11)-FINANCE(15))/FINANCE(10)*1.2;
X12:=(FINANCE(31)+FINANCE(17))/FINANCE(10)*1.4;{盈余公积用资本公积金代替};
X13:=FINANCE(23)/FINANCE(10)*3.3;
X14:=FINANCE(19)/FINANCE(15)*0.6;{缺长期负债或负债总额}
X15:=FINANCE(20)/FINANCE(15)*0.999;
Z值:=X11+X12+X13+X14+X15;
DRAWTEXT_FIX(Z值<1.2,0.9,0,0,' 【●财务重警●】'),COLORRED;
DRAWTEXT_FIX( BETWEEN(Z值,1.2,2.6),0.9,0,0,' 【○财务轻警○】'),COLOR0099FF;
DRAWTEXT_FIX(Z值>2.6,0.9,0,0,' 【◎财务无警◎】'),COLORLIBLUE;
均:=(3*C+H+L+O)/6;
短线:=(8*均+7*REF(均,1)+6*REF(均,2)+5*REF(均,3)+4*REF(均,4)+3*REF(均,5)+2*REF(均,6)+REF(均,7))/36;
稳赢线:(LLV(短线,3)+LLV(短线,5)+LLV(短线,8))/3,LINETHICK1,CROSSDOT,COLORMAGENTA;
机构控盘线:MA(CLOSE,20),COLORRED,LINETHICK3;
IF(机构控盘线>REF(机构控盘线,1),机构控盘线,DRAWNULL),COLORRED,LINETHICK3;
IF(机构控盘线<=REF(机构控盘线,1),机构控盘线,DRAWNULL),LINETHICK3,COLORGREEN;
雷达线:EMA(CLOSE,8),COLORFFCC66,LINETHICK2;
IF(雷达线<REF(雷达线,2),雷达线,DRAWNULL),COLORWHITE,LINETHICK2;
涨幅:=(C/REF(C,1)-1)*100;
{涨幅A:=(C-REF(C,1))/REF(C,1)*100,NODRAW;
连涨:=BARSLASTCOUNT(C>REF(C,1) ),NODRAW;{连涨3天数}
{A1A:=C>REF(C,1) ,NODRAW;
A2A:=A1A*涨幅,NODRAW;
最后1天:=SUM(A2A,连涨) AND REFXV(C<REF(C,1),1),NODRAW;
求和:=SUM(A2A,连涨) ,NODRAW;
DRAWTEXT(最后1天=1 AND 连涨>=3,H*1.01,VARCAT(VAR2STR(求和,2),'%')),COLORMAGENTA;}
连涨:=BARSLASTCOUNT(C>REF(C,1)),NODRAW;{连涨天数}
A1A:=C>REF(C,1),NODRAW;
A2A:=A1A*涨幅,NODRAW;
最后1天:=SUM(A2A,连涨) AND REFXV(C<REF(C,1),1),NODRAW;
求和:=SUM(A2A,连涨) ,NODRAW;
DRAWTEXT(最后1天=1 AND 连涨>=3 AND 求和<=10,H*1.01,VARCAT(VAR2STR(求和,1),'%')),COLORMAGENTA;
DRAWTEXT(最后1天=1 AND 连涨>=3 AND 求和>10,H*1.01,VARCAT(VAR2STR(求和,1),'%')),COLORYELLOW;
连跌:=BARSLASTCOUNT(C<REF(C,1)),NODRAW;{连跌天数}
A1B:=C<REF(C,1) ,NODRAW;
A2B:=A1B*涨幅,NODRAW;
最后1天B:=SUM(A2B,连跌) AND REFXV(C>REF(C,1),1),NODRAW;
求和B:=SUM(A2B,连跌) ,NODRAW;
DRAWTEXT(最后1天B=1 AND 连跌>=3 AND 求和B<-10,L*0.99,VARCAT(VAR2STR(求和B*-1,1),'%')),COLORGREEN;
DRAWTEXT_FIX(1,0.915,0.93,0,'连续涨'),COLORYELLOW;
DRAWNUMBER_FIX(1,0.96,0.93,0,CONST(连涨)),COLORRED;
DRAWTEXT_FIX(1,0.98,0.93,0,'天'),COLORYELLOW;
DRAWTEXT_FIX(1,0.915,1,0,'连续跌'),COLORGREEN;
DRAWNUMBER_FIX(1,0.96,1,0,CONST(连跌)),COLORGREEN;
DRAWTEXT_FIX(1,0.98,1,0,'天'),COLORGREEN;
RC1:=REF(C,1);
ZT:=C/REF(C,1)>1.099 AND H>L;
CS:=IF(C>=1,10000,100000);
C涨停10:=1.10*RC1-49/CS;{考虑到4舍5入}
C涨停5 :=1.05*RC1-49/CS;
C跌停10:=0.90*RC1+51/CS;
C跌停5 :=0.95*RC1+51/CS;
ST:=NAMELIKE('S') OR NAMELIKE('*S');
涨停:= IF(ST, C>=C涨停5, C>=C涨停10);
跌停:= IF(ST, C<=C跌停5, C<=C跌停10);
盘中涨停:=IF(ST, H>=C涨停5, H>=C涨停10);
盘中跌停:=IF(ST, L<=C跌停5, L<=C跌停10);
STICKLINE(盘中涨停,H,MAX(C,O),0,0),COLORMAGENTA;{涨停后回落}
STICKLINE(盘中跌停,L,MIN(C,O),0,0),COLORLICYAN;{跌停后回升};
STICKLINE(涨停,O,C,1,0),COLORMAGENTA;
STICKLINE(跌停,O,C,1,0),COLORLICYAN;
{涨停}
STICKLINE(C/REF(C,1)>=1.09,O,C,3.2,0),COLOR0033FF;
STICKLINE(C/REF(C,1)>=1.09,O,C,2.8,0),COLOR0055FF;
STICKLINE(C/REF(C,1)>=1.09,O,C,2.4,0),COLOR0077FF;
STICKLINE(C/REF(C,1)>=1.09,O,C,2.0,0),COLOR0099FF;
STICKLINE(C/REF(C,1)>=1.09,O,C,1.6,0),COLOR00AAFF;
STICKLINE(C/REF(C,1)>=1.09,O,C,0.8,0),COLOR00CCFF;
STICKLINE(C/REF(C,1)>=1.09,O,C,0.4,0),COLOR00DDFF;
STICKLINE(C/REF(C,1)>=1.09,O,C,0.0,0),COLOR00EEFF;
DRAWTEXT_FIX(1,0.980,20,1,'★股票指标网'),COLOR666666;
{跌停}
A:=REF(C,1);B:=ZTPRICE(A,0.1)=C AND H=C;
DD:=DTPRICE(A,0.1)=C AND L=C;
STICKLINE(DD,H,L,0.00001,0),COLORGREEN;
STICKLINE(DD,O,C,3.2,0),COLOR005500;
STICKLINE(DD,O,C,2.4,0),COLOR007700;
STICKLINE(DD,O,C,1.6,0),COLOR009900;
STICKLINE(DD,O,C,0.8,0),COLOR00BB00;
STICKLINE(DD,O,C,0.4,0),COLOR00DD00;
STICKLINE(DD,O,C,0.0,0),COLOR00FF00;
天线:=MA(C,5),DOTLINE,COLORWHITE,LINETHICK0;
人线:=MA(C,36),NODRAW;
地线:=人线*0.99,COLORRED;
金线:=人线*0.97,DOTLINE;
D11:=天线/地线;
D2:=D11>=1 AND D11<1.02;
D3:=CROSS(C,天线) AND CROSS(C,地线);
伏1:=D2 AND D3 AND 天线>地线 AND L<地线 AND O<地线;
伏:=FILTER(伏1,40)*1,COLORYELLOW;
DRAWTEXT(伏,L*0.99,'埋★伏'),COLORYELLOW;
DRAWICON(伏,L*0.975,25);
DRAWSL(伏 AND C>O,C,0,35,0),COLORYELLOW;
DRAWSL(伏 AND C<O,O,0,35,0),COLORGREEN;
DRAWSL(伏,H,0,35,0),COLORMAGENTA;
XA:=BARSLAST(伏),NODRAW;
伏值C:=REF(C,XA);
伏值H:=REF(H,XA);
起飞:=(CROSS(C,伏值C) OR CROSS(C,伏值H)) AND H>L AND C>REF(C,1) AND REF(伏=0,1) AND XA<=30 AND XA>2 AND 涨幅>=2 AND 涨幅<9.91;
起飞过滤:=FILTER(起飞,10);
DRAWTEXT(起飞过滤,L*0.99,'起飞'),COLORYELLOW;
起飞2:=(CROSS(C,伏值C) OR CROSS(C,伏值H)) AND H>L AND C>REF(C,1) AND REF(伏=0,1) AND XA<=30 AND 涨幅>=9.91;
DRAWTEXT(起飞2,L*0.99,'起飞爆'),COLORYELLOW;
起飞异动:=起飞过滤=1 AND (VOL*10000/FINANCE(7)>=5 OR 涨幅>=5);
DRAWTEXT(起飞异动,L*0.99,'起飞'),COLORMAGENTA;
DRAWTEXT(起飞异动,L*0.97,'异动'),COLORMAGENTA;
未来函数检测结果如下:
该公式包含未来函数:FINANCE
该公式包含未来函数:REFX
该公式包含未来函数:REFXV
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
大盘上涨数赋值:INDEXADV
大盘下跌数赋值:INDEXDEC
大盘上涨率赋值:大盘上涨数/(大盘上涨数+大盘下跌数)*100
如果大盘上涨率>=70返回大盘上涨率否则返回DRAWNULL
如果大盘上涨率<70返回大盘上涨率否则返回DRAWNULL
当满足条件1时,在横轴0.0纵轴0.18位置书写文字
DRAWNUMBER_FIX(1,0.07,0.18,0,CONST(大于70)),画红色
DRAWNUMBER_FIX(1,0.07,0.18,0,CONST(小于70)),画绿色
当满足条件1时,在横轴0.11纵轴0.18位置书写文字
行业上涨数赋值:HY_INDEXADV
行业下跌数赋值:HY_INDEXDEC
行业上涨率赋值:行业上涨数/(行业上涨数+行业下跌数)*100
如果行业上涨率>=70返回行业上涨率否则返回DRAWNULL
如果行业上涨率<70返回行业上涨率否则返回DRAWNULL
当满足条件1时,在横轴0.13纵轴0.18位置书写文字
DRAWNUMBER_FIX(1,0.20,0.18,0,CONST(大于70以上)),画红色
DRAWNUMBER_FIX(1,0.20,0.18,0,CONST(小于70以下)),画绿色
当满足条件1时,在横轴0.24纵轴0.18位置书写文字
X11赋值:(FINANCE(11)-FINANCE(15))/FINANCE(10)*1.2
X12赋值:(FINANCE(31)+FINANCE(17))/FINANCE(10)*1.4
{盈余公积用资本公积金代替}
X13赋值:FINANCE(23)/FINANCE(10)*3.3
X14赋值:FINANCE(19)/FINANCE(15)*0.6
{缺长期负债或负债总额}
X15赋值:FINANCE(20)/FINANCE(15)*0.999
Z值赋值:X11+X12+X13+X14+X15
当满足条件Z值<1.2时,在横轴0.9纵轴0位置书写文字
DRAWTEXT_FIX( BETWEEN(Z值,1.2,2.6),0.9,0,0,' 【○财务轻警○】'),COLOR0099FF
当满足条件Z值>2.6时,在横轴0.9纵轴0位置书写文字
均赋值:(3*C+H+L+O)/6
短线赋值:(8*均+7*1日前的均+6*2日前的均+5*3日前的均+4*4日前的均+3*5日前的均+2*6日前的均+7日前的均)/36
输出稳赢线:(3日内短线最低值+5日内短线最低值+8日内短线最低值)/3,LINETHICK1,CROSSDOT,画洋红色
输出机构控盘线:收盘价的20日简单移动平均,画红色, 线宽为3
IF(机构控盘线>1日前的机构控盘线,机构控盘线,DRAWNULL),画红色, 线宽为3
IF(机构控盘线<=1日前的机构控盘线,机构控盘线,DRAWNULL), 线宽为3,画绿色
输出雷达线:收盘价的8日指数移动平均,COLORFFCC66, 线宽为2
IF(雷达线<2日前的雷达线,雷达线,DRAWNULL),画白色, 线宽为2
涨幅赋值:(C/1日前的C-1)*100
{涨幅A:=(C-1日前的C)/1日前的C*100,NODRAW
连涨赋值:BARSLASTCOUNT(C>1日前的C ),NODRAW
{连涨3天数}
{A1A:=C>1日前的C ,NODRAW
A2A赋值:A1A*涨幅,NODRAW
最后1天赋值:连涨的A2A日累和 AND REFXV(C<1日前的C,1),NODRAW
求和赋值:连涨的A2A日累和 ,NODRAW
DRAWTEXT(最后1天=1 AND 连涨>=3,H*1.01,VARCAT(VAR2STR(求和,2),'%')),画洋红色
}
连涨赋值:BARSLASTCOUNT(C>1日前的C),NODRAW
{连涨天数}
A1A:=C>1日前的C,NODRAW
A2A赋值:A1A*涨幅,NODRAW
最后1天赋值:连涨的A2A日累和 AND REFXV(C<1日前的C,1),NODRAW
求和赋值:连涨的A2A日累和 ,NODRAW
DRAWTEXT(最后1天=1 AND 连涨>=3 AND 求和<=10,H*1.01,VARCAT(VAR2STR(求和,1),'%')),画洋红色
DRAWTEXT(最后1天=1 AND 连涨>=3 AND 求和>10,H*1.01,VARCAT(VAR2STR(求和,1),'%')),画黄色
连跌赋值:BARSLASTCOUNT(C<1日前的C),NODRAW
{连跌天数}
A1B赋值:C<1日前的C ,NODRAW
A2B赋值:A1B*涨幅,NODRAW
最后1天B赋值:连跌的A2B日累和 AND REFXV(C>1日前的C,1),NODRAW
求和B赋值:连跌的A2B日累和 ,NODRAW
DRAWTEXT(最后1天B=1 AND 连跌>=3 AND 求和B<-10,L*0.99,VARCAT(VAR2STR(求和B*-1,1),'%')),画绿色
当满足条件1时,在横轴0.915纵轴0.93位置书写文字
DRAWNUMBER_FIX(1,0.96,0.93,0,CONST(连涨)),画红色
当满足条件1时,在横轴0.98纵轴0.93位置书写文字
当满足条件1时,在横轴0.915纵轴1位置书写文字
DRAWNUMBER_FIX(1,0.96,1,0,CONST(连跌)),画绿色
当满足条件1时,在横轴0.98纵轴1位置书写文字
RC1赋值:1日前的C
ZT赋值:C/1日前的C>1.099 AND H>L
如果C>=1返回10000否则返回100000
C涨停10赋值:1.10*RC1-49/CS
{考虑到4舍5入}
C涨停5 :=1.05*RC1-49/CS
C跌停10赋值:0.90*RC1+51/CS
C跌停5 :=0.95*RC1+51/CS
ST赋值:NAMELIKE('S') OR NAMELIKE('*S')
如果ST返回 C>=C涨停5否则返回 C>=C涨停10
如果ST返回 C<=C跌停5否则返回 C<=C跌停10
如果ST返回 H>=C涨停5否则返回 H>=C涨停10
如果ST返回 L<=C跌停5否则返回 L<=C跌停10
STICKLINE(盘中涨停,H,C和O较大值,0,0),画洋红色
{涨停后回落}
STICKLINE(盘中跌停,L,C和O的较小值,0,0),COLORLICYAN
{跌停后回升}
当满足条件涨停时,在O和C之间画柱状线
当满足条件跌停时,在O和C之间画柱状线
{涨停}
STICKLINE(C/1日前的C>=1.09,O,C,3.2,0),COLOR0033FF
STICKLINE(C/1日前的C>=1.09,O,C,2.8,0),COLOR0055FF
STICKLINE(C/1日前的C>=1.09,O,C,2.4,0),COLOR0077FF
STICKLINE(C/1日前的C>=1.09,O,C,2.0,0),COLOR0099FF
STICKLINE(C/1日前的C>=1.09,O,C,1.6,0),COLOR00AAFF
STICKLINE(C/1日前的C>=1.09,O,C,0.8,0),COLOR00CCFF
STICKLINE(C/1日前的C>=1.09,O,C,0.4,0),COLOR00DDFF
STICKLINE(C/1日前的C>=1.09,O,C,0.0,0),COLOR00EEFF
当满足条件1时,在横轴0.980纵轴20位置书写文字
{跌停}
A:=1日前的C
B赋值:ZTPRICE(A,0.1)=C AND H=C
DD赋值:DTPRICE(A,0.1)=C AND L=C
当满足条件DD时,在H和L之间画柱状线
当满足条件DD时,在O和C之间画柱状线
当满足条件DD时,在O和C之间画柱状线
当满足条件DD时,在O和C之间画柱状线
当满足条件DD时,在O和C之间画柱状线
当满足条件DD时,在O和C之间画柱状线
当满足条件DD时,在O和C之间画柱状线
天线赋值:C的5日简单移动平均,DOTLINE,画白色,LINETHICK0
人线赋值:C的36日简单移动平均,NODRAW
地线赋值:人线*0.99,画红色
金线赋值:人线*0.97,DOTLINE
D11赋值:天线/地线
D2赋值:D11>=1 AND D11<1.02
D3赋值:C上穿天线 AND C上穿地线
伏1赋值:D2 AND D3 AND 天线>地线 AND L<地线 AND O<地线
伏赋值:伏1的40过滤*1,画黄色
当满足条件伏时,在L*0.99和'埋★伏'位置书写文字
当满足条件伏时,在L*0.975和25之间画图标
DRAWSL(伏 AND C>O,C,0,35,0),画黄色
DRAWSL(伏 AND C
DRAWSL(伏,H,0,35,0),画洋红色
XA赋值:上次伏距今天数,NODRAW
伏值C:=XA日前的C
伏值H:=XA日前的H
起飞赋值:(C上穿伏值C OR C上穿伏值H) AND H>L AND C>1日前的C AND 1日前的伏=0 AND XA<=30 AND XA>2 AND 涨幅>=2 AND 涨幅<9.91
起飞过滤:=起飞的10过滤
当满足条件起飞过滤时,在L*0.99和'起飞'位置书写文字
起飞2:=(C上穿伏值C OR C上穿伏值H) AND H>L AND C>1日前的C AND 1日前的伏=0 AND XA<=30 AND 涨幅>=9.91
当满足条件起飞2时,在L*0.99和'起飞爆'位置书写文字
起飞异动:=起飞过滤=1 AND (成交量*10000/FINANCE(7)>=5 OR 涨幅>=5)
当满足条件起飞异动时,在L*0.99和'起飞'位置书写文字
当满足条件起飞异动时,在L*0.97和'异动'位置书写文字