> For the complete documentation index, see [llms.txt](https://touchance-1.gitbook.io/touchance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://touchance-1.gitbook.io/touchance/multicharts/jia-zhi-han-shu/gv-plus/getmcdatat.md).

# GetMCDataT

從指定暫存文件或是本機文件中，讀取指定時間、指定標記下的字串型變數，若取不到值或指定文件不存在，將返回 -999。

語法

```
GetMCDataT(DB_Name,Time_Stamp,Key)
```

## 範例

在圖表 B，K 棒時間為 10:05 時，從暫存文件 GV01 中，獲取標記為 GVsymbol 之數據，該數據時間戳記為 20170102，並將結果列印出來。

```
var:aa("");
if T=1005 then begin 
　　aa = GetMCDataT("GV01",20170102,"GVsymbol");
　　print(aa);
End;
```

## 參數

| **參數**      | **類型** | **說明**                                                     |
| ----------- | ------ | ---------------------------------------------------------- |
| DB\_Name    | 字串型    | 讀取數據的文件名稱。                                                 |
| Time\_Stamp | 數值型    | 讀取數據的時間戳記，可以是任意指定時點或K棒時間，如1200114 or Date+Time\_s/1000000。 |
| Key         | 字串型    | 讀取數據的標記名稱。                                                 |
|             |        |                                                            |

{% hint style="danger" %}
從暫存文件中取值: 需先透過 PutMCDataT 將數據儲存，\
再透過 GetMCDataT 取值。
{% endhint %}

{% hint style="danger" %}
從本機文件取值: 須先以 LoadMCDB 載入數據，再透過 GetMCDataT 取值。
{% endhint %}

{% hint style="warning" %}
無須設定文字檔路徑，只需設定文件名稱即可取值。
{% endhint %}
