台灣50專屬交易指標之創新高與新低指標

By | 2019-08-13

昨天跟大家介紹了台灣50的多空指標,有使用者問說在這樣的思維下,能否示範如何創造類似的指標,剛好觸發我寫0050多空指標的這位朋友,他原本就是專心在操作0050及00632R,所以原來就有一些私房的觀察指標,在取得他同意之後,今天來跟大家分享創新高與創新低指標。

這兩個指標的寫法跟昨天介紹的多空指標類似

腳本分別如下

創新高家數指標

value1=GetSymbolField("1101.tw","收盤價","D");
value2=GetSymbolField("1102.tw","收盤價","D");
value3=GetSymbolField("1216.tw","收盤價","D");
value4=GetSymbolField("1301.tw","收盤價","D");
value5=GetSymbolField("1303.tw","收盤價","D");
value6=GetSymbolField("1326.tw","收盤價","D");
value7=GetSymbolField("1402.tw","收盤價","D");
value8=GetSymbolField("2002.tw","收盤價","D");
value9=GetSymbolField("2105.tw","收盤價","D");
value10=GetSymbolField("2207.tw","收盤價","D");
value11=GetSymbolField("2301.tw","收盤價","D");
value12=GetSymbolField("2303.tw","收盤價","D");
value13=GetSymbolField("2308.tw","收盤價","D");
value14=GetSymbolField("2317.tw","收盤價","D");
value15=GetSymbolField("2327.tw","收盤價","D");
value16=GetSymbolField("2330.tw","收盤價","D");
value17=GetSymbolField("2357.tw","收盤價","D");
value18=GetSymbolField("2382.tw","收盤價","D");
value19=GetSymbolField("2395.tw","收盤價","D");
value20=GetSymbolField("2408.tw","收盤價","D");
value21=GetSymbolField("2409.tw","收盤價","D");
value22=GetSymbolField("2412.tw","收盤價","D");
value23=GetSymbolField("2454.tw","收盤價","D");
value24=GetSymbolField("2474.tw","收盤價","D");
value25=GetSymbolField("2633.tw","收盤價","D");
value26=GetSymbolField("2801.tw","收盤價","D");
value27=GetSymbolField("2880.tw","收盤價","D");
value28=GetSymbolField("2881.tw","收盤價","D");
value29=GetSymbolField("2882.tw","收盤價","D");
value30=GetSymbolField("2883.tw","收盤價","D");
value31=GetSymbolField("2884.tw","收盤價","D");
value32=GetSymbolField("2885.tw","收盤價","D");
value33=GetSymbolField("2886.tw","收盤價","D");
value34=GetSymbolField("2887.tw","收盤價","D");
value35=GetSymbolField("2890.tw","收盤價","D");
value36=GetSymbolField("2891.tw","收盤價","D");
value37=GetSymbolField("2892.tw","收盤價","D");
value38=GetSymbolField("2912.tw","收盤價","D");
value39=GetSymbolField("3008.tw","收盤價","D");
value40=GetSymbolField("3045.tw","收盤價","D");
value41=GetSymbolField("3711.tw","收盤價","D");
value42=GetSymbolField("4904.tw","收盤價","D");
value43=GetSymbolField("4938.tw","收盤價","D");
value44=GetSymbolField("5871.tw","收盤價","D");
value45=GetSymbolField("5876.tw","收盤價","D");
value46=GetSymbolField("5880.tw","收盤價","D");
value47=GetSymbolField("6505.tw","收盤價","D");
value48=GetSymbolField("9904.tw","收盤價","D");
value49=GetSymbolField("9910.tw","收盤價","D");
value50=GetSymbolField("2823.tw","收盤價","D");


