請問如果我的腳本內需要判斷當下某個商品當天的預估量,這樣的函數該怎麼寫
例如以XQ算預估量的方式?
請問如果我的腳本內需要判斷當下某個商品當天的預估量,這樣的函數該怎麼寫
例如以XQ算預估量的方式?
你好:
請試試看估計量函數能不能達成你的需求,請詳見說明網頁:估計量 (報價欄位)
我知道有這個,但還需要其他如個股,類股指數的預估量
你好:
估計量目前是支援TSE跟台股,所以個股是有資料的,其餘類股指數並不支援喔,以上說明。
如果想要自己根據當下的成交量來估算當天的收盤量,請問這樣的函數XS可以做得到嗎?如果可以該怎麼寫呢?
這樣一來就可以根據當天時間點來用自己定義的比例來算估計量,這樣就可不限於台股 大盤,其他商品都可以一併解決了...
所以是否可以請小幫手把XS目前用來計算台股,個股 估計量的函數做一個範本呢?
你好:
自行估算部分,你需要跟小幫手說明你的計算方式,小幫手才有辦法判斷是否能藉由XS撰寫相關腳本,以上說明。
內建的估計量只能用在警示,無法用在指標...所以需要一個可以用當下成交量隨著時間點的不同來估計出當日預估量
例如這樣,以5分為一個單位 並且將成交量可以盤中畫出,與昨日做對比
但由於需要在其他腳本中預估類股成交量和期貨與選擇權預估量,所以希望能將它設為函數
因為期貨與選擇權的預估量方式乘上的比例和大盤不同,時間點也不同所以先以下面這個為範例,
這樣的函數及指標應該怎麼寫

