623战法通达信公式 主图 副图 源码附图
HIGHN:=10;
AA:=REF(C,HIGHN)=HHV(C,2*HIGHN+1);
QY:=BACKSET(AA,HIGHN+1);
CC:=FILTER(QY,HIGHN) AND C=HHV(C,HIGHN+1);
DDD:=BARSLAST(CC);
GDTS:=IF(CC,CURRBARSCOUNT,0);
DINGBU:=IF(DDD,REF(C,DDD),C);
DINGBU1:=REF(DINGBU,DDD+1);
DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);
GDCS1:=CONST(DINGBUTS);
DINGBUTS1:=REF(DINGBUTS,DDD+10);
LOWN:=10;
AA1:=REF(L,LOWN)=LLV(L,2*LOWN+1);
QY1:=BACKSET(AA1,LOWN+1);
CC1:=FILTER(QY1,LOWN) AND L=LLV(L,LOWN+1);
DDTS:=IF(CC1,CURRBARSCOUNT,0);
DD1:=BARSLAST(CC1);
DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);
DDCS1:=CONST(DDTS1);
GDCS2:=CONST(DINGBUTS1);
DINGBU2:=REF(DINGBU1,DDD+1);
DDTS2:=REF(DDTS1,DD1+1);
DDCS2:=CONST(DDTS2);
ZZ:=5;
AC:=REF(C,ZZ)=HHV(C,2*ZZ+1);
AD:=BACKSET(AC,ZZ+1);
AE:=FILTER(AD,ZZ) AND C=HHV(C,ZZ+1);
AF:=BARSLAST(AE);
AG:=IF(AE,CURRBARSCOUNT,0);
AH:=IF(AF,REF(C,AF),C);
AI:=IF(AF,REF(AG,AF),AG);
AL:=CONST(AI);
短T:DRAWLINE(CURRBARSCOUNT=AL,C,ISLASTBAR,REF(C,AL-1),1),DOTLINE,COLORYELLOW LINETHICK3;
T线:DRAWLINE(CURRBARSCOUNT=GDCS1,C,ISLASTBAR,REF(C,GDCS1-1),1),DOTLINE,COLORGREEN;
ZT:= CLOSE>=ZTPRICE(REF(CLOSE,1),0.1) AND CLOSE=HIGH;
冲击涨停:=HIGH>=ZTPRICE(REF(CLOSE,1),0.1) AND CLOSE < HIGH AND CLOSE > OPEN AND (PERIOD=5);
开盘%:(OPEN - REF(CLOSE,1))/REF(CLOSE,1)*100,NODRAW,COLORLIMAGENTA;
KBTB:=(CLOSE>=ZTPRICE(REF(CLOSE,1),0.1)) AND OPEN = CLOSE;
KB_CNT:=COUNT(KBTB,135);
DRAWTEXT(ZT AND 开盘%>5 AND (PERIOD=5),HIGH*0.96,'★'),COLOR00D7FF;
STICKLINE(ZT AND NOT(KBTB) AND (PERIOD=5),CLOSE*0.9985,OPEN*1.0015,1.286,0),COLOR00D7FF;
STICKLINE(冲击涨停 AND (PERIOD=5),CLOSE*0.9985,OPEN+(C-O)*0.4,1.286,0),COLOR00D7FF;
{布中:EMA(CLOSE,20) COLORYELLOW LINETHICK2;}
BOLL轨:=EMA(CLOSE,20) COLORBLUE LINETHICK1 DOTLINE;
BOLL翘:=IF(BOLL轨>REF(BOLL轨,1),BOLL轨,DRAWNULL),COLORRED,LINETHICK1 POINTDOT{ DOTLINE};
UB:BOLL+2*STD(CLOSE,20)COLORRED LINETHICK2 DOTLINE;
LB:=BOLL-2*STD(CLOSE,20)COLORRED LINETHICK1 DOTLINE;
SS1:=C>O AND C/O<1.02 ;
SS2:=C>MA(C,13) AND C/MA(C,13)<1.03;
SS3:=MA(C,13)>REF(MA(C,13),2);
Z1:=STRCAT(DYBLOCK,' ');
Z2:=STRCAT(Z1,HYBLOCK);
Z3:=STRCAT(Z2,' ');
DRAWTEXT_FIX(ISLASTBAR,0.4,0,0,STRCAT(Z3,GNBLOCK)),COLORYELLOW;
未来函数检测结果如下:
该公式包含未来函数:BACKSET
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
HIGHN赋值:10
AA赋值:HIGHN日前的C=2*HIGHN+1日内C最高值
QY赋值:BACKSET(AA,HIGHN+1)
CC赋值:QY的HIGHN过滤 AND C=HIGHN+1日内C最高值
DDD赋值:上次CC距今天数
如果CC返回 到最后交易的周期否则返回0
DINGBU赋值:IF(DDD,DDD日前的C,C)
DINGBU1:=DDD+1日前的DINGBU
DINGBUTS:=IF(DDD,DDD日前的GDTS,GDTS)
GDCS1赋值:CONST(DINGBUTS)
DINGBUTS1:=DDD+10日前的DINGBUTS
LOWN赋值:10
AA1:=LOWN日前的L=2*LOWN+1日内L最低值
QY1:=BACKSET(AA1,LOWN+1)
CC1:=QY1的LOWN过滤 AND L=LOWN+1日内L最低值
如果CC1返回 到最后交易的周期否则返回0
DD1赋值:上次CC1距今天数
DDTS1:=IF(DD1,DD1日前的DDTS,DDTS)
DDCS1赋值:CONST(DDTS1)
GDCS2赋值:CONST(DINGBUTS1)
DINGBU2:=DDD+1日前的DINGBU1
DDTS2:=DD1+1日前的DDTS1
DDCS2赋值:CONST(DDTS2)
ZZ赋值:5
AC赋值:ZZ日前的C=2*ZZ+1日内C最高值
AD赋值:BACKSET(AC,ZZ+1)
AE赋值:AD的ZZ过滤 AND C=ZZ+1日内C最高值
AF赋值:上次AE距今天数
如果AE返回 到最后交易的周期否则返回0
AH赋值:IF(AF,AF日前的C,C)
AI赋值:IF(AF,AF日前的AG,AG)
AL赋值:CONST(AI)
输出短T:DRAWLINE( 到最后交易的周期=AL,C,ISLASTBAR,AL-1日前的C,1),DOTLINE,画黄色 线宽为3
输出T线:DRAWLINE( 到最后交易的周期=GDCS1,C,ISLASTBAR,GDCS1-1日前的C,1),DOTLINE,画绿色
ZT赋值: 收盘价>=ZTPRICE(1日前的收盘价,0.1) AND 收盘价=最高价
冲击涨停赋值:最高价>=ZTPRICE(1日前的收盘价,0.1) AND 收盘价 < 最高价 AND 收盘价 > 开盘价 AND (PERIOD=5)
输出开盘%:(开盘价 - 1日前的收盘价)/1日前的收盘价*100,NODRAW,COLORLIMAGENTA
KBTB赋值:(收盘价>=ZTPRICE(1日前的收盘价,0.1)) AND 开盘价 = 收盘价
KB_CNT赋值:统计135日满足KBTB的天数
DRAWTEXT(ZT AND 开盘%>5 AND (PERIOD=5),最高价*0.96,'★'),COLOR00D7FF
STICKLINE(ZT AND NOT(KBTB) AND (PERIOD=5),收盘价*0.9985,开盘价*1.0015,1.286,0),COLOR00D7FF
STICKLINE(冲击涨停 AND (PERIOD=5),收盘价*0.9985,开盘价+(C-O)*0.4,1.286,0),COLOR00D7FF
输出{布中:收盘价的20日指数移动平均 画黄色 线宽为2
}
BOLL轨赋值:收盘价的20日指数移动平均 画蓝色 LINETHICK1 DOTLINE
BOLL翘赋值:IF(BOLL轨>1日前的BOLL轨,BOLL轨,DRAWNULL),画红色,LINETHICK1 POINTDOT{ DOTLINE}
输出UB:BOLL+2*收盘价的20估算标准差画红色 线宽为2 DOTLINE
LB赋值:BOLL-2*收盘价的20估算标准差画红色 LINETHICK1 DOTLINE
SS1赋值:C>O AND C/O<1.02
SS2赋值:C>C的13日简单移动平均 AND C/C的13日简单移动平均<1.03
SS3赋值:C的13日简单移动平均>REF(C的13日简单移动平均,2)
Z1赋值:STRCAT(DYBLOCK,' ')
Z2赋值:STRCAT(Z1,HYBLOCK)
Z3赋值:STRCAT(Z2,' ')
DRAWTEXT_FIX(ISLASTBAR,0.4,0,0,STRCAT(Z3,GNBLOCK)),画黄色