通达信公式 呼应涨停及
N:=20;
ZT:=IF(C/REF(C,1)>1.0975 AND C=H,1,-1);
TS:=BARSLAST(ZT=1);
TJ1:=O<=REF(O,REF(TS,1)+1) AND ZT=1 AND REF(TS,1)<=N AND C>=REF(O,REF(TS,1)+1) AND REF(TS,1)+1>=2;
TJ2:=O>=REF(O,REF(TS,1)+1) AND L<=REF(C,REF(TS,1)+1)*1.03 AND ZT=1 AND REF(TS,1)<=N AND C>=REF(C,REF(TS,1)+1) AND REF(TS,1)+1>=2;
TJ3:=O<=REF(C,REF(TS,1)+1)*1.05 AND ZT=1 AND C> REF(C,REF(TS,1)+1) AND REF(TS,1)<=N AND REF(TS,1)+1>=2;{}
呼应涨停:TJ1 OR TJ2 OR TJ3,NODRAW;
DRAWTEXT_FIX(呼应涨停<>10,0.12,0.05,2,'欢迎使用春秋作品 ')COLORRED;
STICKLINE( ZT>0,0,1,2,0 ),COLOR00FFFF;
二次涨停:EVERY(ZT>0,2),COLOR0066FF,NODRAW;
三级跳涨停:EVERY(ZT>0,3),COLORLIRED,NODRAW;
STICKLINE( EVERY(ZT>0,2),0,1,2,0 ),COLOR0066FF;
STICKLINE( EVERY(ZT>0,3),0,1,2,0 ),COLORLIRED;
STICKLINE(REF(C,1)/C>1.0975 AND C=L,0,1,2,0 ),COLORGREEN;
跌停:REF(C,1)/C>1.0975 AND C=L ,NODRAW,COLORGREEN;
STICKLINE( 呼应涨停>0,0,1,2,0 ),COLORRED;
{
选股公式:
N:=20;
ZT:=IF(C/REF(C,1)>1.0975 AND C=H,1,-1);
TS:=BARSLAST(ZT=1);
TJ1:=O<=REF(O,REF(TS,1)+1) AND ZT=1 AND REF(TS,1)<=N AND C>=REF(O,REF(TS,1)+1) AND REF(TS,1)+1>=3;
TJ2:=O>=REF(O,REF(TS,1)+1) AND L<=REF(C,REF(TS,1)+1)*1.03 AND ZT=1 AND REF(TS,1)<=N AND C>=REF(C,REF(TS,1)+1) AND REF(TS,1)+1>=3;
TJ3:=O<=REF(C,REF(TS,1)+1)*1.05 AND ZT=1 AND C> REF(C,REF(TS,1)+1) AND REF(TS,1)<=N AND REF(TS,1)+1>=3;
选股:(TJ1 OR TJ2 OR TJ3) AND (REF(TS,1)>N-5);
}
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
N赋值:20
ZT赋值:IF(C/1日前的C>1.0975 AND C=H,1,-1)
TS赋值:上次ZT=1距今天数
TJ1赋值:O<=REF(O,REF(TS,1)+1) AND ZT=1 AND REF(TS,1)<=N AND C>=REF(O,REF(TS,1)+1) AND REF(TS,1)+1>=2
TJ2赋值:O>=REF(O,REF(TS,1)+1) AND L<=REF(C,REF(TS,1)+1)*1.03 AND ZT=1 AND REF(TS,1)<=N AND C>=REF(C,REF(TS,1)+1) AND REF(TS,1)+1>=2
TJ3赋值:O<=REF(C,REF(TS,1)+1)*1.05 AND ZT=1 AND C> REF(C,REF(TS,1)+1) AND REF(TS,1)<=N AND REF(TS,1)+1>=2
输出{}
呼应涨停:TJ1 OR TJ2 OR TJ3,NODRAW
当满足条件呼应涨停<>10时,在横轴0.12纵轴0.05位置书写文字
当满足条件 ZT>0时,在0和1之间画柱状线
输出
二次涨停:ZT>0最近2日一直存在,COLOR0066FF,NODRAW
输出
三级跳涨停:ZT>0最近3日一直存在,COLORLIRED,NODRAW
STICKLINE( ZT>0最近2日一直存在,0,1,2,0 ),COLOR0066FF
STICKLINE( ZT>0最近3日一直存在,0,1,2,0 ),COLORLIRED
STICKLINE(1日前的C/C>1.0975 AND C=L,0,1,2,0 ),COLORGREEN
输出
跌停:1日前的C/C>1.0975 AND C=L ,NODRAW,COLORGREEN
当满足条件 呼应涨停>0时,在0和1之间画柱状线
{
选股公式:
N赋值:20
ZT赋值:IF(C/1日前的C>1.0975 AND C=H,1,-1)
TS赋值:上次ZT=1距今天数
TJ1赋值:O<=REF(O,REF(TS,1)+1) AND ZT=1 AND REF(TS,1)<=N AND C>=REF(O,REF(TS,1)+1) AND REF(TS,1)+1>=3
TJ2赋值:O>=REF(O,REF(TS,1)+1) AND L<=REF(C,REF(TS,1)+1)*1.03 AND ZT=1 AND REF(TS,1)<=N AND C>=REF(C,REF(TS,1)+1) AND REF(TS,1)+1>=3
TJ3赋值:O<=REF(C,REF(TS,1)+1)*1.05 AND ZT=1 AND C> REF(C,REF(TS,1)+1) AND REF(TS,1)<=N AND REF(TS,1)+1>=3
输出
选股:(TJ1 OR TJ2 OR TJ3) AND (1日前的TS>N-5)
}