Rss & SiteMap

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

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

标题:后台问题

1楼
系统使用者 发表于:2017/6/1 12:27:43
//固定轮询 后台持仓同步系统
cc:=holding;
if tholding>0 and kkcond then sell(1,ss,market);
if tholding<0 and kdcond then sellshort(1,ss,market);
if tholding=0 and buycond then buy(1,ss,market);
if tholding=0 and sellcond then buyshort(1,ss,market);
tm:=20;//撤单时间
wt:=tremainqty(0);
buyhold:=tbuyholdingex(1);
sellhold:=tsellholdingex(1);
if wt>0.5 and tsubmit(0)>tm then tcancelex(1,0);
if wt<0.5 then begin
 kc1:=max(cc,0)-buyhold;
 kc2:=abs(min(cc,0))-sellhold;
 if kc1<-0.5 then tsell(1,abs(kc1),mkt),allowrepeat;
 if kc2<-0.5 then tsellshort(1,abs(kc2),mkt),allowrepeat;
 if sellhold<0.5 and kc1>0.5 then tbuy(1,kc1,mkt),allowrepeat;
 if buyhold<0.5  and kc2>0.5 then tbuyshort(1,kc2,mkt),allowrepeat;
end

阿火同步功能。
[此贴子已经被作者于2017/6/1 12:28:33编辑过]
2楼
系统使用者 发表于:2017/6/1 12:31:02
wt:=tremainqty(0,ac,stklabel);
buyhold:=tbuyholdingex(ac,stklabel,1);
sellhold:=tsellholdingex(ac,stklabel,1);
改为任意账户,品种。通不过
3楼
系统使用者 发表于:2017/6/1 12:32:25
//固定1秒轮询
cc:=holding;
if holding>0 and c<ref(c,1) then sell(1,1,market);
if holding<0 and c>ref(c,1) then sellshort(1,1,market);
if holding=0 and c>ref(c,1) then buy(1,1,market);
if holding=0 and c<ref(c,1) then buyshort(1,1,market);
if not(islastbar) or workmode<>1 then exit;
tm:=30;//撤单时间
ac:='800988';//下单账户
wt:=tremainqty(0,ac,stklabel);
buyhold:=tbuyholdingex(ac,stklabel,1);
sellhold:=tsellholdingex(ac,stklabel,1);
if wt>0.5 and tsubmit(0)>tm then tcancelex(1,0,ac,stklabel);//如果用软件自带的撤单功能,这句删除。
if wt<0.5 then begin
 kc1:=max(cc,0)-buyhold;
 kc2:=abs(min(cc,0))-sellhold;
 if kc1<-0.5 then tsell(1,abs(kc1),mkt,0,0,ac),allowrepeat;
 if kc2<-0.5 then tsellshort(1,abs(kc2),mkt,0,0,ac),allowrepeat;
 if sellhold<0.5 and kc1>0.5 then tbuy(1,kc1,mkt,0,0,ac),allowrepeat;
 if buyhold<0.5  and kc2>0.5 then tbuyshort(1,kc2,mkt,0,0,ac),allowrepeat;
end
4楼
wenarm 发表于:2017/6/1 12:39:28

请问具体是什么问题?编译正常的,(通不过值得的是什么)。

5楼
系统使用者 发表于:2017/6/1 12:45:16
想不需要填写账户,这样麻烦。ac:='800988';//下单账户
6楼
wenarm 发表于:2017/6/1 12:47:45
你的意思是想不用ac:='800988';但是也要相同效果?
7楼
系统使用者 发表于:2017/6/1 12:55:37
对,就是这样。

8楼
系统使用者 发表于:2017/6/1 14:26:54
??/
9楼
pyd 发表于:2017/6/1 14:34:48
只有一个账号可以为空,表示所有账号,
[此贴子已经被作者于2017/6/1 14:35:23编辑过]
10楼
系统使用者 发表于:2017/6/1 14:45:24
如何改?
共14 条记录, 每页显示 10 条, 页签: [1] [2]


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