等级: 超级版主
- 注册:
- 2021-5-18
- 曾用名:
|
然后策略公式去引用上面A得指标,这里给出开仓和平仓得一个范例,其他一些平仓得建议用户学习后自行完成
input:N6(1,1,10,1),N7(1,1,10,1),N9(1,1,10,1);
cond1:stkindi('sz399852','A.a',0,1,0) and stkindi('sz399852','A.a2',0,1,0) and stkindi('sz399852','A.b',0,1,0);
cond2:time>100000 and time<144500;
if holding=0 and cond1 and cond2 then
begin
sellshort(1,holding,marketr);
buy(1,1,marketr);
END
if enterbars>N6 and close<AVGENTERPRICE*(1-N7/100) then
begin
sell(1,holding,marketr);
END
//回落
if close<hhv(close,enterbars)*(1+N9/100) then
begin
sell(1,holding,marketr);
END |
|