2013年12月26日 星期四

開高後追高沒量,下殺無撐

    
 

input:C1(True); setinputname(1,"使用相對無量");
input:P1(150); setinputname(2,"絕對無量張數定義");

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

if q_DailyHigh > q_DailyOpen *1.01 and {開盤拉高1%以上}
   q_Last < q_DailyHigh*0.99 and q_Last < q_DailyOpen *0.98 and {現價跌破開盤價且從高點大幅回檔}
   currenttime < 93000 and date =currentdate  {必需在9:30以前發生}
then begin {計算拉升時總張數}

  variable: HighBar(NthHighestBar(1,Close,BarNumberOfToday)); {找到出現最高價那根Bar}
  variable:idx(BarNumberOfToday-1),PullVolume(0),DropVolume(0);
 
  for idx = BarNumberOfToday-1 to HighBar   {從開盤那個Bar,拉升到最高點那個Bar,上漲過程累計量}
  begin
    PullVolume += volume[idx]; {拉升的量}
  end;
 
  if C1 then begin {相對無量判斷開關}
          for idx = 0 to HighBar     {從現在這個Bar,往回到最高點那個Bar,下跌過程所有累計量}
          begin
                DropVolume += volume[idx]; {下跌的量}
          end;
         
          if DropVolume > PullVolume *3  then ret=1; {相對下跌過程而言,上漲無量的話,觸發}
  end;
 
  if PullVolume < P1  then ret=1; {上漲時,絕對量小於150的話,觸發}

end;



反彈無力


 variable:x(0);//適用於1分鐘線
variable:count(0);

value2=timevalue(time,"h");
value3=timevalue(time,"m");
value4=(value2-9)*60+value3;
for x=1 to value4
begin
if
 
close[x]<=open and high[x]/open[x]<=1.005 and close[x]/low[x]<=1.005
and high[x]<=high[x+1] and low[x]<=low[x+1]
then count=count+1;
end;
if date<>date[1] and time>090500 and count=value4
then ret=1;

主動性買盤大增

  
 input:Length(20); setinputname(1,"調整型外盤均量計算期數");
input:Ratio(50); setinputname(2,"
外盤量增幅度%");
input:TXT("
僅適用60分鐘線"); setinputname(3,"使用限制");
if barfreq<> "Min" or barinterval <> 60 then return;
variable: AvgOutSideVol(0),DayOSV(0);
DayOSV = GetQuote("當日外盤量");

AvgOutSideVol = averageIF( close > close[1] ,volume,Length);

switch(time)
begin
case 90000:
 
if DayOSV > AvgOutSideVol *(1+ Ratio/100) then ret=1;
case 100000:
if DayOSV/2 > AvgOutSideVol *(1+ Ratio/100) then ret=1;
case 110000:
if DayOSV/3 > AvgOutSideVol *(1+ Ratio/100) then ret=1;
case 120000:
if DayOSV/4 > AvgOutSideVol *(1+ Ratio/100) then ret=1;
end;

五分鐘線整理後突破


 input:Length(20); setinputname(1,"計算期數");
input:Ratio(0.5); setinputname(2,"
突破幅度%");
input:RRatio(1.5); setinputname(3,"
盤整區間幅度%");
input:TXT1("
僅適用5分鐘線"); setinputname(4,"使用限制");
if barfreq<> "Min" or barinterval <> 5 then return;
variable: RangeHigh(0);
variable: RangeLow(0);
RangeHigh=highest(close[1],length);
RangeLow=lowest(close[1],length);

if Close > RangeHigh*(1+Ratio/100) then
if RangeHigh < RangeLow * (1+ RRatio/100) then ret=1;

即將鎖第一根漲停板

    input:Length(20); setinputname(1,"過去無漲停期數");
input:Ratio(1); setinputname(2,"差幾%漲停");
input:TXT("
請用日線逐筆洗價"); setinputname(3,"使用限制");

if BarFreq = "D" then 
if Close > q_DailyUplimit*(1- Ratio/100) then
if TrueAll(close < Close[1]*1.068,Length) then ret=1;

漲停量縮不下來

input: lastvolume1(2000); setinputname(1,"漲停期間放量張數");
input: lastvolume2(10000); setinputname(2,"
當日總成交量上限");
input:TXT1("
需使用逐筆洗價"); setinputname(3,"使用限制");
variable: UPLVol(0);
if Date <> Date[1] then UPLVol = 0;

if Close =q_DailyUplimit then 
begin
UPLVol += q_TickVolume;
if q_BestBidSize1 <lastvolume1 and
 
q_DailyVolume >lastvolume2 and
UPLVol > lastvolume1
 

then RET=1;
end;

反常必有妖


 在系統內建警示腳本裡,當沖交易型這個目錄中,有一個"突破波動範圍"的腳本,今天來介紹這個簡單的腳本,它的程式碼如下:
input:Length(20); setinputname(1,"
高低計算期數");
variable:HighLow(0);
HighLow=high-low;
if HighLow>highest(HighLow[1],Length) then ret=1;
意思是如果最近一根bar盤中最高減最低,超過過去二十根bar的最大值,就請電腦通知你。

這個腳本很簡單,我個人是用在日線,搭配著成交量來用,我的邏輯是,每檔股票都有其股性,冷灶要熱燒前,一定會先加溫,而那種在加溫的股票,量會增加,高點減低點的差值也會變大,這就是我常說的反常必有妖。
各位可以參考附圖