把現在的成交量乘以公式的倍數就是預估成交量,例如9:05大盤的成交量是100億,今天收盤的預估成交量就是100*14.99=1499億。
9:05 14.99
9:10 9.48
9:15 7.12
9:20 5.83
9:25 4.99
9:30 4.42
9:35 3.99
9:40 3.66
9:45 3.39
9:50 3.18
9:55 2.99
10:00 2.83
10:05 2.70
10:10 2.58
10:15 2.48
10:20 2.39
10:25 2.30
10:30 2.23
10:35 2.15
10:40 2.09
10:45 2.03
10:50 1.97
10:55 1.92
11:00 1.87
11:05 1.83
11:10 1.79
11:15 1.74
11:20 1.71
11:25 1.67
11:30 1.63
11:35 1.60
11:40 1.57
11:45 1.54
11:50 1.51
11:55 1.48
12:00 1.46
12:05 1.43
12:10 1.41
12:15 1.38
12:20 1.36
12:25 1.34
12:30 1.32
12:35 1.30
12:40 1.28
12:45 1.25
12:50 1.23
12:55 1.21
13:00 1.19
13:05 1.17
13:10 1.14
13:15 1.12
13:20 1.09
13:25 1.06
13:30 1.00
請問小幫手,這樣的公式及指標呈現方式的腳本語法該如何撰寫 我自己嘗試寫的如下,但卻還是沒有辦法做到如上的狀況,數值也是錯的不知道問題在哪
1.畫出不含當天過去5天均量當天用線顯示
2.劃出根據每五個五分鐘當下的大盤預估量
Input: period(5); setinputname(1, "期間(天)");
value1=average(GetSymbolField("TSE.TW","成交量","D"),period);
if time > 90000 and time < 90500 then value2=GetSymbolField("TSE.TW","成交量","D")* 14.99 else
if time > 90500 and time < 91000 then value2=GetSymbolField("TSE.TW","成交量","D")* 9.48 else
if time > 91000 and time < 91500 then value2=GetSymbolField("TSE.TW","成交量","D")* 7.12 else
if time > 91500 and time < 92000 then value2=GetSymbolField("TSE.TW","成交量","D")* 5.83 else
if time > 92000 and time < 92500 then value2=GetSymbolField("TSE.TW","成交量","D")* 4.99 else
if time > 92500 and time < 93000 then value2=GetSymbolField("TSE.TW","成交量","D")* 4.42 else
if time > 93000 and time < 93500 then value2=GetSymbolField("TSE.TW","成交量","D")* 3.99 else
if time > 93500 and time < 94000 then value2=GetSymbolField("TSE.TW","成交量","D")* 3.66 else
if time > 94000 and time < 94500 then value2=GetSymbolField("TSE.TW","成交量","D")* 3.39 else
if time > 94500 and time < 95000 then value2=GetSymbolField("TSE.TW","成交量","D")* 3.18 else
if time > 95000 and time < 95500 then value2=GetSymbolField("TSE.TW","成交量","D")* 2.99 else
if time > 95500 and time < 100000 then value2=GetSymbolField("TSE.TW","成交量","D")* 2.83 else
if time > 100000 and time < 100500 then value2=GetSymbolField("TSE.TW","成交量","D")* 2.7 else
if time > 100500 and time < 101000 then value2=GetSymbolField("TSE.TW","成交量","D")* 2.58 else
if time > 101000 and time < 101500 then value2=GetSymbolField("TSE.TW","成交量","D")* 2.48 else
if time > 101500 and time < 102000 then value2=GetSymbolField("TSE.TW","成交量","D")* 2.39 else
if time > 102000 and time < 102500 then value2=GetSymbolField("TSE.TW","成交量","D")* 2.3 else
if time > 102500 and time < 103000 then value2=GetSymbolField("TSE.TW","成交量","D")* 2.23 else
if time > 103000 and time < 103500 then value2=GetSymbolField("TSE.TW","成交量","D")* 2.15 else
if time > 103500 and time < 104000 then value2=GetSymbolField("TSE.TW","成交量","D")* 2.09 else
if time > 104000 and time < 104500 then value2=GetSymbolField("TSE.TW","成交量","D")* 2.03 else
if time > 104500 and time < 105000 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.97 else
if time > 105000 and time < 105500 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.92 else
if time > 105500 and time < 110000 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.87 else
if time > 110000 and time < 110500 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.83 else
if time > 110500 and time < 111000 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.79 else
if time > 111000 and time < 111500 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.74 else
if time > 111500 and time < 112000 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.71 else
if time > 112000 and time < 112500 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.67 else
if time > 112500 and time < 113000 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.63 else
if time > 113000 and time < 113500 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.6 else
if time > 113500 and time < 114000 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.57 else
if time > 114000 and time < 114500 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.54 else
if time > 114500 and time < 115000 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.51 else
if time > 115000 and time < 115500 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.48 else
if time > 115500 and time < 120000 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.46 else
if time > 120000 and time < 120500 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.43 else
if time > 120500 and time < 121000 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.41 else
if time > 121000 and time < 121500 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.38 else
if time > 121500 and time < 122000 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.36 else
if time > 122000 and time < 122500 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.34 else
if time > 122500 and time < 123000 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.32 else
if time > 123000 and time < 123500 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.3 else
if time > 123500 and time < 124000 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.28 else
if time > 124000 and time < 124500 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.25 else
if time > 124500 and time < 125000 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.23 else
if time > 125000 and time < 125500 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.21 else
if time > 125500 and time < 130000 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.19 else
if time > 130000 and time < 130500 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.17 else
if time > 130500 and time < 131000 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.14 else
if time > 131000 and time < 131500 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.12 else
if time > 131500 and time < 132000 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.09 else
if time > 132000 and time < 132500 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.06 else
if time > 132500 and time < 133000 then value2=GetSymbolField("TSE.TW","成交量","D")* 1.06 else
if time > 133000 {and time < 133500} then value2=GetSymbolField("TSE.TW","成交量","D")* 1;
plot1(value1,"均量");
plot2(value2,"預估量");
請問小幫手...可以看一下這樣寫法的問題在哪嗎?
你好:
待小幫手查看過後再向你回覆,謝謝。
謝謝你
26 評論