阴线战法通达信公式 主图 源码附图

大阴线跌幅:=5;
最后阴线周期:=5;
{压力阴线判断}{收盘价=3,开盘价=0,最高价=1,最低价=2}
波峰距离:=PEAKBARS(3,5.00,1),NODRAW;{波段高}
波谷距离:=TROUGHBARS(2,5.00,1);{波段低}
距离:=CURRBARSCOUNT,NODRAW;
比前跌率:=(REF(C,1)-C)*100/REF(C,1);{当日跌幅判断}
本日跌率:=(O-C)*100/O;{阴线大小判断}
距离FK1:=波峰距离-1;{波峰右边K距离}
线位置:= REF(L,距离FK1);
TJ1:=波峰距离>波谷距离+5 AND 波峰距离<121;
TJ2:=REF(本日跌率,距离FK1)>大阴线跌幅 OR REF(比前跌率,距离FK1)>大阴线跌幅;{阴线>5% 或者跌幅>5%}
TJ3:=距离<240;
TJ4:=REF(C,距离FK1)<REF(O,距离FK1) AND REF(C,距离FK1)<REF(MIN(C,O),距离FK1+1);{阴K线 并且跌破前K线}
HXTJ:= 线位置=REF(线位置,1) AND TJ2 AND TJ4;{画线条件}
TT1:=BARSLAST(CROSS(HXTJ,0.5));
DZTJ:=FILTER(HXTJ AND TJ1 AND TJ3,20);{打字条件}
TT2:=BARSLAST(DZTJ);
QF:=BACKSET(TT2=0,TT1+2);
TT3:=BARSLAST(CROSS(QF=1,0.5));
阴一顶:DRAWLINE(CURRBARSCOUNT=CONST(TT3)+1,H,ISLASTBAR,REF(H,TT3),0),COLOR00FF00,DOTLINE;
阴一底:DRAWLINE(CURRBARSCOUNT=CONST(TT3)+1,L,ISLASTBAR,REF(L,TT3),0),COLOR00FF00,DOTLINE;
DRAWTEXT(ISLASTBAR,阴一顶,VARCAT(VAR2STR(阴一顶,2),'---')),COLOR00FF00;
DRAWTEXT(ISLASTBAR,阴一底,VARCAT(VAR2STR(阴一底,2),'---')),COLOR00FF00;
{最高、最低凹口 震荡K线判断}
T1:=CONST(LLVBARS(L,10));{最低值}
{T1:=CONST(HHVBARS(H,10));{最高值}
T1H:=CONST(REF(H,T1));
T1L:=CONST(REF(L,T1));
CCB:=CONST(CURRBARSCOUNT);
T2:=CONST(BARSLAST(CURRBARSCOUNT>CCB+T1 AND H>T1H));
T2H:=CONST(REF(H,T2));
T2L:=CONST(REF(L,T2));
T3:=CONST(BARSLAST(CURRBARSCOUNT>CCB+T2 AND H>T2H));
T3H:=CONST(REF(H,T3));{}
T3L:=CONST(REF(L,T3));
阴二顶:DRAWLINE(CURRBARSCOUNT=T3+1, T3H, ISLASTBAR, T3H, 1),COLOR0099FF,LINETHICK1,DOTLINE;
阴二底:DRAWLINE(CURRBARSCOUNT=T3+1, T3L, ISLASTBAR, T3L, 1),COLOR0099FF,LINETHICK1,DOTLINE;
DRAWTEXT(ISLASTBAR,阴二顶,VARCAT(VAR2STR(阴二顶,2),'---')),COLOR0099FF;
DRAWTEXT(ISLASTBAR,阴二底,VARCAT(VAR2STR(阴二底,2),'---')),COLOR0099FF;
{120天内的大阴线 支撑阴线}
A0A:=CURRBARSCOUNT;
A1A:=V/REF(V,1);
{}
A2A:=(REF(C,1)-C)/REF(C,1)*100;{大阴线跌幅}
大阴线:=O<=REF(C,1) AND C<O AND A2A>大阴线跌幅 AND A0A<121 AND A2A<9 {AND A1A>1.9};
大阴:= BARSLAST(FILTER(大阴线,最后阴线周期));{N:=5;}
阴三顶:DRAWLINE(CURRBARSCOUNT=CONST(大阴)+1,H,ISLASTBAR,REF(H,大阴),0),COLORMAGENTA,DOTLINE;
阴三底:DRAWLINE(CURRBARSCOUNT=CONST(大阴)+1,L,ISLASTBAR,REF(L,大阴),0),COLORMAGENTA,DOTLINE;
DRAWICON(CURRBARSCOUNT=CONST(大阴)+1,H*1.02,2);
DRAWTEXT(ISLASTBAR,阴三顶,VARCAT(VAR2STR(阴三顶,2),'---')),COLORMAGENTA;
DRAWTEXT(ISLASTBAR,阴三底,VARCAT(VAR2STR(阴三底,2),'---')),COLORMAGENTA;
{N 2 1000 100 }
STICKLINE(IF(CURRBARSCOUNT<=100,V=CONST(LLV(V,100)),DRAWNULL),C,O,3,0),COLORFFFFFF;{百日地量}
DRAWTEXT(IF(CURRBARSCOUNT<=100,V=CONST(LLV(V,100)),DRAWNULL), L, ' 百地量')LINETHICK1,COLORFFFFFF;
{M1:=13;M2:=55;M3:=100;
地量10日:= V=LLV(V,M1) AND BARSCOUNT(V)>=M1;
地量50日:= V=LLV(V,M2) AND BARSCOUNT(V)>=M2;
百日地量:= V=LLV(V,M3) AND BARSCOUNT(V)>=M3;
STICKLINE(百日地量,OPEN,CLOSE,1,0),COLORMAGENTA;
STICKLINE(地量10日,OPEN,CLOSE,1,0),COLORWHITE;
STICKLINE(地量50日,OPEN,CLOSE,1,0),COLORWHITE;}
倍量拄:=VOL>=REF(V,1)*1.95 AND C>REF(C,1);
梯量拄:=V>=REF(V,1) AND REF(V,1)>=REF(V,2) AND C>O AND REF(C>O,1);
STICKLINE(梯量拄,C,O,1,0),COLORLIRED{粉};
STICKLINE(倍量拄,C,O,1,0),COLORYELLOW{黄};
NNN1:=DRAWTEXT(梯量拄,L*0.999, ' 梯量拄'),LINETHICK1,COLORLIRED{粉};
NNN2:=DRAWTEXT(倍量拄,L*0.99, ' 倍量拄'),LINETHICK1,COLORYELLOW{黄};
{长阴短柱}
A11:=CLOSE<OPEN;
A12:=OPEN-CLOSE;{第一个阴线的实柱长}
B11:=BARSLAST(CLOSE>=OPEN);
B12:=REF(CLOSE,B11)-REF(OPEN,B11);{第一个阳线的实柱长}
C10:=B11<3;
C11:=A12-B12>0;
C12:=VOL<REF(VOL,B11);
C13:=VOL<REF(VOL,B11) AND REF(VOL,1)<REF(VOL,2);
C14:=IF(B11=2,C13,C12);
CC:=C10 AND C11 AND C13;{必须条件}
G11:=VOL<SUM(VOL,5)/5;{好,不坏}
G21:=VOL<(1/3*SUM(VOL,5)/5+1/3*REF(VOL,B11)+1/3*LLV(VOL,5));{好,不坏}
G22:=10.00>100*SUM(DYNAINFO(37),5)/5;{小测试无副作用}
G23:=10000000*(HIGH-LOW)/VOL;
G24:=10000000*(REF(HIGH,B11)-REF(LOW,B11))/REF(VOL,B11);
G241:=SUM(G24,12)/12;
G25:=G23>G241;
GG:=G11 AND G21 AND G22 AND G25;{重要的限制条件}
F11:=CC AND GG;
STICKLINE(F11,C,O,1,0),COLORBLUE{蓝};
DRAWICON(F11,HIGH*1.01,27);{输出三:长阴短柱};
{120日区间高低点判断}
N:=30;
A1:=REF(H,N)=HHV(H,2*N+1);
B1:=FILTER(A1,N);
C1:=BACKSET(B1,N+1);
HD:= FILTER(C1,N);
RH:=BACKSET(CURRBARSCOUNT=2,BARSLAST(HD)+1);
SH:=RH>REF(RH,1);
阶段高点:REF(H ,BARSLAST(SH)),LINETHICK1,COLORWHITE;{阶段高点}
DRAWTEXT(ISLASTBAR,阶段高点,VARCAT(VAR2STR(阶段高点,2),' 元')),COLORFFFFFF;
A2:=REF(L,N)=LLV(L,2*N+1);
B2:=FILTER(A2,N);
C2:=BACKSET(B2,N+1);
LD:=FILTER(C2,N);
RL:=BACKSET(CURRBARSCOUNT=2,BARSLAST(LD)+1);
SL:=RL>REF(RL,1);
阶段低点:REF(L ,BARSLAST(SL)),LINETHICK1,COLORRED;{阶段低点}
DRAWTEXT(ISLASTBAR,阶段低点,VARCAT(VAR2STR(阶段低点,2),' 元')),COLOR0000FF;
{涨跌停价判断}
AA:=(C-REF(C,1))/REF(C,1)*100;
ZS:=(NAMELIKE('ST') OR NAMELIKE('*ST') OR NAMELIKE('S')) AND AA>=4.945;
DS:=(NAMELIKE('ST') OR NAMELIKE('*ST') OR NAMELIKE('S')) AND AA<=-4.945;
涨停价:IF(ZS,REF(C,1)*1.05,REF(C,1)*1.1),NODRAW;
跌停价:IF(DS,REF(C,1)*0.95,REF(C,1)*0.9),NODRAW;
涨家数:INDEXADV,NODRAW,COLORLIMAGENTA ;
跌家数:INDEXDEC,NODRAW,COLORGREEN;
DRAWTEXT_FIX(ISLASTBAR,0,0,0,VARCAT(VARCAT(HYBLOCK,' '),VARCAT(VARCAT(DYBLOCK,' '),VARCAT(GNBLOCK,' ')))),COLORGREEN;{在屏幕左上角显示所属行业板块};


未来函数检测结果如下:
该公式包含未来函数:PEAK
该公式包含未来函数:PEAKBARS
该公式包含未来函数:TROUGH
该公式包含未来函数:TROUGHBARS
该公式包含未来函数:BACKSET
该公式包含未来函数:DYNAINFO
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股票指标网别名指标网仅为互联网文章,所有股票指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。股票指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图