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);
这个,应该是平仓与开仓同步出现才对,但我在模拟时发现,无法同步出现。
怎么才能同步呢?
顺序写成先平后开
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);