等级: 专业版
- 注册:
- 2023-4-6
- 曾用名:
|
楼主 |
发表于 2024-8-30 15:19
|
显示全部楼层
JYSJ:CURRENTTIME>=093000;
//条件判断
A7:=IF(STRFIND(STKNAME ,'*',1),0,1) AND IF(STRFIND(STKNAME ,'ST',1),0,1);
A6:=REF(C,3)/REF(C,4)<1.08;
A1:=REF(C,2)>REF(C,3)*1.1-0.01;
A3:=REF(C,1)/REF(H,2)<1.08;
A2:=HIGH/REF(C,1)>=1.092;
A5:=A1 AND A2 AND A3 AND A6 AND A7;
CONDBUY:=FILTER(A5,5);
//下单条件//如果当前棒是最后一根K线,执行
//开仓
TBUY(CONDBUY AND CURRENTTIME<=100000 AND TBUYHOLDINGEX( '','',0 )=0,100,LMT,CLOSE+0.02,0);
//强平仓天数
CONDSELL:=TENTERBARS>=1 AND THOLDING>0;
//到期平仓
TSELL(CONDSELL ,TBUYHOLDINGEX( '','',0 ),LMT,CLOSE-0.02,0);
//固定止损止盈模块部分
//固定止盈条件判断
ZYCOND:=CLOSE-TAVGENTERPRICEEX2('' ,'' ,0)>=100*MINDIFF AND THOLDING>0;
//固定止损条件判断
ZSCOND:=TAVGENTERPRICEEX2('' ,'' ,0)-CLOSE>=20*MINDIFF AND THOLDING>0;
//固定止损止盈下单
TSELL(ZYCOND AND TENTERBARS>=1,TBUYHOLDINGEX( '','' ,0 ),LMT,CLOSE-0.02,0);
TSELL(ZSCOND AND TENTERBARS>=1,TBUYHOLDINGEX( '','' ,0 ),LMT,CLOSE-0.02,0);
//上涨6回调2卖出
DTYDZY:=(HHV(H,TENTERBARS)-CLOSE)/TAVGENTERPRICEEX2('' ,'' ,0)>=0.02 AND HHV(H,TENTERBARS)/TAVGENTERPRICEEX2('' ,'' ,0)>=1.05;
TSELL(DTYDZY AND TENTERBARS>=1 ,TBUYHOLDINGEX( '','' ,0 ),LMT,CLOSE-0.02,0);
老师,麻烦您就这个策略帮我改一个买入后监控账户持仓的的,其它的我就模仿,谢谢 |
|