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

# PutMCDataD

將數值型變數以暫存記憶體形式儲存於本機

## 語法

```
PutMCDataD(DB_Name,Time_Stamp,Key,Value)
```

## 範例

在圖表 A，K 棒時間為 10:00 時，將主圖商品收盤價，存入標記為 GVClose 的 Key 中，該數據將會寫入名為 GV01 的暫存文件哩，並將時間戳記標為 20170102。

```
if T=1000 then PutMCDataD("GV01",20170102,"GVClose",Close);
```

## 參數

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

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