在諸多先賣後買的當沖策略中,跟人性最有關係的,莫過於
以下附上公司高手針對這個策略所寫的腳本
if barfreq <> "Tick" then RaiseRuntimeError("請設定頻率為TICK"); variable:BarNumberOfToday(0); if Date <> Date[1] then BarNumberOfToday=1 else BarNumberOfToday+=1;{記錄今天的Bar數} if date=currentdate and date[10] =Date and {今日曾經大漲} Close > Close[10]*1.015 then condition1=true else condition1=false; if condition1 and close[1] >= q_RefPrice and close < q_RefPrice then condition2 =true else condition2 =false; {大漲後曾跌破平盤} if condition2 and close = q_RefPrice then condition3 =true else condition3 =false; {跌破後曾回到平盤} if q_Last = q_DailyLow and condition3 {來到今低且前面各種狀況皆成立} then ret=1;