重磅新先推出——根据坏叔叔-潜伏热贴思路而做的通达信主图指标 源码 附图
数:=9;
A1:=MA(C,5);
A2:=MA(C,10);
A3:=MA(C,20);
A4:=MA(C,60);
A5:=MA(C,30);
B1:=IF(A1=DRAWNULL,0,A1);
B2:=IF(A2=DRAWNULL,A1,A2);
B3:=IF(A3=DRAWNULL,A1,A3);
B4:=IF(A4=DRAWNULL,A1,A4);
B5:=IF(A5=DRAWNULL,A1,A5);
A:=MAX6(B1,B2,B3,B4,B5,0);
B:=MIN6(B1,B2,B3,B4,B5,1000);
T1:=(A/B-1)*100,NODRAW;
T:RANGE(T1,0,数)=1,COLORCYAN,NODRAW;
{区间}
A点:=CROSS(T,0.01);
区间:=BARSLAST(A点);
B点:=CROSS(0.01,T);
条件一:=B点 AND 区间>=5;
条件二:=LLV(L,区间+1);
C1:=BARSLAST(条件一);
C2:=CROSS(REF(条件二,C1),L);
新低:C2 AND COUNT(C2,C1)=1,NODRAW;
条件三:=HHV(H,区间+1);
C3:=CROSS(H,REF(条件三,C1));
新高:C3 AND COUNT(C3,C1)=1,NODRAW;
XXX:=T;
FT:=BARSNEXT(XXX);
{HH:=REF(条件三,C1);
LL:=REF(条件二,C1);}
HH:=条件三;
LL:=条件二;
TA:=MIN(BARSLAST(H>HH AND FT>5),BARSLAST(L<5));
FTT:=REFX(TA,FT);
STICKLINE(FT AND BARSLAST(T=1)<=0,HH,LL,8,0),COLOR770022;
STICKLINE((FT=FTT OR XXX) AND BARSLAST(T=1)<=0,HH,LL,8,0),COLOR770022;
STICKLINE(新低=1,LL,HH,0,-1),COLORGREEN;
DRAWICON(新低=1,L*0.99,37);
STICKLINE(新高=1,LL,HH,0,-1),COLORLIMAGENTA;
DRAWICON(新高=1,H*1.023,38);
所属:=STRCAT('所属:',STRCAT(STRCAT(STRCAT('
【行业】-',HYBLOCK),STRCAT(' 【地域】-',DYBLOCK)),STRCAT('
【概念】-',GNBLOCK))); DRAWTEXT_FIX(O>0,0.00,0.012,0,所属);
{好股票zbgs3.com整理 同行转载请勿删除}
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
DD:=O>C AND (C-REF(C,1))/REF(C,1)<=-0.03;
DDC:=VALUEWHEN(DD,MAX(C,O));
DAYSDD:=BARSLAST(DD);
FB:=C>=DDC AND REF(C,1)<DDC;
DAYSFB:=BARSLAST(FB);
JGDAYS:=DAYSDD-DAYSFB;
反包:DAYSDD>DAYSFB AND JGDAYS<=9,NODRAW;
STICKLINE(CROSS(反包=1,0.01),C,O,2.5,0),COLOR0066FF;
STICKLINE(CROSS(反包=1,0.01),H,L,0,0),COLOR0066FF;
DDA0:=DOWNNDAY(C,2),NODRAW;
DDA1:=O>C AND (C-REF(C,1))/REF(C,1)<=-0.03 AND DOWNNDAY(C,2),NODRAW;
DDCA1:=VALUEWHEN(CROSS(DDA1=1,0.01),REF(HHV(H,1),1)),NODRAW;
DAA1:=BARSLAST(DDA1);
FBA1:=H>=DDCA1 AND REF(C,1)<DDCA1;
DAA2:=BARSLAST(FBA1);
JGA1:=DAA1-DAA2;
反包2:DAA1>DAA2 AND JGA1<=13,NODRAW;
STICKLINE(CROSS(反包2=1,0.01),C,O,2.5,0),COLORGRAY;
STICKLINE(CROSS(反包2=1,0.01),H,L,0,0),COLORGRAY;
DD0:=DOWNNDAY(C,2),NODRAW;
DD1:=O>C AND (C-REF(C,1))/REF(C,1)<=-0.03 AND DOWNNDAY(C,2),NODRAW;
DDC1:=VALUEWHEN(CROSS(DD1=1,0.01),REF(HHV(H,2),1)),NODRAW;
DA1:=BARSLAST(DD1);
FB1:=C>=DDC1 AND REF(C,1)<DDC1;
DA2:=BARSLAST(FB1);
JG1:=DA1-DA2;
反包1:DA1>DA2 AND JG1<=13,NODRAW;
STICKLINE(CROSS(反包1=1,0.01),C,O,2.5,0),COLORFF66FF;
STICKLINE(CROSS(反包1=1,0.01),H,L,0,0),COLORFF66FF;
DDB0:=HHV(C,5)/LLV(C,5)>=1.08,NODRAW;
DDB1:=O>C AND DDB0=1 AND DOWNNDAY(C,2),NODRAW;
DDBA1:=VALUEWHEN(CROSS(DDB1=1,0.01),REF(HHV(C,4),1)),NODRAW;
DAB1:=BARSLAST(DDB1);
FBB1:=H>=DDBA1 AND REF(C,1)<DDBA1;
DAB2:=BARSLAST(FBB1);
JGB1:=DAB1-DAB2;
反包3:DAB1>DAB2 AND JGB1<=17,NODRAW;
STICKLINE(CROSS(反包3=1,0.01),C,O,2.5,0),COLORLIRED;
STICKLINE(CROSS(反包3=1,0.01),H,L,0,0),COLORLIRED;
DDD0:=HHV(C,10)/LLV(C,10)>=1.18,NODRAW;
DDD1:=O>C AND DDD0=1 AND DOWNNDAY(C,2),NODRAW;
DDDA1:=VALUEWHEN(CROSS(DDD1=1,0.01),REF(HHV(C,9),1)),NODRAW;
DAD1:=BARSLAST(DDD1);
FBD1:=H>=DDDA1 AND REF(C,1)<DDDA1;
DAD2:=BARSLAST(FBD1);
JGD1:=DAD1-DAD2;
反包4:DAD1>DAD2 AND JGD1<=25,NODRAW;
STICKLINE(CROSS(反包4=1,0.01),C,O,2.5,0),COLORWHITE;
STICKLINE(CROSS(反包4=1,0.01),H,L,0,0),COLORWHITE;
中位线:EMA(C,34),COLORYELLOW,LINETHICK1;
未来函数检测结果如下:
该公式包含未来函数:BARSNEXT
该公式包含未来函数:REFX
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式
数赋值:9
A1赋值:C的5日简单移动平均
A2赋值:C的10日简单移动平均
A3赋值:C的20日简单移动平均
A4赋值:C的60日简单移动平均
A5赋值:C的30日简单移动平均
如果A1=DRAWNULL返回0否则返回A1
如果A2=DRAWNULL返回A1否则返回A2
如果A3=DRAWNULL返回A1否则返回A3
如果A4=DRAWNULL返回A1否则返回A4
如果A5=DRAWNULL返回A1否则返回A5
A赋值:MAX6(B1,B2,B3,B4,B5,0)
B赋值:MIN6(B1,B2,B3,B4,B5,1000)
T1赋值:(A/B-1)*100,NODRAW
输出T:RANGE(T1,0,数)=1,COLORCYAN,NODRAW
{区间}
A点:=T上穿0.01
区间赋值:上次A点距今天数
B点:=0.01上穿T
条件一赋值:B点 AND 区间>=5
条件二赋值:区间+1日内L最低值
C1赋值:上次条件一距今天数
C2赋值:CROSS(C1日前的条件二,L)
输出新低:C2 AND 统计C1日满足C2的天数=1,NODRAW
条件三赋值:区间+1日内H最高值
C3赋值:CROSS(H,C1日前的条件三)
输出新高:C3 AND 统计C1日满足C3的天数=1,NODRAW
XXX赋值:T
FT赋值:BARSNEXT(XXX)
{HH赋值:C1日前的条件三
LL赋值:C1日前的条件二
}
HH赋值:条件三
LL赋值:条件二
TA赋值:MIN(上次H>HH AND FT>5距今天数,BARSLAST(L<5))
FTT赋值:REFX(TA,FT)
STICKLINE(FT AND 上次T=1距今天数<=0,HH,LL,8,0),COLOR770022
STICKLINE((FT=FTT OR XXX) AND 上次T=1距今天数<=0,HH,LL,8,0),COLOR770022
当满足条件新低=1时,在LL和HH之间画柱状线
当满足条件新低=1时,在L*0.99和37之间画图标
当满足条件新高=1时,在LL和HH之间画柱状线
当满足条件新高=1时,在H*1.023和38之间画图标
所属赋值:STRCAT('所属:',STRCAT(STRCAT(STRCAT('
【行业】-',HYBLOCK),STRCAT(' 【地域】-',DYBLOCK)),STRCAT('
【概念】-',GNBLOCK)))
当满足条件O>0时,在横轴0.00纵轴0.012位置书写文字
{好股票ZBGS3.COM整理 同行转载请勿删除}
DRAWKLINE(最高价,开盘价,最低价,收盘价)
DD赋值:O>C AND (C-1日前的C)/1日前的C<=-0.03
DDC:=VALUEWHEN(DD,C和O较大值)
DAYSDD赋值:上次DD距今天数
FB赋值:C>=DDC AND 1日前的C
DAYSFB赋值:上次FB距今天数
JGDAYS:=DAYSDD-DAYSFB
输出反包:DAYSDD>DAYSFB AND JGDAYS<=9,NODRAW
STICKLINE(反包=1上穿0.01,C,O,2.5,0),COLOR0066FF
STICKLINE(反包=1上穿0.01,H,L,0,0),COLOR0066FF
DDA0:=DOWNNDAY(C,2),NODRAW
DDA1赋值:O>C AND (C-1日前的C)/1日前的C<=-0.03 AND DOWNNDAY(C,2),NODRAW
DDCA1赋值:VALUEWHEN(DDA1=1上穿0.01,REF(1日内H最高值,1)),NODRAW
DAA1赋值:上次DDA1距今天数
F518547925325565894A1赋值:H>=DDCA1 AND 1日前的C
DAA2赋值:上次F518547925325565894A1距今天数
JGA1赋值:DAA1-DAA2
反包2:DAA1>DAA2 AND JGA1<=13,NODRAW
STICKLINE(反包2=1上穿0.01,C,O,2.5,0),COLORGRAY
STICKLINE(反包2=1上穿0.01,H,L,0,0),COLORGRAY
DD0:=DOWNNDAY(C,2),NODRAW
DD1:=O>C AND (C-1日前的C)/1日前的C<=-0.03 AND DOWNNDAY(C,2),NODRAW
DDC1赋值:VALUEWHEN(DD1=1上穿0.01,REF(2日内H最高值,1)),NODRAW
DA1赋值:上次DD1距今天数
FB1赋值:C>=DDC1 AND 1日前的C
DA2赋值:上次FB1距今天数
JG1赋值:DA1-DA2
反包1:DA1>DA2 AND JG1<=13,NODRAW
STICKLINE(反包1=1上穿0.01,C,O,2.5,0),COLORFF66FF
STICKLINE(反包1=1上穿0.01,H,L,0,0),COLORFF66FF
DDB0:=5日内C最高值/5日内C最低值>=1.08,NODRAW
DDB1赋值:O>C AND DDB0=1 AND DOWNNDAY(C,2),NODRAW
DD518547925325565894A1赋值:VALUEWHEN(DDB1=1上穿0.01,REF(4日内C最高值,1)),NODRAW
DAB1赋值:上次DDB1距今天数
F518547925325565894B1赋值:H>=DD518547925325565894A1 AND 1日前的C
DAB2赋值:上次F518547925325565894B1距今天数
JGB1赋值:DAB1-DAB2
反包3:DAB1>DAB2 AND JGB1<=17,NODRAW
STICKLINE(反包3=1上穿0.01,C,O,2.5,0),COLORLIRED
STICKLINE(反包3=1上穿0.01,H,L,0,0),COLORLIRED
DDD0:=10日内C最高值/10日内C最低值>=1.18,NODRAW
DDD1:=O>C AND DDD0=1 AND DOWNNDAY(C,2),NODRAW
DDDA1赋值:VALUEWHEN(DDD1=1上穿0.01,REF(9日内C最高值,1)),NODRAW
DAD1:=上次DDD1距今天数
FBD1:=H>=DDDA1 AND 1日前的C
DAD2:=上次FBD1距今天数
JGD1赋值:DAD1-DAD2
反包4:DAD1>DAD2 AND JGD1<=25,NODRAW
STICKLINE(反包4=1上穿0.01,C,O,2.5,0),COLORWHITE
STICKLINE(反包4=1上穿0.01,H,L,0,0),COLORWHITE
输出中位线:C的34日指数移动平均,COLORYELLOW,LINETHICK1