[Mod]import rqdatac only if required
This commit is contained in:
parent
7c533458ff
commit
59a4def393
1
docs/cta_strategy.md
Normal file
1
docs/cta_strategy.md
Normal file
@ -0,0 +1 @@
|
||||
# Introduction
|
@ -1,6 +1,7 @@
|
||||
# vn.py文档
|
||||
|
||||
|
||||
* [Introduction](introduction.md)
|
||||
* [Install](install.md)
|
||||
* [Quick Start](quickstart.md)
|
||||
* [vn.py简介](introduction.md)
|
||||
* [项目安装](install.md)
|
||||
* [基本使用](quickstart.md)
|
||||
* [CTA策略模块](cta_strategy.md)
|
1
docs/quickstart.md
Normal file
1
docs/quickstart.md
Normal file
@ -0,0 +1 @@
|
||||
# Introduction
|
@ -11,8 +11,6 @@ from threading import Thread
|
||||
from queue import Queue
|
||||
from copy import copy
|
||||
|
||||
import rqdatac
|
||||
|
||||
from vnpy.event import Event, EventEngine
|
||||
from vnpy.trader.engine import BaseEngine, MainEngine
|
||||
from vnpy.trader.object import (
|
||||
@ -105,6 +103,8 @@ class CtaEngine(BaseEngine):
|
||||
if not username or not password:
|
||||
return
|
||||
|
||||
import rqdatac
|
||||
|
||||
self.rq_client = rqdatac
|
||||
self.rq_client.init(username, password,
|
||||
('rqdatad-pro.ricequant.com', 16011))
|
||||
|
Loading…
Reference in New Issue
Block a user