-- 作者:海沙
-- 发布时间:2014/8/29 15:27:14
-- 后台交易
后台策略代码如下:
if tholding=0 then
begin
if buycond then
begin
tbuy(1,firstvol,mkt,0,0,\'\',\'if00\'),ignorecheckprice;
cc:=cc+firstvol;
end
.....
end
else
beging
.....
end
为什么后台执行时一直在买开仓?这个程序在图表上运行一点问题都没有,除了把HOLDING变成THOLDING,BUY变成TBUY,其它一点没变。为什么在后台运行就错了呢?(我已经仔细看了日志,日志上记录就是不停的执行上面的语句)
|
-- 作者:海沙
-- 发布时间:2014/8/29 16:25:07
--
buycc:=tbuyholdingex(\'\',\'if00\',1); sellcc:=tsellholdingex(\'\',\'if00\',1);
if buycc=0 and sellcc=0 then begin if buycont then begin tbuy(1,firstvol,mkt,0,0,\'\',\'if00\'),ignorecheckprice; lastprice:=tenterprice,noaxis; cc:=cc+firstvol; end
....
end
我如果按上面写法指定商品为\'if00‘,能不能达到监控指数,在主力合约上下单?
|