{
名稱:XS飆股創高
飆股的長相(林則行)選股
}
var: v_SmoothLowest(0); //平穩期最低點
var: v_SmoothHighest(0); //平穩期最高點
var: v_SmoothRange(0);//平穩期範圍
var: v_highest(0);//2年最高價
var: v_avg_vol(0); //VolLength 天數的平均成交量
var: v_QGrowth(0); // 季稅後淨利成長率
var: v_Mul(0); //當日成交量為20日均量倍數
input:SmoothDays(60); SetInputName(1,"平穩期天數");
input:VolLength(20); SetInputName(2, "均量天期");
input:MinMul(2); SetInputName(3, "創高時成交量大於均量最小倍數");
input:MaxRange(30); setinputname(4,"平穩期最大範圍");
input:paraGrowth1(-100); setinputname(5,"連續三季至少YOY獲利成長"); //20%,-100%指不考慮,單季稅後淨利YOY成長率
input:paraGrowth2(-100); setinputname(6,"最近一季轉機股成長率"); //100%,-100%指不考慮,單季稅後淨利YOY成長率
input:dayRange(480); setinputname(7,"創幾日新高");
settotalbar(3);
// 創高當日成交量需大於20天均量的2~3倍
v_avg_vol = Average(volume, VolLength);
v_Mul = Volume / v_avg_vol;
if v_Mul < MinMul then return;
//平穩期範圍 <=30%
v_SmoothLowest = lowest(low[1], SmoothDays);
v_SmoothHighest = Highest(High[1], SmoothDays);
v_SmoothRange = (1-(v_SmoothLowest / v_SmoothHighest))*100;
if v_SmoothRange > MaxRange then return;
// *** 判斷最高價 ***
v_highest = highest(close,dayRange);
if not (close >= v_highest) then return;
//*** 基本面 ***
//v_QGrowth = GetField("稅後淨利成長率","Q");
value1 = GetField("稅後淨利成長率","Q");
value2 = GetField("稅後淨利成長率","Q")[1];
value3 = GetField("稅後淨利成長率","Q")[2];
if not ((value1 >= paraGrowth1 and value2 >= paraGrowth1 and value3 >= paraGrowth1) or
(value1 >= paraGrowth2)) then return;
SetOutputName1("範圍"); OutputField1(v_SmoothRange,1);
SetOutputName2("成長率1");OutputField2(value1);
SetOutputName3("成長率2");OutputField3(value2);
SetOutputName4("成長率3");OutputField4(value3);
SetOutputName5("成交量放大倍數");OutputField5(v_Mul);
SetOutputName6("近年最高點"); OutputField6(v_highest);
SetOutputName7("平穩期最低點"); OutputField7(v_SmoothLowest);
SetOutputName8("最高點"); OutputField8(v_SmoothHighest);
Ret = 1;
|
留言列表