如果A的H>=X,就开多单,在B走完前15秒平仓; 如果B的H>=X,就开多单,在C走完前15秒平仓; 如果C的H>=X,就开多单,在E走完前15秒平仓; 以此类推...... |
tq=(timetot0(dynainfo(207))>=time0-15) or NOt(islastbar);
if h>=x then buy(holding=0,1,thisclose);
if enterbars=1 and tq then sell(1,0,market);
需要使用固定时间间隔模式
tq:=(timetot0(dynainfo(207))>=time0-15) or NOt(islastbar); if h>=x then buy(holding=0,1,thisclose); if enterbars=1 and tq then sell(1,0,market); 1)这里holding=0,是不是可以去掉?因为只要每根K线的H>=X这根线的时候我都是要开多单的。 2)if...then...这个语句可以去掉吗? 如果全文改成下面这样效果是一样的吗?
|
1.可以去掉
2.一样的
3.0表示全平
对,多头持仓全平