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

By | 2019-08-13

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

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

腳本分別如下

創新高家數指標

1value1=GetSymbolField("1101.tw","收盤價","D");
2value2=GetSymbolField("1102.tw","收盤價","D");
3value3=GetSymbolField("1216.tw","收盤價","D");
4value4=GetSymbolField("1301.tw","收盤價","D");
5value5=GetSymbolField("1303.tw","收盤價","D");
6value6=GetSymbolField("1326.tw","收盤價","D");
7value7=GetSymbolField("1402.tw","收盤價","D");
8value8=GetSymbolField("2002.tw","收盤價","D");
9value9=GetSymbolField("2105.tw","收盤價","D");
10value10=GetSymbolField("2207.tw","收盤價","D");
11value11=GetSymbolField("2301.tw","收盤價","D");
12value12=GetSymbolField("2303.tw","收盤價","D");
13value13=GetSymbolField("2308.tw","收盤價","D");
14value14=GetSymbolField("2317.tw","收盤價","D");
15value15=GetSymbolField("2327.tw","收盤價","D");
16value16=GetSymbolField("2330.tw","收盤價","D");
17value17=GetSymbolField("2357.tw","收盤價","D");
18value18=GetSymbolField("2382.tw","收盤價","D");
19value19=GetSymbolField("2395.tw","收盤價","D");
20value20=GetSymbolField("2408.tw","收盤價","D");
21value21=GetSymbolField("2409.tw","收盤價","D");
22value22=GetSymbolField("2412.tw","收盤價","D");
23value23=GetSymbolField("2454.tw","收盤價","D");
24value24=GetSymbolField("2474.tw","收盤價","D");
25value25=GetSymbolField("2633.tw","收盤價","D");
26value26=GetSymbolField("2801.tw","收盤價","D");
27value27=GetSymbolField("2880.tw","收盤價","D");
28value28=GetSymbolField("2881.tw","收盤價","D");
29value29=GetSymbolField("2882.tw","收盤價","D");
30value30=GetSymbolField("2883.tw","收盤價","D");
31value31=GetSymbolField("2884.tw","收盤價","D");
32value32=GetSymbolField("2885.tw","收盤價","D");
33value33=GetSymbolField("2886.tw","收盤價","D");
34value34=GetSymbolField("2887.tw","收盤價","D");
35value35=GetSymbolField("2890.tw","收盤價","D");
36value36=GetSymbolField("2891.tw","收盤價","D");
37value37=GetSymbolField("2892.tw","收盤價","D");
38value38=GetSymbolField("2912.tw","收盤價","D");
39value39=GetSymbolField("3008.tw","收盤價","D");
40value40=GetSymbolField("3045.tw","收盤價","D");
41value41=GetSymbolField("3711.tw","收盤價","D");
42value42=GetSymbolField("4904.tw","收盤價","D");
43value43=GetSymbolField("4938.tw","收盤價","D");
44value44=GetSymbolField("5871.tw","收盤價","D");
45value45=GetSymbolField("5876.tw","收盤價","D");
46value46=GetSymbolField("5880.tw","收盤價","D");
47value47=GetSymbolField("6505.tw","收盤價","D");
48value48=GetSymbolField("9904.tw","收盤價","D");
49value49=GetSymbolField("9910.tw","收盤價","D");
50value50=GetSymbolField("2823.tw","收盤價","D");
51
52
53variable:count(0);
54input:period(20);
55count=0;
56if value1=highest(value1,period) then count=count+1;
57if value2=highest(value2,period) then count=count+1;
58if value3=highest(value3,period) then count=count+1;
59if value4=highest(value4,period) then count=count+1;
60if value5=highest(value5,period) then count=count+1;
61if value6=highest(value6,period) then count=count+1;
62if value7=highest(value7,period) then count=count+1;
63if value8=highest(value8,period) then count=count+1;
64if value9=highest(value9,period) then count=count+1;
65if value10=highest(value10,period) then count=count+1;
66if value11=highest(value11,period) then count=count+1;
67if value12=highest(value12,period) then count=count+1;
68if value13=highest(value13,period) then count=count+1;
69if value14=highest(value14,period) then count=count+1;
70if value15=highest(value15,period) then count=count+1;
71if value16=highest(value16,period) then count=count+1;
72if value17=highest(value17,period) then count=count+1;
73if value18=highest(value18,period) then count=count+1;
74if value19=highest(value19,period) then count=count+1;
75if value20=highest(value20,period) then count=count+1;
76if value21=highest(value21,period) then count=count+1;
77if value22=highest(value22,period) then count=count+1;
78if value23=highest(value23,period) then count=count+1;
79if value24=highest(value24,period) then count=count+1;
80if value25=highest(value25,period) then count=count+1;
81if value26=highest(value26,period) then count=count+1;
82if value27=highest(value27,period) then count=count+1;
83if value28=highest(value28,period) then count=count+1;
84if value29=highest(value29,period) then count=count+1;
85if value30=highest(value30,period) then count=count+1;
86if value31=highest(value31,period) then count=count+1;
87if value32=highest(value32,period) then count=count+1;
88if value33=highest(value33,period) then count=count+1;
89if value34=highest(value34,period) then count=count+1;
90if value35=highest(value35,period) then count=count+1;
91if value36=highest(value36,period) then count=count+1;
92if value37=highest(value37,period) then count=count+1;
93if value38=highest(value38,period) then count=count+1;
94if value39=highest(value39,period) then count=count+1;
95if value40=highest(value40,period) then count=count+1;
96if value41=highest(value41,period) then count=count+1;
97if value42=highest(value42,period) then count=count+1;
98if value43=highest(value43,period) then count=count+1;
99if value44=highest(value44,period) then count=count+1;
100if value45=highest(value45,period) then count=count+1;
101if value46=highest(value46,period) then count=count+1;
102if value47=highest(value47,period) then count=count+1;
103if value48=highest(value48,period) then count=count+1;
104if value49=highest(value49,period) then count=count+1;
105if value50=highest(value50,period) then count=count+1;
106
107value51=count;
108
109plot1(value51,"台灣50創新高家數指標");

