以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  金字塔软件问题提交  (http://weistock.com/bbs/list.asp?boardid=2)
----  [求助]金字塔程序化不支持反手信号吗?  (http://weistock.com/bbs/dispbbs.asp?boardid=2&id=74185)

--  作者:jztcxh123
--  发布时间:2015/1/8 14:42:47
--  [求助]金字塔程序化不支持反手信号吗?

BUY(   CLOSE>REF(CLOSE,2)    AND holding=0,1,MARKET);       
BUYSHORT(  CLOSE<REF(CLOSE,2)  AND holding=0,1,MARKET);    
SELLSHORT(  CLOSE>REF(CLOSE,2)   AND holding<0 ,1,MARKET); 
SELL(  CLOSE<REF(CLOSE,2)   AND holding>0 ,1,MARKET);

这个,应该是平仓与开仓同步出现才对,但我在模拟时发现,无法同步出现。

怎么才能同步呢?


--  作者:pyd
--  发布时间:2015/1/8 14:48:04
--  

顺序写成先平后开

 

SELL(  CLOSE<REF(CLOSE,2)   AND holding>0 ,1,MARKET);
BUYSHORT(  CLOSE<REF(CLOSE,2)  AND holding=0,1,MARKET);
SELLSHORT(  CLOSE>REF(CLOSE,2)   AND holding<0 ,1,MARKET); 
BUY(   CLOSE>REF(CLOSE,2)    AND holding=0,1,MARKET);