variable:count(0);
input:period(20);
count=0;
if value1=highest(value1,period) then count=count+1;
if value2=highest(value2,period) then count=count+1;
if value3=highest(value3,period) then count=count+1;
if value4=highest(value4,period) then count=count+1;
if value5=highest(value5,period) then count=count+1;
if value6=highest(value6,period) then count=count+1;
if value7=highest(value7,period) then count=count+1;
if value8=highest(value8,period) then count=count+1;
if value9=highest(value9,period) then count=count+1;
if value10=highest(value10,period) then count=count+1;
if value11=highest(value11,period) then count=count+1;
if value12=highest(value12,period) then count=count+1;
if value13=highest(value13,period) then count=count+1;
if value14=highest(value14,period) then count=count+1;
if value15=highest(value15,period) then count=count+1;
if value16=highest(value16,period) then count=count+1;
if value17=highest(value17,period) then count=count+1;
if value18=highest(value18,period) then count=count+1;
if value19=highest(value19,period) then count=count+1;
if value20=highest(value20,period) then count=count+1;
if value21=highest(value21,period) then count=count+1;
if value22=highest(value22,period) then count=count+1;
if value23=highest(value23,period) then count=count+1;
if value24=highest(value24,period) then count=count+1;
if value25=highest(value25,period) then count=count+1;
if value26=highest(value26,period) then count=count+1;
if value27=highest(value27,period) then count=count+1;
if value28=highest(value28,period) then count=count+1;
if value29=highest(value29,period) then count=count+1;
if value30=highest(value30,period) then count=count+1;
if value31=highest(value31,period) then count=count+1;
if value32=highest(value32,period) then count=count+1;
if value33=highest(value33,period) then count=count+1;
if value34=highest(value34,period) then count=count+1;
if value35=highest(value35,period) then count=count+1;
if value36=highest(value36,period) then count=count+1;
if value37=highest(value37,period) then count=count+1;
if value38=highest(value38,period) then count=count+1;
if value39=highest(value39,period) then count=count+1;
if value40=highest(value40,period) then count=count+1;
if value41=highest(value41,period) then count=count+1;
if value42=highest(value42,period) then count=count+1;
if value43=highest(value43,period) then count=count+1;
if value44=highest(value44,period) then count=count+1;
if value45=highest(value45,period) then count=count+1;
if value46=highest(value46,period) then count=count+1;
if value47=highest(value47,period) then count=count+1;
if value48=highest(value48,period) then count=count+1;
if value49=highest(value49,period) then count=count+1;
if value50=highest(value50,period) then count=count+1;

value51=count;

plot1(value51,"台灣50創新高家數指標");

創新低家數指標

value1=GetSymbolField("1101.tw","收盤價","D");
value2=GetSymbolField("1102.tw","收盤價","D");
value3=GetSymbolField("1216.tw","收盤價","D");
value4=GetSymbolField("1301.tw","收盤價","D");
value5=GetSymbolField("1303.tw","收盤價","D");
value6=GetSymbolField("1326.tw","收盤價","D");
value7=GetSymbolField("1402.tw","收盤價","D");
value8=GetSymbolField("2002.tw","收盤價","D");
value9=GetSymbolField("2105.tw","收盤價","D");
value10=GetSymbolField("2207.tw","收盤價","D");
value11=GetSymbolField("2301.tw","收盤價","D");
value12=GetSymbolField("2303.tw","收盤價","D");
value13=GetSymbolField("2308.tw","收盤價","D");
value14=GetSymbolField("2317.tw","收盤價","D");
value15=GetSymbolField("2327.tw","收盤價","D");
value16=GetSymbolField("2330.tw","收盤價","D");
value17=GetSymbolField("2357.tw","收盤價","D");
value18=GetSymbolField("2382.tw","收盤價","D");
value19=GetSymbolField("2395.tw","收盤價","D");
value20=GetSymbolField("2408.tw","收盤價","D");
value21=GetSymbolField("2409.tw","收盤價","D");
value22=GetSymbolField("2412.tw","收盤價","D");
value23=GetSymbolField("2454.tw","收盤價","D");
value24=GetSymbolField("2474.tw","收盤價","D");
value25=GetSymbolField("2633.tw","收盤價","D");
value26=GetSymbolField("2801.tw","收盤價","D");
value27=GetSymbolField("2880.tw","收盤價","D");
value28=GetSymbolField("2881.tw","收盤價","D");
value29=GetSymbolField("2882.tw","收盤價","D");
value30=GetSymbolField("2883.tw","收盤價","D");
value31=GetSymbolField("2884.tw","收盤價","D");
value32=GetSymbolField("2885.tw","收盤價","D");
value33=GetSymbolField("2886.tw","收盤價","D");
value34=GetSymbolField("2887.tw","收盤價","D");
value35=GetSymbolField("2890.tw","收盤價","D");
value36=GetSymbolField("2891.tw","收盤價","D");
value37=GetSymbolField("2892.tw","收盤價","D");
value38=GetSymbolField("2912.tw","收盤價","D");
value39=GetSymbolField("3008.tw","收盤價","D");
value40=GetSymbolField("3045.tw","收盤價","D");
value41=GetSymbolField("3711.tw","收盤價","D");
value42=GetSymbolField("4904.tw","收盤價","D");
value43=GetSymbolField("4938.tw","收盤價","D");
value44=GetSymbolField("5871.tw","收盤價","D");
value45=GetSymbolField("5876.tw","收盤價","D");
value46=GetSymbolField("5880.tw","收盤價","D");
value47=GetSymbolField("6505.tw","收盤價","D");
value48=GetSymbolField("9904.tw","收盤價","D");
value49=GetSymbolField("9910.tw","收盤價","D");
value50=GetSymbolField("2823.tw","收盤價","D");


