Rss & SiteMap

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

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

标题:[原创]后台头寸矫正程序

1楼
ch3coohqb 发表于:2010/9/21 13:51:37

后台头寸矫正程序

 

tsell(holding=0 and tholding>0,tholding,lmt,l-mindiff*2),ALLOWREPEAT;
tsellshort(holding=0 and tholding<0,tholding,lmt,h+mindiff*2),ALLOWREPEAT;
tbuy(holding>tholding and tholding>=0,holding-tholding,lmt,h+mindiff*2),ALLOWREPEAT;
tbuyshort(holding<tholding and tholding<=0,tholding-holding,lmt,l-mindiff*2),ALLOWREPEAT;

 

debugout('当前实际持仓%.0f',tholding);
debugout('当前图表持仓%.0f',holding);
debugout('开仓历时%.0f',tenterbars);
debugfile('d:\test.txt','当前持仓%.2f',tholding);
================

 

有时候做图表交易的时候会有部分交易指令没发出(不是没成交或者指令被拒而是没发出)~

目前暂时搞不清是用户自身操作问题还是CTP模拟服务器的问题还是软件问题

解决办法是开个后台头寸矫正程序

保持帐户中真实持仓与图表一致~

0秒确认的程序

非常同步..

 

 

2楼
wattwei 发表于:2010/9/21 14:06:44
好,有创造力。谢谢分享,论坛因你精彩
3楼
ch3coohqb 发表于:2010/9/21 14:15:42
开仓好像有点问题~平仓没问题...
4楼
msedu 发表于:2010/9/21 14:33:06

不错,这是我一贯的做法,这样做,科学不科学,尚且需要大家进一步探讨。。

5楼
newbasic 发表于:2010/9/30 12:33:58
谢谢你
6楼
newbasic 发表于:2010/9/30 21:18:50

不知道什么原因,开的仓很快被后台平掉了

7楼
newbasic 发表于:2010/9/30 21:20:06
能在语句后面做些注释吗
8楼
newbasic 发表于:2010/10/8 13:02:27

不知道什么原因,开的仓很快被后台平掉了

 设置时间间隔0秒
9楼
fly 发表于:2010/10/8 13:27:29
你用的是公用测试帐号吧,要是,就是别人给你平掉了
10楼
solarhe2006 发表于:2012/7/23 13:24:03

后台头寸矫正程序

 

tsell(holding=0 and tholding>0,tholding,lmt,l-mindiff*2),ALLOWREPEAT;
tsellshort(holding=0 and tholding<0,tholding,lmt,h+mindiff*2),ALLOWREPEAT;
tbuy(holding>tholding and tholding>=0,holding-tholding,lmt,h+mindiff*2),ALLOWREPEAT;
tbuyshort(holding<tholding and tholding<=0,tholding-holding,lmt,l-mindiff*2),ALLOWREPEAT;

 

debugout('当前实际持仓%.0f',tholding);
debugout('当前图表持仓%.0f',holding);
debugout('开仓历时%.0f',tenterbars);
debugfile('d:\test.txt','当前持仓%.2f',tholding);
================

 

有时候做图表交易的时候会有部分交易指令没发出(不是没成交或者指令被拒而是没发出)~

目前暂时搞不清是用户自身操作问题还是CTP模拟服务器的问题还是软件问题

解决办法是开个后台头寸矫正程序

保持帐户中真实持仓与图表一致~

0秒确认的程序

共10 条记录, 每页显示 10 条, 页签: [1]


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