2013年12月26日 星期四

大漲的股票跌破開盤價後未立即站回

      
if barfreq <> "Min" or barinterval <> 1 then RaiseRuntimeError("請設定頻率為1分鐘");
variable:KBarOfDay(0); if Date<> Date[1] then KBarOfDay = 1 else KBarOfDay+=1;
{9.   開高後大幅拉回後橫盤第三次跌破今日低點區(第三次到底而破)}

variable:LowCount(0); if Date<>Date[1] then LowCount=0;
if q_DailyOpen > q_RefPrice *1.02  and  {開高2%以上}
   q_DailyHigh >  Close *1.02  then  {已大幅回檔2%}
   condition1 = true else condition1 =false;
  
if condition1 and Low = Lowest(Low,KBarOfDay) then LowCount+=1;


if LowCount > 3 and AbsValue(close/q_DailyOpen-1) < 0.01 and
   Low < Lowest(Low[1], KBarOfDay-1) {橫盤觸低3 再破低}

then ret=1;

拉尾盤



下午一點以後創今天最高價且漲幅低於2%的非大型股
if barfreq <> "Tick" then RaiseRuntimeError("請設定頻率為TICK");
variable:BarNumberOfToday(0); if Date <> Date[1] then  BarNumberOfToday=1 else  BarNumberOfToday+=1;{記錄今天的Bar}

variable: Half12(0);


if Half12=0 and  Time >130000 then Half12 =BarNumberOfToday; {一過13:00記錄之前的交易筆數}

if Time < 131000 and  BarNumberOfToday > Half12*2  and{10分鐘內就產生了今天13:00前相同的交易筆數}//為何*2?
   q_Last > q_DailyHigh   {來到今天高點}

then ret=1;





多方撤守。 開盤第一個小時一直在平盤上下游走但突然殺破平盤。


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   {來到今天低點}//只是來到今天的低點,說不定這低點跟原來盤整的低點一樣,並沒有出現急殺的情況

then ret=1;







開盤前十五分鐘最低價被更新超過五次且跌幅尚未超過2%


if barfreq <> "Tick" then RaiseRuntimeError("請設定頻率為TICK");
variable:BarNumberOfToday(0); if Date <> Date[1] then  BarNumberOfToday=1 else  BarNumberOfToday+=1;{記錄今天的Bar}

if Date =currentdate  then begin

  variable: Point(0),idx(0),tTime(0);tTime=0;
  Point = intportion( BarNumberOfToday/10);
   for idx = 0 to 9
   begin
      if  Close[idx*Point] < Close[(idx+1)*Point] then  tTime+=1; {下跌時記1}
   end; 
  
   if tTime >=5 and{一路向下過低5}
      Timediff(Time,Time[BarNumberOfToday-1],"M") < 15{分鐘} and {離開盤第1個價15分鐘內}
      q_PriceChangeRatio > -2 {跌幅仍在2%}
   then   ret=1;
  

end;





殺尾盤

12點以後跌破今天多次觸及但一直未跌破的低檔區
if barfreq <> "Min" or barinterval <> 1 then RaiseRuntimeError("請設定頻率為1分鐘");
variable:KBarOfDay(0); if Date<> Date[1] then KBarOfDay = 1 else KBarOfDay+=1;

variable:TouchLowCounter(0),HLRatio12(0),tLow(0);

if Time > 93000 and Low = lowest(Low,KBarOfDay-1) then TouchLowCounter+=1;
{9:30以後觸低次數}

if Time < 120000 then
begin
  HLRatio12 = ((q_DailyHigh-q_DailyLow)/q_RefPrice-1)*100;
  {12:00以前高低點波幅}
  tLow = q_DailyLow;
  {記下低點}
end;

if date=currentdate and  Time > 120000 and Low > 3 and  {今日 12:00有後多次觸及低點}
   HLRatio12 <2 and    tLow > q_RefPrice *0.98  and  {波幅在2%內且12:00前還沒跌超過2%}
   Low = q_DailyLow   {來到今日低點時觸發}//最好帶量跌破才觸發
then ret=1;




大漲後的股票第一次跌破平盤後站回平盤,接著再跌破一次但站不回平盤時,殺


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;



狹幅長時間盤整後的突破盤整區


if barfreq <> "Min" or barinterval <> 1 then RaiseRuntimeError("請設定頻率為1分鐘");
variable:KBarOfDay(0); if Date<> Date[1] then KBarOfDay = 1 else KBarOfDay+=1;


input:P1(60); setinputname(1,"狹幅盤整計算期間(分鐘)");

if high = q_DailyHigh and  {來到今日最高價}
   KBarOfDay > 30 and {今日至少有30K棒交易}
   TrueAll( AbsValue(Close[1]/Close[2]-1) < 0.005,KBarOfDay-1) and{必需只有小波動}
   AbsValue(  Close[1]/Close[KBarOfDay-1]-1 ) < 0.02 {開盤到前分收K不超過2%}//不一定要押那麼死啦,我是覺得主要是要早盤到發動前的高低點差距不超過2%且每分鐘波動不要太大即可,0.005感覺有點太狹小

then ret=1;