通达信反转突破日线主图指标 关注底部与时间跨度大的突破信号 源码
Z111:=STRCAT(HYBLOCK,'----');
Z311:=STRCAT(Z111,DYBLOCK);
Z411:=STRCAT(Z311,'----');
DRAWTEXT_FIX(1,0.00,0.1,0,' 【主题概念】:')COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0.07,0.1,0,STRCAT(Z411,GNBLOCK)),COLORCYAN;
主营增长率:=FINANCE(44),COLORBROWN,NODRAW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.08,0.25,1,STRCAT('主营增长率: ',CON2STR(主营增长率,2))),COLORYELLOW;
净利润增长率:=FINANCE(43),COLORMAGENTA,NODRAW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.08,0.35,1,STRCAT('净利增长率: ',CON2STR(净利润增长率,2))),COLORYELLOW;
T:=BARSLAST(H<REF(L,1));
T1:=SUMBARS(T=0,2);
T2:=SUMBARS(T=0,3);
H1:=HHV(H,T1);
H2:=HHV(H,T2);
G1:=REF(L,T1);
G2:=REF(L,T2);
TJ:=HHV(H,T+1);
TJ1:=TJ<REF(L,T+1);
TJ2:=H1<G1;
TJ3:=H2<G2;
XTT:=REF(TJ1,1) AND L>REF(HHV(H,T+1),1) AND BETWEEN(T,5,200);
XX:=BACKSET(XTT=1,T+1);
DRAWICON(XTT,L,42);
XXT:=BARSLAST(CROSS(XX=1,0.5));
XXA:=BACKSET(XTT=1,2);
XXAT:=BARSLAST(CROSS(XXA=1,0.5));
X1:=REFX(TJ,BARSNEXT(XXAT=0));
DRAWLINE(XXT=0,X1,XXAT=0,TJ,0),DOTLINE,COLORYELLOW;
TT:=REF(TJ2,1) AND L>REF(HHV(H,T1),1) AND BETWEEN(T1,5,200);
XXX:=BACKSET(TT=1,T1);
XXXT:=BARSLAST(CROSS(XXX=1,0.5));
DRAWICON(TT,L,42);
XXXA:=BACKSET(TT=1,2);
XXXAT:=BARSLAST(CROSS(XXXA=1,0.5));
X2:=REFX(H1,BARSNEXT(XXXAT=0));
DRAWLINE(XXXT=0,X2,XXXAT=0,H1,0),DOTLINE,COLORGREEN;
TTT:=REF(TJ3,1) AND L>REF(HHV(H,T2),1) AND BETWEEN(T2,5,200);
XXXX:=BACKSET(TTT=1,T2);
XXXXT:=BARSLAST(CROSS(XXXX=1,0.5));
DRAWICON(TTT,L,42);
XXXXA:=BACKSET(TTT=1,2);
XXXXAT:=BARSLAST(CROSS(XXXXA=1,0.5));
X3:=REFX(H2,BARSNEXT(XXXXAT=0));
DRAWLINE(XXXXT=0,X3,XXXXAT=0,H2,0),DOTLINE,COLORMAGENTA;
未来函数检测结果如下:
该公式包含未来函数:BACKSET
该公式包含未来函数:FINANCE
该公式包含未来函数:BARSNEXT
该公式包含未来函数:REFX
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
Z111赋值:STRCAT(HYBLOCK,'----')
Z311赋值:STRCAT(Z111,DYBLOCK)
Z411赋值:STRCAT(Z311,'----')
当满足条件1时,在横轴0.00纵轴0.1位置书写文字
DRAWTEXT_FIX(ISLASTBAR,0.07,0.1,0,STRCAT(Z411,GNBLOCK)),画青色
主营增长率赋值:FINANCE(44),COLORBROWN,NODRAW
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.08,0.25,1,STRCAT('输出主营增长率: ',CON2STR(主营增长率,2))),画黄色
净利润增长率赋值:FINANCE(43),COLORMAGENTA,NODRAW
输出DRAWTEXT_FIX(CURRBARSCOUNT=1,0.08,0.35,1,STRCAT('净利增长率: ',CON2STR(净利润增长率,2))),画黄色
T赋值:上次H<1日前的L距今天数
T1:=T=0累加至2的天数
T2:=T=0累加至3的天数
H1赋值:T1日内H最高值
H2赋值:T2日内H最高值
G1赋值:T1日前的L
G2赋值:T2日前的L
TJ:=T+1日内H最高值
TJ1:=TJ
TJ2:=H1
TJ3:=H2
XTT赋值:1日前的TJ1 AND L>REF(T+1日内H最高值,1) AND BETWEEN(T,5,200)
XX赋值:BACKSET(XTT=1,T+1)
当满足条件XTT时,在L和42之间画图标
XXT赋值:上次XX=1上穿0.5距今天数
XXA:=BACKSET(XTT=1,2)
XXAT赋值:上次XXA=1上穿0.5距今天数
X1赋值:REFX(TJ,BARSNEXT(XXAT=0))
DRAWLINE(XXT=0,X1,XXAT=0,TJ,0),DOTLINE,画黄色
TT赋值:1日前的TJ2 AND L>REF(T1日内H最高值,1) AND BETWEEN(T1,5,200)
XXX赋值:BACKSET(TT=1,T1)
XXXT赋值:上次XXX=1上穿0.5距今天数
当满足条件TT时,在L和42之间画图标
XXXA:=BACKSET(TT=1,2)
XXXAT赋值:上次XXXA=1上穿0.5距今天数
X2赋值:REFX(H1,BARSNEXT(XXXAT=0))
DRAWLINE(XXXT=0,X2,XXXAT=0,H1,0),DOTLINE,画绿色
TTT赋值:1日前的TJ3 AND L>REF(T2日内H最高值,1) AND BETWEEN(T2,5,200)
XXXX赋值:BACKSET(TTT=1,T2)
XXXXT赋值:上次XXXX=1上穿0.5距今天数
当满足条件TTT时,在L和42之间画图标
XXXXA:=BACKSET(TTT=1,2)
XXXXAT赋值:上次XXXXA=1上穿0.5距今天数
X3赋值:REFX(H2,BARSNEXT(XXXXAT=0))
DRAWLINE(XXXXT=0,X3,XXXXAT=0,H2,0),DOTLINE,COLORMAGENTA