if barfreq <> "Tick" then
RaiseRuntimeError("請設定頻率為TICK");
variable:BarNumberOfToday(0); if Date
<> Date[1] then BarNumberOfToday=1
else BarNumberOfToday+=1;{記錄今天的Bar數}
if
TimeDiff(Time,Time[BarNumberOfToday-1],"M") < 60 and {開盤60分鐘內}
(q_DailyHigh-q_DailyLow)/q_RefPrice < 0.0 and {振幅小於1%才繼續}
highest(high,BarNumberOfToday-1) < q_RefPrice *1.005 and {最高在漲0.5%以內}//應可以調到1%以內
lowest(low,BarNumberOfToday-1) > q_RefPrice *0.995 {最低在跌0.5%以內}//應可以調到1%以內
then condition1 =true else condition1 =false;
if condition1 and
TimeDiff(Time,Time[BarNumberOfToday-1],"M")> 60 and {開盤一小時後}
q_Last = q_DailyLow {來到今天低點}//只是來到今天的低點,說不定這低點跟原來盤整的低點一樣,並沒有出現急殺的情況
沒有留言:
張貼留言