Rss & SiteMap

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

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

标题:[求助]为什么开空操作被忽略?

1楼
uime 发表于:2015/6/12 6:08:41
思路:开盘同时开多开空各1手,15点止损,不止盈。收盘平仓。
代码:
buy(1,1,limitr,open);
buyshort(1,1,limitr,open);
if l<open-15 then sell(1,1,limitr,open-15);
if h>open+15 then sellshort(1,1,limitr,open+15);
if holding>0 then sell(1,1,thisclose);
if holding<0 then sellshort(1,1,thisclose);
为啥执行过程中,忽略了开空信号?
2楼
jinzhe 发表于:2015/6/12 8:47:30

代码就是这样写的?

那么原因就是,金字塔图表交易不能对锁,所以在有多仓的情况下,无法开空仓

3楼
jinzhe 发表于:2015/6/12 8:48:08

你改成

buy

sell

sell

 

buyshort

sellshort

sellshort

这样的顺序试试看

4楼
uime 发表于:2015/6/12 9:34:01
如果是因为无法对锁的原因,那么这个策略就无法用金字塔测试了
5楼
jinzhe 发表于:2015/6/12 9:38:48
我上门的解决方案试过了吗?
6楼
uime 发表于:2015/6/12 9:53:54
解决了,谢谢金总,看来不是对锁的问题
就用的是金总的方案
我凭相当然了
共6 条记录, 每页显示 10 条, 页签: [1]


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