Rss & SiteMap

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

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

标题:反复开仓的问题,百思不得其解

1楼
huifeng623 发表于:2012/6/21 10:04:29

buyshort(holding=0 and ref(c,1)>junx and c<=junx and time>t and time<tt,jj,limitr,c);

反复开仓的交易记录在下面:


图片点击可在新窗口打开查看此主题相关图片如下:11.gif
图片点击可在新窗口打开查看

2楼
just 发表于:2012/6/21 10:08:26

buyshort(type(3)<>1 and ref(c,1)>junx and c<=junx and time>t and time<tt,jj,limitr,c);

改这样试试

 

3楼
huifeng623 发表于:2012/6/21 10:12:53
type(3)<>1,表示:前3次的信号不是开多?
4楼
rushtaotao 发表于:2012/6/21 10:14:43

3是开空

得到当前位置之前上N次信号类型
输出:0、无信号1、开多2、平多3、开空;4、平空

5楼
just 发表于:2012/6/21 10:15:36
去看看TYPE函数的解释,type(3)<>1 表示之前无开空操作。  
6楼
huifeng623 发表于:2012/6/21 10:18:23
我想知道的是,我写的

buyshort(holding=0 and ref(c,1)>junx and c<=junx and time>t and time<tt,jj,limitr,c);

 

holding=0,为什么没起作用

7楼
rushtaotao 发表于:2012/6/21 10:25:01

你可以用cond:holdling=0  然后buyshort(cond,,)查下 你当前为止上cond是为1还是为0   是不是条件不对造成的

8楼
王锋 发表于:2012/6/21 10:26:53
你所出现的问题可能是你的代码中不止一次的含有buyshort这个指令,其实你在图表上就应该能够看到有多次的开空行为,如果你查不到原因,你可以贴出你的代码,我们帮你看看
9楼
王锋 发表于:2012/6/21 10:37:22

 

[此贴子已经被作者于2012-6-21 10:39:15编辑过]
10楼
huifeng623 发表于:2012/6/21 10:38:33

在代码中,只出现了1次buyshort:

buy(holding=0 and ref(c,1)<junx and c>=junx and time>t and time<tt,jj,LIMITr,c);

sell(holding>0 and (c-ENTERPRICE>=a*zy or ENTERPRICE-c>=a*zs or time>=tt),holding,LIMITr,c);

buyshort(holding=0 and type(1)<>3 and ref(c,1)>junx and c<=junx and time>t and time<tt,jj,limitr,c);

sellshort(holding<0 and (ENTERPRICE-c>=a*zy or c-ENTERPRICE>=a*zs or time>=tt),holding,limitr,c);

共33 条记录, 每页显示 10 条, 页签: [1] [2][3][4]


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