在15分钟K线模式下,
当条件”A”满足时,而且时间不是收盘时间,那么在紧接的开盘时候平仓,平仓价格为上一根K线的收盘价;
当条件”A”满足时,而且时间是收盘时间,那么在本K线收盘前10秒钟平仓,平仓价格为市场价;
我想要问一下这样怎么编写程序,
buy(a and holding=0,1,limit,c);
程序化运行模式用走完k
交易-》下单设置-》止盈止损 收盘前几分钟平仓 10秒就不好弄了
能用后台吗?
当条件”A”满足时,而且时间不是收盘时间,那么在紧接的开盘时候平仓,平仓价格为上一根K线的收盘价;
这个需求在图表里面实现不了
if time<>closetime(0) and ref(a,1) then begin
sell(1,0,limitr,ref(c,1));
end
if time=closetime(0) and a and (dynainfo(207)>145950 or not(islastbar)) then sell(1,0,market);