|
樓主 |
發表於 10-10-23 08:51
|
顯示全部樓層
謝謝...自己測試看看..
再問個問題
// Simple example of rotational trading system
// This is contrarian strategy -
// it buys 4 "worst" stocks - the ones that suffered the most in last year
// (4 stocks having worst 252-bar rate-of-change)
//
// 4 positions
MaxPositions = 4;
SetOption("MaxOpenPositions", MaxPositions );
SetOption("WorstRankHeld", MaxPositions + 2 );
SetPositionSize( 100 / MaxPositions, spsPercentOfEquity );
// trade on next day open
SetTradeDelays( 1, 1, 1, 1 );
BuyPrice = Open;
SetBacktestMode( backtestRotational );
// offsetting by large positive number
// makes sure that our score is always positive and we don't enter short trades
PositionScore = 10000 - ROC( C, 252 );
上面這程式沒有BUY 和SELL它是如何產生買賣訊號的? |
|