网上搜的缺口不闭的选股公式。地址http://www.360doc.com/content/15/0321/20/2366103_456998288.shtml

修改版,把中文替换掉了。后面有原版
N:=30; TS:=CURRBARSCOUNT;
TS1:=BARSSINCE(C);
CHANGSHU:=CONST(BARSSINCE(C));
C1:=REFX(C,CHANGSHU-TS12+2);
C2:=REF(C,CHANGSHU-TS
2+2);
O1:=REFX(O,CHANGSHU-TS12+2);
O2:=REF(O,CHANGSHU-TS
2+2);
H1:=REFX(H,CHANGSHU-TS12+2);
H2:=REF(H,CHANGSHU-TS
2+2);
L1:=REFX(L,CHANGSHU-TS12+2);
L2:=REF(L,CHANGSHU-TS
2+2);
CC:=IF(TS>TS1,C1,C2);
OO:=IF(TS>TS1,O1,O2);
LL:=IF(TS>TS1,L1,L2);
HH:=IF(TS>TS1,H1,H2);
FANQUEKOU:=HH<REF(LL,1);
XINHAO:=FANQUEKOU AND REF(LLV(LL,TS1),1)>HH;
FANXINHAO:=CROSS(SUM(XINHAO,TS1)=1,0.5);
DIJIA:=IF(FANXINHAO,REF(LLV(LL,TS1),1),0);
DIJIAHENGXIAN:=REF(DIJIA,BARSLAST(FANXINHAO));
ZHENGXINHAO:=REF(HH,BARSLAST(FANXINHAO))=H AND REF(LL,BARSLAST(FANXINHAO))=L AND
REF(CC,BARSLAST(FANXINHAO))=C AND REF(OO,BARSLAST(FANXINHAO))=O;
TIANTIAN:=BARSLAST(ZHENGXINHAO);
QUEKOUSHANG:=REF(DIJIAHENGXIAN,TIANTIAN);
QUEKOUXIA:=REF(H,TIANTIAN);
OUT:LLV(L,TIANTIAN)>QUEKOUXIA AND TIANTIAN>1 AND TIANTIAN<N;

=下面是中文变量的原版
N:=30; TS:=CURRBARSCOUNT;
TS1:=BARSSINCE(C);
常数:=CONST(BARSSINCE(C));
C1:=REFX(C,常数-TS12+2);
C2:=REF(C,常数-TS
2+2);
O1:=REFX(O,常数-TS12+2);
O2:=REF(O,常数-TS
2+2);
H1:=REFX(H,常数-TS12+2);
H2:=REF(H,常数-TS
2+2);
L1:=REFX(L,常数-TS12+2);
L2:=REF(L,常数-TS
2+2);
CC:=IF(TS>TS1,C1,C2);
OO:=IF(TS>TS1,O1,O2);
LL:=IF(TS>TS1,L1,L2);
HH:=IF(TS>TS1,H1,H2);
返缺口:=HH<REF(LL,1);
信号:=返缺口 AND REF(LLV(LL,TS1),1)>HH;
返信号:=CROSS(SUM(信号,TS1)=1,0.5);
低价:=IF(返信号,REF(LLV(LL,TS1),1),0);
低价横线:=REF(低价,BARSLAST(返信号));
正信号:=REF(HH,BARSLAST(返信号))=H AND REF(LL,BARSLAST(返信号))=L AND
REF(CC,BARSLAST(返信号))=C AND REF(OO,BARSLAST(返信号))=O;
天天:=BARSLAST(正信号);
缺口上:=REF(低价横线,天天);
缺口下:=REF(H,天天);
N日内底下有缺口:LLV(L,天天)>缺口下 AND 天天>1 AND 天天<N;

posted @ 2023-04-11 14:28  strongdady  阅读(106)  评论(0编辑  收藏  举报