突破前高 倍量突破 涨停突破 跳空突破通达信公式 主图 源码附图
VAR1:=CLOSE-LOW;
VAR2:=HIGH-LOW;
VAR3:=CLOSE-HIGH;
VAR4:=IF(HIGH>LOW,(VAR1/VAR2+VAR3/VAR2)*VOL,0);
HPTP:=SUM(VAR4,10)/10000,COLORSTICK;
TKXL:=-1;
XVYO:=UPNDAY(TKXL,1),NODRAW;
G:=MA(C,5);
D:=MA(C,10);
HH:=REF(H,5)=HHV(H,11);
LL:=REF(L,5)=LLV(L,11);
FG01:=BACKSET(HH,6)>BACKSET(HH,5);
FD01:=BACKSET(LL,6)>BACKSET(LL,5);
FG02:=IF(BARSLAST(FG01)=BARSLAST(FD01) AND G>D,FG01,
IF(BARSLAST(FD01)>BARSLAST(FG01),FG01,0));
FD02:=IF(BARSLAST(FG01)=BARSLAST(FD01) AND D>G,FD01,
IF(BARSLAST(FG01)>BARSLAST(FD01),FD01,0));
FG0:=FG02 AND H=HHV(H,BARSLAST(FD02));
FD0:=FD02 AND L=LLV(L,BARSLAST(FG02));
GQ:=L>REF(H,1) AND DAY!=REF(DAY,1);
DQ:=H<REF(L,1) AND DAY!=REF(DAY,1);
FGH:=REF(H,BARSLAST(FG0));
FGL:=REF(L,BARSLAST(FG0));
FGH1:=REF(H,BARSLAST(FG0)+1);
FGL1:=REF(L,BARSLAST(FG0)+1);
FGL2:=REF(L,BARSLAST(FG0)+2);
FDH2:=REF(H,BARSLAST(FD0)+2);
FDH:=REF(H,BARSLAST(FD0));
FDL:=REF(L,BARSLAST(FD0));
FDH1:=REF(H,BARSLAST(FD0)+1);
FDL1:=REF(L,BARSLAST(FD0)+1);
FGZL:=IF(FGH1<FGL,FGL,IF(FGL<=FGL1,FGL2,FGL1));
FDZH:=IF(FDL1>FDH,FDH,IF(FDH>=FDH1,FDH2,FDH1));
FG1:=FGH>FDZH AND FG0;
FD1:=FDL<FGZL AND FD0;
{股票指标网 整理}
FG:=FG1 AND FGH>FDH AND FGL>FDL AND FGL1>FDL;
FD:=FD1 AND FDL<FGL AND FDH<FGH AND FDH1<FGH;
BH0:=(H<=REF(H,1) AND L>=REF(L,1)) OR (H>=REF(H,1) AND L<=REF(L,1));
BHG:=COUNT(BH0,BARSLAST(FD0));
BHD:=COUNT(BH0,BARSLAST(FG0));
BGQ:=COUNT(GQ,BARSLAST(FD0));
BDQ:=COUNT(DQ,BARSLAST(FG0));
BK0:=IF(BHG>0,BHG+2,IF(BHD,BHD+2,3));
BK:=IF(BGQ,BK0-BGQ,IF(BDQ,BK0-BDQ,BK0));
G1X:=(FG AND BARSLAST(FD)>BK),NODRAW;
D1X:=(FD AND BARSLAST(FG)>BK),NODRAW;
G1:=(FG0 AND REF(H,BARSLAST(FG0))>=REF(H,BARSLAST(G1X)) AND BARSLAST(D1X)>BARSLAST(G1X))
OR (FG1 AND COUNT(GQ,BARSLAST(FD1))>0 AND REF(H,BARSLAST(FG1))>REF(H,BARSLAST(G1X)));
{W:=IF(DATE<1201231,C,DRAWNULL);}
D1:=(FD0 AND REF(L,BARSLAST(FD0))<=REF(L,BARSLAST(D1X)) AND BARSLAST(G1X)>BARSLAST(D1X))
OR (FD1 AND COUNT(DQ,BARSLAST(FG1))>0 AND REF(L,BARSLAST(FD1))<REF(H,BARSLAST(D1X)));
G1H:=IF(BARSLAST(D1)>BARSLAST(G1),REF(H,BARSLAST(G1)),REF(H,BARSLAST(D1))),NODRAW;
D1L:=IF(BARSLAST(G1)>BARSLAST(D1),REF(L,BARSLAST(D1)),REF(L,BARSLAST(G1))),NODRAW;
G2:=G1 AND H=HHV(G1H,BARSLAST(D1)+1) AND H>REF(H,1) AND BARSLAST(D1)>BARSLAST(G1);
D2:=D1 AND L=LLV(D1L,BARSLAST(G1)+1) AND L<REF(L,1) AND BARSLAST(G1)>BARSLAST(D1);
NN:=G2 OR (FG0 AND REF(H,BARSLAST(FG0))>REF(H,BARSLAST(G2))
AND BARSLAST(D2)>BARSLAST(G2));
UU:=D2 OR (FD0 AND REF(L,BARSLAST(FD0))<REF(L,BARSLAST(D2))
AND BARSLAST(G2)>BARSLAST(D2));
找顶线:DRAWLINE(NN,H,REF(NN,1),REF(H,1),1),COLORGREEN,DOTLINE;
找底线:DRAWLINE(UU,L,REF(UU,1),REF(L,1),1),COLORRED,DOTLINE;
WWWFXJGSWCOM:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
ZT:=C=ZTPRICE(REF(C,1),0.1);
STICKLINE(ZT,C,O,2,0),COLORMAGENTA;
DRAWICON(CROSS(C,找顶线),找顶线*1.01,34);
未来函数检测结果如下:
该公式包含未来函数:BACKSET
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
VAR1赋值:收盘价-最低价
VAR2赋值:HIGH-最低价
VAR3赋值:收盘价-HIGH
VAR4赋值:IF(HIGH>最低价,(VAR1/VAR2+VAR3/VAR2)*成交量,0)
HPTP赋值:10的VAR4日累和/10000,COLORSTICK
TKXL赋值:-1
XVYO赋值:UPNDAY(TKXL,1),NODRAW
G赋值:C的5日简单移动平均
D赋值:C的10日简单移动平均
HH赋值:5日前的H=11日内H最高值
LL赋值:5日前的L=11日内L最低值
FG01:=BACKSET(HH,6)>BACKSET(HH,5)
FD01:=BACKSET(LL,6)>BACKSET(LL,5)
FG02:=IF(上次FG01距今天数=BARSLAST(FD01) AND G>D,FG01,
IF(BARSLAST(FD01)>上次FG01距今天数,FG01,0))
FD02:=IF(上次FG01距今天数=BARSLAST(FD01) AND D>G,FD01,
IF(上次FG01距今天数>BARSLAST(FD01),FD01,0))
FG0:=FG02 AND H=HHV(H,上次FD02距今天数)
FD0:=FD02 AND L=LLV(L,上次FG02距今天数)
GQ:=L>1日前的H AND DAY!=1日前的DAY
DQ:=H<1日前的L AND DAY!=1日前的DAY
FGH:=REF(H,上次FG0距今天数)
FGL:=REF(L,上次FG0距今天数)
FGH1:=REF(H,上次FG0距今天数+1)
FGL1:=REF(L,上次FG0距今天数+1)
FGL2:=REF(L,上次FG0距今天数+2)
FDH2:=REF(H,上次FD0距今天数+2)
FDH:=REF(H,上次FD0距今天数)
FDL:=REF(L,上次FD0距今天数)
FDH1:=REF(H,上次FD0距今天数+1)
FDL1:=REF(L,上次FD0距今天数+1)
FGZL:=IF(FGH1
FDZH:=IF(FDL1>FDH,FDH,IF(FDH>=FDH1,FDH2,FDH1))
FG1:=FGH>FDZH AND FG0
FD1:=FDL
{股票指标网 整理}
FG赋值:FG1 AND FGH>FDH AND FGL>FDL AND FGL1>FDL
FD赋值:FD1 AND FDL
BH0赋值:(H<=1日前的H AND L>=1日前的L) OR (H>=1日前的H AND L<=1日前的L)
BHG赋值:COUNT(BH0,上次FD0距今天数)
BHD赋值:COUNT(BH0,上次FG0距今天数)
BGQ:=COUNT(GQ,上次FD0距今天数)
BDQ:=COUNT(DQ,上次FG0距今天数)
BK0赋值:IF(BHG>0,BHG+2,IF(BHD,BHD+2,3))
BK赋值:IF(BGQ,BK0-BGQ,IF(BDQ,BK0-BDQ,BK0))
G1X:=(FG AND 上次FD距今天数>BK),NODRAW
D1X:=(FD AND 上次FG距今天数>BK),NODRAW
G1:=(FG0 AND REF(H,上次FG0距今天数)>=REF(H,BARSLAST(G1X)) AND BARSLAST(D1X)>BARSLAST(G1X))
OR (FG1 AND COUNT(GQ,BARSLAST(FD1))>0 AND REF(H,BARSLAST(FG1))>REF(H,BARSLAST(G1X)))
如果DATE<1201231返回C否则返回DRAWNULL
}
D1:=(FD0 AND REF(L,上次FD0距今天数)<=REF(L,BARSLAST(D1X)) AND BARSLAST(G1X)>BARSLAST(D1X))
OR (FD1 AND COUNT(DQ,BARSLAST(FG1))>0 AND REF(L,BARSLAST(FD1))[
G1H:=IF(上次D1距今天数>BARSLAST(G1),REF(H,BARSLAST(G1)),REF(H,上次D1距今天数)),NODRAW]
D1L:=IF(上次G1距今天数>BARSLAST(D1),REF(L,BARSLAST(D1)),REF(L,上次G1距今天数)),NODRAW
G2:=G1 AND H=HHV(G1H,上次D1距今天数+1) AND H>1日前的H AND 上次D1距今天数>BARSLAST(G1)
D2:=D1 AND L=LLV(D1L,上次G1距今天数+1) AND L<1日前的L AND 上次G1距今天数>BARSLAST(D1)
NN赋值:G2 OR (FG0 AND REF(H,上次FG0距今天数)>REF(H,BARSLAST(G2))
AND BARSLAST(D2)>BARSLAST(G2))
UU赋值:D2 OR (FD0 AND REF(L,上次FD0距今天数)[BARSLAST(D2))]
输出找顶线:DRAWLINE(NN,H,1日前的NN,1日前的H,1),COLORGREEN,DOTLINE
输出找底线:DRAWLINE(UU,L,1日前的UU,1日前的L,1),COLORRED,DOTLINE
WWWFXJGSWCOM:=成交量/((HIGH-最低价)*2-收盘价-开盘价的绝对值)
ZT赋值:C=ZTPRICE(1日前的C,0.1)
当满足条件ZT时,在C和O之间画柱状线
DRAWICON(C上穿找顶线,找顶线*1.01,34)