缠论画笔通达信公式 主图 源码附图不需dll 提供源码
黄金柱:=V/REF(V,1)>=1.9;
DRAWLINE(黄金柱,H,REF(黄金柱,1),REF(H,1),1),COLORRED;
DRAWLINE(黄金柱,L,REF(黄金柱,1),REF(L,1),1),COLORYELLOW;
倍缩:=V/REF(V,1)<=0.6;
DRAWLINE(倍缩,H,REF(倍缩,1),REF(H,1),1),COLOR1D7300;
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) ;
FG0:=FG01 AND H=HHV(H,BARSLAST(FD01));
FD0:=FD01 AND L=LLV(L,BARSLAST(FG01));
J0:=(H+L)/2;
FGH:=REF(H,BARSLAST(FG0));
FGH1:=REF(H,BARSLAST(FG0)+1);
FGL1:=REF(L,BARSLAST(FG0)+1);
FGH2:=REF(H,BARSLAST(FG0)+2);
FGL2:=REF(L,BARSLAST(FG0)+2);
FGJ0:=REF(J0,BARSLAST(FG0));
FGL:=REF(L,BARSLAST(FG0));
FDH:=REF(H,BARSLAST(FD0));
FDL:=REF(L,BARSLAST(FD0));
FDH1:=REF(H,BARSLAST(FD0)+1);
FDL1:=REF(L,BARSLAST(FD0)+1);
FDH2:=REF(H,BARSLAST(FD0)+2);
FDL2:=REF(L,BARSLAST(FD0)+2);
FDJ0:=REF(J0,BARSLAST(FD0));
FGZH:=IF(FGL<FGL1,FGH2,FGH1);
FGZL:=IF(FGL<FGL1,FGL2,FGL1);
FDZH:=IF(FDH>FDH1,FDH2,FDH1);
FDZL:=IF(FDH>FDH1,FDL2,FDL1);
FG1:=IF(((FGL>FDH AND FGH>FDZH) OR (FGH>FDH1 AND FDH1>FDH AND FDH>FDH2)),FG0,FG0 AND FGJ0>FDH AND FGH>FDZH);
FD1:=IF(((FDH<FGL AND FDL<FGZL) OR (FDL<FGL1 AND FGL1<FGL AND FDL<FGL2)),FD0,FD0 AND FDJ0<FGL AND FDL<FGZL);
FG2:=FG1 AND H>=HHV(H,BARSLAST(FD1));
FD2:=FD1 AND L<=LLV(L,BARSLAST(FG1));
FG:=FG2 AND KDJ.K>40;FD:=FD2 AND KDJ.K<60;
BK:=IF((FGL1>=FGL AND FG0) OR (FDH1<=FDH AND FD0),4,3);
G1:=FG AND BARSLAST(FD)>BK;
D1:=FD AND BARSLAST(FG)>BK;
G2:=G1 AND H>=HHV(H,BARSLAST(D1));
D2:=D1 AND L<=LLV(L,BARSLAST(G1));
G3:=G2 OR (FG0 AND KDJ.J>100);
D3:=D2 OR (FD0 AND KDJ.J<0);
G4:=G3 OR (FG0 AND REF(H,BARSLAST(FG0))>REF(H,BARSLAST(G2)) AND BARSLAST(D2)>BARSLAST(G2));
D4:=D3 OR (FD0 AND REF(L,BARSLAST(FD0))<REF(L,BARSLAST(D2)) AND BARSLAST(G2)>BARSLAST(D2));
G5:=G4 AND H=HHV(H,BARSLAST(D4));
D5:=D4 AND L=LLV(L,BARSLAST(G4));
GPB:=IF(G4,H,DRAWNULL),CIRCLEDOT,COLORYELLOW;
DPB:=IF(D4,L,DRAWNULL),CIRCLEDOT,COLORYELLOW;
NN:=G5;UU:=D5;
DRAWLINE(UU,L,NN, H,0),COLORYELLOW,LINETHICK2;
DRAWLINE(NN,H,UU, L,0),COLORYELLOW,LINETHICK2;
{涨停板}
TB:=(C-REF(C,1))/REF(C,1)*100;
STICKLINE(TB>7,O,C,2.5,0),COLORLIMAGENTA;
STICKLINE(TB<-9.9,O,C,2.5,0),COLOR1D7300;
未来函数检测结果如下:
该公式包含未来函数:BACKSET
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
黄金柱赋值:V/1日前的V>=1.9
DRAWLINE(黄金柱,H,1日前的黄金柱,1日前的H,1),画红色
DRAWLINE(黄金柱,L,1日前的黄金柱,1日前的L,1),COLORYELLOW
倍缩赋值:V/1日前的V<=0.6
DRAWLINE(倍缩,H,1日前的倍缩,1日前的H,1),COLOR1D7300
HH赋值:5日前的H=11日内H最高值
LL赋值:5日前的L=11日内L最低值
FG01赋值:BACKSET(HH,6)>BACKSET(HH,5)
FD01赋值:BACKSET(LL,6)>BACKSET(LL,5)
FG0赋值:FG01 AND H=HHV(H,上次FD01距今天数)
FD0赋值:FD01 AND L=LLV(L,上次FG01距今天数)
J0赋值:(H+L)/2
FGH赋值:REF(H,上次FG0距今天数)
FGH1:=REF(H,上次FG0距今天数+1)
FGL1赋值:REF(L,上次FG0距今天数+1)
FGH2:=REF(H,上次FG0距今天数+2)
FGL2赋值:REF(L,上次FG0距今天数+2)
FGJ0赋值:REF(J0,上次FG0距今天数)
FGL赋值:REF(L,上次FG0距今天数)
FDH赋值:REF(H,上次FD0距今天数)
FDL赋值:REF(L,上次FD0距今天数)
FDH1:=REF(H,上次FD0距今天数+1)
FDL1:=REF(L,上次FD0距今天数+1)
FDH2:=REF(H,上次FD0距今天数+2)
FDL2:=REF(L,上次FD0距今天数+2)
FDJ0赋值:REF(J0,上次FD0距今天数)
如果FGL如果FGL如果FDH>FDH1返回FDH2否则返回FDH1
如果FDH>FDH1返回FDL2否则返回FDL1
FG1赋值:IF(((FGL>FDH AND FGH>FDZH) OR (FGH>FDH1 AND FDH1>FDH AND FDH>FDH2)),FG0,FG0 AND FGJ0>FDH AND FGH>FDZH)
FD1赋值:IF(((FDH
FG2赋值:FG1 AND H>=HHV(H,上次FD1距今天数)
FD2赋值:FD1 AND L<=LLV(L,上次FG1距今天数)
FG赋值:FG2 AND KDJ.K>40
FD赋值:FD2 AND KDJ.K<60
BK赋值:IF((FGL1>=FGL AND FG0) OR (FDH1<=FDH AND FD0),4,3)
G1赋值:FG AND 上次FD距今天数>BK
D1赋值:FD AND 上次FG距今天数>BK
G2赋值:G1 AND H>=HHV(H,上次D1距今天数)
D2赋值:D1 AND L<=LLV(L,上次G1距今天数)
G3赋值:G2 OR (FG0 AND KDJ.J>100)
D3赋值:D2 OR (FD0 AND KDJ.J<0)
G4赋值:G3 OR (FG0 AND REF(H,上次FG0距今天数)>REF(H,BARSLAST(G2)) AND BARSLAST(D2)>BARSLAST(G2))
D4赋值:D3 OR (FD0 AND REF(L,上次FD0距今天数)[BARSLAST(D2))]
G5赋值:G4 AND H=HHV(H,上次D4距今天数)
D5赋值:D4 AND L=LLV(L,上次G4距今天数)
如果G4返回H否则返回DRAWNULL
如果D4返回L否则返回DRAWNULL
NN赋值:G5
UU赋值:D5
DRAWLINE(UU,L,NN, H,0),COLORYELLOW, 线宽为2
DRAWLINE(NN,H,UU, L,0),COLORYELLOW, 线宽为2
{涨停板}
TB赋值:(C-1日前的C)/1日前的C*100
当满足条件TB>7时,在O和C之间画柱状线
当满足条件TB<-9.9时,在O和C之间画柱状线