variable:count(0);
input:period(20);
count=0;
if value1=lowest(value1,period) then count=count+1;
if value2=lowest(value2,period) then count=count+1;
if value3=lowest(value3,period) then count=count+1;
if value4=lowest(value4,period) then count=count+1;
if value5=lowest(value5,period) then count=count+1;
if value6=lowest(value6,period) then count=count+1;
if value7=lowest(value7,period) then count=count+1;
if value8=lowest(value8,period) then count=count+1;
if value9=lowest(value9,period) then count=count+1;
if value10=lowest(value10,period) then count=count+1;
if value11=lowest(value11,period) then count=count+1;
if value12=lowest(value12,period) then count=count+1;
if value13=lowest(value13,period) then count=count+1;
if value14=lowest(value14,period) then count=count+1;
if value15=lowest(value15,period) then count=count+1;
if value16=lowest(value16,period) then count=count+1;
if value17=lowest(value17,period) then count=count+1;
if value18=lowest(value18,period) then count=count+1;
if value19=lowest(value19,period) then count=count+1;
if value20=lowest(value20,period) then count=count+1;
if value21=lowest(value21,period) then count=count+1;
if value22=lowest(value22,period) then count=count+1;
if value23=lowest(value23,period) then count=count+1;
if value24=lowest(value24,period) then count=count+1;
if value25=lowest(value25,period) then count=count+1;
if value26=lowest(value26,period) then count=count+1;
if value27=lowest(value27,period) then count=count+1;
if value28=lowest(value28,period) then count=count+1;
if value29=lowest(value29,period) then count=count+1;
if value30=lowest(value30,period) then count=count+1;
if value31=lowest(value31,period) then count=count+1;
if value32=lowest(value32,period) then count=count+1;
if value33=lowest(value33,period) then count=count+1;
if value34=lowest(value34,period) then count=count+1;
if value35=lowest(value35,period) then count=count+1;
if value36=lowest(value36,period) then count=count+1;
if value37=lowest(value37,period) then count=count+1;
if value38=lowest(value38,period) then count=count+1;
if value39=lowest(value39,period) then count=count+1;
if value40=lowest(value40,period) then count=count+1;
if value41=lowest(value41,period) then count=count+1;
if value42=lowest(value42,period) then count=count+1;
if value43=lowest(value43,period) then count=count+1;
if value44=lowest(value44,period) then count=count+1;
if value45=lowest(value45,period) then count=count+1;
if value46=lowest(value46,period) then count=count+1;
if value47=lowest(value47,period) then count=count+1;
if value48=lowest(value48,period) then count=count+1;
if value49=lowest(value49,period) then count=count+1;
if value50=lowest(value50,period) then count=count+1;

value51=count;
 
plot1(value51,"台灣50創新低家數指標");

下圖是一張創新高新低家數指標與台灣50日線的對照圖

我有把使用的原則寫在圖上,至於為何參數用20天,我朋友試過後說20天最好用,所以我就沒有試過其他天期。

下圖則是00632R的指標對照圖

我這位朋友用這對指標,以及昨天介紹的多空指標,以及他的一些私房指標,專注在操作0050及00632R,算是0050的操作達人。

另外跟大家分享一下,在自己發明私房的0050相關指標時,可以善用”取代“這個功能,直接一次修改50行的敘述,例如我要把average換成highest就直接填完按全部取代就好了

這樣就不用一行一行改了。

 

回應