2014年1月2日 星期四

跌破近日低點

如果我們都同意K線是多空角力拉距的軌跡,那麼連續多日的小紅小黑,應該可以代表雙方勢均力敵,在這樣的一個情況下,最近一根K棒如果開盤後創下近期的高點,然後收盤收在近期的低點之下,那麼背後代表的意義應該是多頭的一次全面性潰散,就好像拔河時,雙方在中線附近拉扯,一方眼看要突破僵局,卻反而急轉直下,這時力氣放盡的機率就很高。


這樣的情況,用XScript寫出來的語法如下:

input:Length(3); setinputname(1,"計算期數");

if high=highest(high[1],Length) and close<lowest(low[1],Length)
then ret=1;

以前老手們常笑我們,只會買股票,不會賣股票,也常笑我們一趟車從台北搭到高雄,結果回頭到了桃園還不下車,常常一路搭到宜蘭


 

2013年12月26日 星期四

高檔量縮收黑

   
input:DownPercent(4);  setinputname(1,"當期下跌幅度");
input:Ratio(20);       setinputname(2,"量縮程度%");
input:TieDays(3);      setinputname(3,"量縮持續期數");
input:UpTrendDays(20); setinputname(4,"累計上漲期數");
input:RaisingRatio(20);setinputname(5,"累計上漲幅度");

if Close[TieDays] >  close[UpTrendDays+TieDays-1] * (1+RaisingRatio/100) then
begin
  if Close< high[TieDays] * (1 - DownPercent/100) and
     volume[TieDays] > volume *(1+Ratio/100)
  then ret=1;

end;

階梯式下跌

   
input:TXT("5分鐘線以下"); setinputname(1,"使用限制");

if barfreq<> "Min" or barinterval > 5 then return;

switch (barinterval)
begin
   case 1,2,5:
     if time =091000 and TrueAll(open=high and close=low and close< close[1],10/barinterval) then ret=1;
     break;
   case 3:
     if time =090900 and TrueAll(open=high and close=low and close< close[1],3) then ret=1;
     break;

end;

連續n日開高走低收最低


input:Length(2); setinputname(1,"計算期數");


if Trueall( Open > Close[1]*1.005 and Close<open and close = low , Length) then ret=1;

跳空下跌再破底


//分鐘線
input:Gapratio(1.5);setinputname(1,"跳空下跌百分比%");
input:TXT("僅適用分鐘線"); setinputname(2,"使用限制");

if barfreq<>"Min" then return;

if Close < close[1] and Close < q_DailyOpen then

   if q_DailyOpen < q_RefPrice*(100-Gapratio)/100  then ret=1;

跌破上升趨勢線


input:Length(10); setinputname(1,"上升趨勢計算期數");
input:Angle(30); setinputname(2,"上升趨勢角度");

variable: TrendAngle(0);
variable: TrendAngleDelta(0);

if Close< Close[1] and Close[1] <Close[2] and Close[Length]>0 then begin

linearreg((high/Close[Length]-1)*100,Length,0,value1,TrendAngle,value3,value4);

TrendAngleDelta =TrendAngle-TrendAngle[1];
IF TrendAngleDelta-TrendAngleDelta[1] < -10 and close >Close[Length] THEN RET=1;
 

end;

股價震盪變大且收最低

  
input:Length(5);setinputname(1,"計算震盪幅度的區間期數");
input:BaseLength(20);setinputname(2,"震盪幅度計算區間");
input:Ratio(50);setinputname(3,"震盪放大百分比%");

value1=highest(high,Length)-lowest(low,Length);
value2=average(value1,BaseLength);

if  value1 crosses over value2 *(1+ratio/100) and close=low

then ret=1;