等级: 专业版
- 注册:
- 2023-4-6
- 曾用名:
|
楼主 |
发表于 2024-8-23 20:54
|
显示全部楼层
你好,这是图表交易的买入逻辑代码
A5:=IF(STRFIND(STKLABEL ,'*',1),0,1) AND IF(STRFIND(STKLABEL ,'ST',1),0,1);
A2:=REF(C,2)<REF(O,2) AND REF(C,1)<REF(O,1);
A3:=REF(C,1)<MA(C,21);
A1:=H/O>=1.03 AND O/REF(C,1)>=1.02 AND O/REF(C,1)<=1.05;
XC:A1 AND A2 AND A3 AND A5;
//下单条件
COND1:=XC AND HOLDING=0;
BUY(COND1,100,MARKETR);
这是相同的后台程序化买入代码
A5:=IF(STRFIND(STKLABEL ,'*',1),0,1) AND IF(STRFIND(STKLABEL ,'ST',1),0,1);
A2:=REF(C,2)<REF(O,2) AND REF(C,1)<REF(O,1);
A3:=REF(C,1)<MA(C,21);
A1:=DYNAINFO( 7)/OPEN>=1.03 AND OPEN/REF(C,1)>=1.02 AND O/REF(C,1)<=1.05;
JYSJ:=CURRENTTIME>=093000;
//下单条件
CONDBUY:=A1 AND A2 AND A3 AND A5;
//开仓
TBUY(CONDBUY AND TBUYHOLDINGEX( '','',0 )=0,1,LMT,CLOSE+0.02,0);
后台程序的精细化评测结果对比图表交易的回测结果,发现图表交易的回测买入时间逻辑是对的,后台程序的买入时间会晚一天,请帮忙看看是哪里没对 |
|