lwhuang 發表於 15-3-19 16:58
謝謝回覆!但如果只是價格的最高價或最低價碰到中軸,而open碰不到,那應該如何設定?
返是我的code:
OpenTime = 091500;
CloseTime = 161400;
ExitTime = TimeNum() >= CloseTime; //
EntryTime = (TimeNum()>= OpenTime ) AND (TimeNum()<CloseTime);
SellPrice = O;
CoverPrice = O;
Buy = RSI( 5 ) > 20
AND Ref( RSI( 5 ) , -1 ) < 20
AND Close < MA( Close , 20 )
AND EntryTime;
Sell = Close >= MA( Close , 20 )
OR ExitTime;
Short = RSI( 5 ) < 80
AND Ref( RSI( 5 ) , -1 ) > 80
AND Close > MA( Close , 20 )
AND EntryTime;
Cover = Close <= MA( Close , 20 )
OR ExitTime;
|