if 开仓 then begin buy(holding=0,100,market); n1:=date; end end if T then begin if 平仓 and n1>=n1+1 then begin // sell(1,0,market); n1:=0; end end
测试有错误,隔天平仓 应该怎么写才正确
2楼
一叶知秋 发表于:2016/1/26 13:53:34
建仓周期是 半小时的
3楼
jinzhe 发表于:2016/1/26 14:02:10
T:=time<143000 and time>093000; 开仓:h=hhv(h,3); 平仓:l=llv(l,3); if T then begin if 开仓 and holding=0 then begin buy(holding=0,100,market); n1:=date; end end if T then begin if 平仓 and date>=n1+1 and holding>0 then begin // sell(1,0,market); n1:=0; end end