Skip to content

Commit

Permalink
Merge pull request vnpy#1704 from 1122455801/index_update_datarecorder
Browse files Browse the repository at this point in the history
[Add] Index update datarecorder
  • Loading branch information
vnpy authored May 15, 2019
2 parents 37d6216 + 7f1392e commit 952fbfd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/datarecoder.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ register_event()函数分别注册2种事件:EVENT_CONTRACT、EVENT_TICK

## 移除记录

移除记录操作:输入需要移除合约品种的本地代码,如rb1905.SHFE。该本地代码必须在“Tick记录列表” 或者“K线记录列表”中。若要移除Tick记录,只需在”Tick记录“那一栏上点击”移除“按钮即可。

下面展示代码运作原理:

- 从tick_recordings字典移除vt_symbol
- 调用save_setting()函数保存json配置文件
- 推送最新的tick_recordings字典来继续记录行情,原来移除合约品种不再记录。
Expand All @@ -252,6 +256,8 @@ register_event()函数分别注册2种事件:EVENT_CONTRACT、EVENT_TICK

## 停止记录

停止记录操作:只需手动关闭行情记录模块窗口就停止记录行情。

- 记录行情状态改为False, 停止while循环;
- 调用join()函数关掉线程。

Expand Down
6 changes: 6 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@
* [穷举算法](cta_backtester.md#穷举算法)
* [遗传算法](cta_backtester.md#遗传算法)

* [行情记录](datarecoder.md)
* [加载启动](datarecoder.md#加载启动)
* [开始收录](datarecoder.md#开始收录)
* [移除记录](datarecoder.md#移除记录)
* [停止记录](datarecoder.md#停止记录)


* [交易接口](gateway.md)
* [如何连接](gateway.md#如何连接)
Expand Down

0 comments on commit 952fbfd

Please sign in to comment.