> 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/getmcdatad.md).

# GetMCDataD

## 語法

```
GetMCDataD(DB_Name,Time_Stamp,Key)
```

## 範例

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

```
if T=1005 then begin 
　　value1 = GetMCDataD("GV01",20170102,"GVClose");
　　print(value1);
end;
```

## 參數

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

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

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

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