Rss & SiteMap

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

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

标题:[原创]提前下单再请教

1楼
木鱼石传说 发表于:2013/7/29 16:20:10
    一个策略里面有两套系统,其中一套要求条件(long1/short1)一触发就下单,而另外一套要求条件(long2/short2)触发后在K线走完前提前N秒下单,图表交易时用“固定时间间隔1秒”轮询模式,下面代码是否正确?请老师指点:
tqxiadan:=(time0-timetot0(dynainfo(207))<=N) or not(islastbar);//提前下单秒数
    
//开多
   if long1 then begin
    sellshort(holding < 0 , ss,limitr,close),ignorecheckprice,orderqueue;
    buy(holding = 0, ss,limitr,close),ignorecheckprice,orderqueue;
    end

//开空
  if short1 then begin
    sell(holding > 0, ss,limitr,close),ignorecheckprice,orderqueue;
    buyshort(holding = 0, ss,limitr,close),ignorecheckprice,orderqueue;
    end

if tqxiadan then begin  

//开多
   if long2 then begin
    sellshort(holding < 0 , ss,limitr,close),ignorecheckprice,orderqueue;
    buy(holding = 0, ss,limitr,close),ignorecheckprice,orderqueue;
    end

//开空
  if short2 then begin
    sell(holding > 0, ss,limitr,close),ignorecheckprice,orderqueue;
    buyshort(holding = 0, ss,limitr,close),ignorecheckprice,orderqueue;
    end
end
2楼
jinzhe 发表于:2013/7/29 16:23:06

k线走完提前下单阿火秘笈里面有,跟着写就行了

http://www.weistock.com/bbs/dispbbs.asp?boardid=10&Id=9439第八个

 

3楼
木鱼石传说 发表于:2013/7/29 20:37:03
请金哲老师看看我写的代码对不对,我就是参考阿火老师的代码写的。
4楼
木鱼石传说 发表于:2013/7/30 8:49:37
  一个策略里面有两套系统,其中一套要求条件(long1/short1)一触发就下单,而另外一套要求条件(long2/short2)触发后在K线走完前提前N秒下单,图表交易时用“固定时间间隔1秒”轮询模式,下面代码是否正确?请老师指点:
tqxiadan:=(time0-timetot0(dynainfo(207))<=N) or not(islastbar);//提前下单秒数
    
//开多
   if long1 then begin
    sellshort(holding < 0 , ss,limitr,close),ignorecheckprice,orderqueue;
    buy(holding = 0, ss,limitr,close),ignorecheckprice,orderqueue;
    end

//开空
  if short1 then begin
    sell(holding > 0, ss,limitr,close),ignorecheckprice,orderqueue;
    buyshort(holding = 0, ss,limitr,close),ignorecheckprice,orderqueue;
    end

if tqxiadan then begin  

//开多
   if long2 then begin
    sellshort(holding < 0 , ss,limitr,close),ignorecheckprice,orderqueue;
    buy(holding = 0, ss,limitr,close),ignorecheckprice,orderqueue;
    end

//开空
  if short2 then begin
    sell(holding > 0, ss,limitr,close),ignorecheckprice,orderqueue;
    buyshort(holding = 0, ss,limitr,close),ignorecheckprice,orderqueue;
    end
end
5楼
jinzhe 发表于:2013/7/30 9:28:04

这个用在后台稳妥,图表有风险

6楼
木鱼石传说 发表于:2013/7/30 9:35:21
为什么“

用在后台稳妥,图表有风险

”?那如何改进?
7楼
jinzhe 发表于:2013/7/30 9:36:55

图表上用到实际行情时间的,都是有风险的,遇到需要用到此类函数的,都推荐使用后台,不推荐使用图表

8楼
木鱼石传说 发表于:2013/7/30 10:05:19
那看来得买专业版了
9楼
木鱼石传说 发表于:2013/7/30 10:13:19
专业版的下单速度会不会比标准版来的快些?我有2套标准版,能不能试用一下专业版?
[此贴子已经被作者于2013/7/30 10:13:45编辑过]
10楼
jinzhe 发表于:2013/7/30 10:20:25
可以,请联系销售人员
共10 条记录, 每页显示 10 条, 页签: [1]


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