if barfreq <> "Tick" then RaiseRuntimeError("請設定頻率為TICK"); variable:BarNumberOfToday(0); if Date <> Date[1] then BarNumberOfToday=1 else BarNumberOfToday+=1;{記錄今天的Bar數} if q_Last > q_RefPrice and q_Last > q_DailyOpen and q_Last = q_DailyHigh and {現價要上漲,漲過開盤價,且是今天高點} q_Last >= q_DailyLow*1.02 {要有2%下影線,表示開盤後曾下跌} then ret=1;