Rss & SiteMap

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

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

标题:为何不开空呢?

1楼
qkl586 发表于:2010/9/21 1:57:45

PK:=SCB OR SCD OR VBD OR SCU;//平空条件
KD:=SCU;//开多条件

PD:=VBK OR XCD OR XCB;//平多条件
KK:=VBK OR XCD;//开空条件

 

PKK:=PK and time>092500 and time<145800;
KDD:=KD and time>092500 and time<145800;


 if PKK then 
 begin
    sellshort(holding<0,0,thisclose);
    buy(KDD AND holding=0,1,thisclose);
 end


 

PDD:=PD AND time>092500 and time<145800;
KKK:=KK AND time>092500 and time<145800;
if PDD then 


 begin
    sell(holding>0,0,thisclose);// mitr,o;
    buyshort(KKK AND holding=0,1,thisclose);// mitr,o;
 end
sell(time>150000 and holding>0,0,thisclose);//定时平仓
sellshort(time>150000 and holding<0,0,thisclose);//定时平仓

问题所在:

PD:=VBK OR XCD OR XCB;//平多条件三个条件全部能执行
KK:=VBK OR XCD;//开空条件只执行VBK,而XCD不能开空,图表上只显示其平多。

请高手指点一下问题出在哪里?公式这样写是否正确?谢谢!

2楼
fly 发表于:2010/9/21 8:46:36

1.既然VBK在平多开空的时候没有问题,那你不妨把VBK在平多开空的条件中都去掉.

 

集中跟踪输出XCD看看问题出在哪里.

 

2.你的是多条件复杂组合,最好把条件拆的简单点,分别组成策略一个一个跟踪一下.

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


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