創新低家數指標

1value1=GetSymbolField("1101.tw","收盤價","D");
2value2=GetSymbolField("1102.tw","收盤價","D");
3value3=GetSymbolField("1216.tw","收盤價","D");
4value4=GetSymbolField("1301.tw","收盤價","D");
5value5=GetSymbolField("1303.tw","收盤價","D");
6value6=GetSymbolField("1326.tw","收盤價","D");
7value7=GetSymbolField("1402.tw","收盤價","D");
8value8=GetSymbolField("2002.tw","收盤價","D");
9value9=GetSymbolField("2105.tw","收盤價","D");
10value10=GetSymbolField("2207.tw","收盤價","D");
11value11=GetSymbolField("2301.tw","收盤價","D");
12value12=GetSymbolField("2303.tw","收盤價","D");
13value13=GetSymbolField("2308.tw","收盤價","D");
14value14=GetSymbolField("2317.tw","收盤價","D");
15value15=GetSymbolField("2327.tw","收盤價","D");
16value16=GetSymbolField("2330.tw","收盤價","D");
17value17=GetSymbolField("2357.tw","收盤價","D");
18value18=GetSymbolField("2382.tw","收盤價","D");
19value19=GetSymbolField("2395.tw","收盤價","D");
20value20=GetSymbolField("2408.tw","收盤價","D");
21value21=GetSymbolField("2409.tw","收盤價","D");
22value22=GetSymbolField("2412.tw","收盤價","D");
23value23=GetSymbolField("2454.tw","收盤價","D");
24value24=GetSymbolField("2474.tw","收盤價","D");
25value25=GetSymbolField("2633.tw","收盤價","D");
26value26=GetSymbolField("2801.tw","收盤價","D");
27value27=GetSymbolField("2880.tw","收盤價","D");
28value28=GetSymbolField("2881.tw","收盤價","D");
29value29=GetSymbolField("2882.tw","收盤價","D");
30value30=GetSymbolField("2883.tw","收盤價","D");
31value31=GetSymbolField("2884.tw","收盤價","D");
32value32=GetSymbolField("2885.tw","收盤價","D");
33value33=GetSymbolField("2886.tw","收盤價","D");
34value34=GetSymbolField("2887.tw","收盤價","D");
35value35=GetSymbolField("2890.tw","收盤價","D");
36value36=GetSymbolField("2891.tw","收盤價","D");
37value37=GetSymbolField("2892.tw","收盤價","D");
38value38=GetSymbolField("2912.tw","收盤價","D");
39value39=GetSymbolField("3008.tw","收盤價","D");
40value40=GetSymbolField("3045.tw","收盤價","D");
41value41=GetSymbolField("3711.tw","收盤價","D");
42value42=GetSymbolField("4904.tw","收盤價","D");
43value43=GetSymbolField("4938.tw","收盤價","D");
44value44=GetSymbolField("5871.tw","收盤價","D");
45value45=GetSymbolField("5876.tw","收盤價","D");
46value46=GetSymbolField("5880.tw","收盤價","D");
47value47=GetSymbolField("6505.tw","收盤價","D");
48value48=GetSymbolField("9904.tw","收盤價","D");
49value49=GetSymbolField("9910.tw","收盤價","D");
50value50=GetSymbolField("2823.tw","收盤價","D");
51
52
53variable:count(0);
54input:period(20);
55count=0;
56if value1=lowest(value1,period) then count=count+1;
57if value2=lowest(value2,period) then count=count+1;
58if value3=lowest(value3,period) then count=count+1;
59if value4=lowest(value4,period) then count=count+1;
60if value5=lowest(value5,period) then count=count+1;
61if value6=lowest(value6,period) then count=count+1;
62if value7=lowest(value7,period) then count=count+1;
63if value8=lowest(value8,period) then count=count+1;
64if value9=lowest(value9,period) then count=count+1;
65if value10=lowest(value10,period) then count=count+1;
66if value11=lowest(value11,period) then count=count+1;
67if value12=lowest(value12,period) then count=count+1;
68if value13=lowest(value13,period) then count=count+1;
69if value14=lowest(value14,period) then count=count+1;
70if value15=lowest(value15,period) then count=count+1;
71if value16=lowest(value16,period) then count=count+1;
72if value17=lowest(value17,period) then count=count+1;
73if value18=lowest(value18,period) then count=count+1;
74if value19=lowest(value19,period) then count=count+1;
75if value20=lowest(value20,period) then count=count+1;
76if value21=lowest(value21,period) then count=count+1;
77if value22=lowest(value22,period) then count=count+1;
78if value23=lowest(value23,period) then count=count+1;
79if value24=lowest(value24,period) then count=count+1;
80if value25=lowest(value25,period) then count=count+1;
81if value26=lowest(value26,period) then count=count+1;
82if value27=lowest(value27,period) then count=count+1;
83if value28=lowest(value28,period) then count=count+1;
84if value29=lowest(value29,period) then count=count+1;
85if value30=lowest(value30,period) then count=count+1;
86if value31=lowest(value31,period) then count=count+1;
87if value32=lowest(value32,period) then count=count+1;
88if value33=lowest(value33,period) then count=count+1;
89if value34=lowest(value34,period) then count=count+1;
90if value35=lowest(value35,period) then count=count+1;
91if value36=lowest(value36,period) then count=count+1;
92if value37=lowest(value37,period) then count=count+1;
93if value38=lowest(value38,period) then count=count+1;
94if value39=lowest(value39,period) then count=count+1;
95if value40=lowest(value40,period) then count=count+1;
96if value41=lowest(value41,period) then count=count+1;
97if value42=lowest(value42,period) then count=count+1;
98if value43=lowest(value43,period) then count=count+1;
99if value44=lowest(value44,period) then count=count+1;
100if value45=lowest(value45,period) then count=count+1;
101if value46=lowest(value46,period) then count=count+1;
102if value47=lowest(value47,period) then count=count+1;
103if value48=lowest(value48,period) then count=count+1;
104if value49=lowest(value49,period) then count=count+1;
105if value50=lowest(value50,period) then count=count+1;
106
107value51=count;
108 
109plot1(value51,"台灣50創新低家數指標");

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

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

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

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

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

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