Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:后台下单求救

1楼
lanchongms 发表于:2012/10/31 16:45:32
cc1:=stkindi(stklabel,'股指1.hold',0,17,0);  
cc2:=stkindi(stklabel,'股指2.hold',0,1,0);   

cc800988:=1*cc1 + 1*cc2;

order:=cc800988-holding;
if order>0 then begin
 pc:=min(abs(min(holding,0)),order);
 kc:=order-pc;
 sellshort(pc>0,pc,limitr,o);
 tsellshort(pc>0,pc,LMT,o);
 buy(kc>0,kc,limitr,o);
 tbuy(kc>0,kc,lmt,o); 
end
if order<0 then begin
 pc:=min(max(holding,0),abs(order));
 kc:=abs(order)-pc;
 sell(pc>0,pc,limitr,o);
 tsell(pc>0,pc,lmt,o); 
 buyshort(kc>0,kc,limitr,o); 
 tbuyshort(kc>0,kc,lmt,o);  
end

 

股指1.hold  ,hold表示引用的股指模型1的持仓
求救啊,这段代码后台怎么不会下单
代码的原理是,把两个模型的持仓合并起来下单,但在后台下单环节没反应 ,在图表显示的持仓正常

 

 

2楼
jinzhe 发表于:2012/10/31 17:05:31
你好,可以参考http://www.weistock.com/bbs/dispbbs.asp?boardid=4&id=1246&page=1&star=1先对自己公式进行调试,输出条件变量的具体数值看看,然后观察是哪里不对
共2 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.02734 s, 3 queries.