金牌定存股選股策略

By | 2017-05-26

在價值型機器人裡,金牌定存股這個策略是在尋找每年獲利都超過五億,且近五年獲利獲利都還算穩定的公司,然後在這樣的公司移動平均線出現翻多的情況時,通知使用者。

金牌定存股這個 選股策略是由兩個腳本組成,第一個是找出金牌定存股的腳本

input:lowlimit(5,"年度獲利下限(億)");

value1=GetField("本期稅後淨利","Y");//單位:百萬
value2=lowest(value1,5);//五年獲利低點
value3=average(value1,5);//五年來平均獲利
if value1/100> lowlimit//獲利超過年度獲利下限
and value1/100<50//獲利沒有超過五十億元
and 
value1>value1[1]*0.9
and value1[1]>value1[2]*0.9//年度獲利連續兩年未衰退超過一成
and value2*1.3>value3
//五年來獲利最差的時候比平均值沒有掉超過三成

then ret=1;

outputfield(1, value1/100, 1, "稅後淨利(億)");

第二個腳本則是用月線及季線來定義目前股價處在什麼位置

variable:m20(0),m60(0),message("0") ;
m20=average(close,20);
m60=average(close,60);
if close > m20 and c< m60 and m20<m60
then message="復甦期"
else 
if close > m20 and c> m60 and m20<m60
then message="收集期" 
else 
if close > m20 and c> m60 and m20 > m60
then message="多頭"
else 
if close < m20 and c>m60 and m20>m60
then message="警示期"
else 
if close < m20 and c<m60 and m20>m60
then message="發散期"
else 
if close < m20 and c<m60 and m20<m60
then message="空頭";

 

if message<>message[1]
and message="多頭"
and message[1]="收集期"
and message[2]="收集期"
and volume>500 and close>10
then ret=1;
outputfield1(message);
setoutputname1("今日訊號");
outputfield2(message[1]);
setoutputname2("昨日訊號");
outputfield3(message[2]);
setoutputname3("前日訊號");

這個腳本的概念是從下面這張圖來的

101205

腳本的概念是不管之前是什麼階段,第一天回頭多頭時就觸發通知訊號。

把這兩個腳本結合起來,就是當獲利穩定的公司,股價重返多頭的第一天,就請機器人發出警訊。

以上是金牌定存股的說明