以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  为什么选择全部平仓,而总给我留一手??  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=52509)

--  作者:kevinxuan
--  发布时间:2013/5/28 14:12:24
--  为什么选择全部平仓,而总给我留一手??

SELLshort(( close-ENTERPRICE>3 and holding<>0) ,holding,limitr,open);
SELLSHORT((PK=1  ) ,holding,thisclose);                  //平空信号
SELL(( ENTERPRICE-CLOSE>3 and holding<>0) ,holding,limitr,open);

SELL((PD=1) ,holding,thisclose);  //平多信号

 

105     L00 塑料连续       塑料        13/05/28 11:15:00    开多    1579      10205     806769
106     L00 塑料连续       塑料        13/05/28 11:20:04    平多    1578      10225

 

99      RB00 螺纹钢连续    螺纹        13/05/28 10:49:01    开多    2532      3485      806769
100     RB00 螺纹钢连续    螺纹        13/05/28 10:50:01    平多    2529      3489      806769

 

 

 

107     TA00 PTA连续       PTA         13/05/28 13:45:01    开多    1749      7828      806769


110     TA00 PTA连续       PTA         13/05/28 13:50:03    平多    1748      7832      806769

同样的代码,其他品种又没发现留一手现象!!螺纹钢更是留了3手。。。


--  作者:jinzhe
--  发布时间:2013/5/28 14:14:06
--  

平仓手数写0,及时全部平仓,写holding只会平掉虚拟仓位对应的持仓


--  作者:kevinxuan
--  发布时间:2013/5/28 14:18:46
--  

SELLshort(( close-ENTERPRICE>3 and holding<>0) ,0,limitr,open);
SELLSHORT((PK=1  ) ,0,thisclose);                  //平空信号
SELL(( ENTERPRICE-CLOSE>3 and holding<>0) ,0,limitr,open);

SELL((PD=1) ,0,thisclose);  //平多信号
这样写??