forked from josephchenhk/qtrader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
qtrader_config_sample.py
97 lines (81 loc) · 1.87 KB
/
qtrader_config_sample.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# -*- coding: utf-8 -*-
# @Time : 7/3/2021 9:04 AM
# @Author : Joseph Chen
# @Email : [email protected]
# @FileName: qtrader_config.py
# @Software: PyCharm
"""
Copyright (C) 2020 Joseph Chen - All Rights Reserved
You may use, distribute and modify this code under the
terms of the JXW license, which unfortunately won't be
written for another century.
You should have received a copy of the JXW license with
this file. If not, please write to: [email protected]
"""
BACKTEST_GATEWAY = {
"broker_name": "BACKTEST",
"broker_account": "",
"host": "",
"port": -1,
"pwd_unlock": -1,
}
IB_GATEWAY = {
"broker_name": "IB",
"broker_account": "",
"host": "127.0.0.1",
"port": 7497,
"clientid": 1,
"pwd_unlock": -1,
}
CQG_GATEWAY = {
"broker_name": "CQG",
"broker_account": "Demo",
"password": "pass",
"host": "127.0.0.1",
"port": 2823,
}
FUTU_GATEWAY = {
"broker_name": "FUTU",
"broker_account": "TEST123456",
"host": "127.0.0.1",
"port": 11111,
"pwd_unlock": 123456,
}
FUTUFUTURES_GATEWAY = {
"broker_name": "FUTUFUTURES",
"broker_account": "TEST123456",
"host": "127.0.0.1",
"port": 11111,
"pwd_unlock": 123456,
}
GATEWAYS = {
"Ib": IB_GATEWAY,
"Backtest": BACKTEST_GATEWAY,
"Cqg": CQG_GATEWAY,
"Futu": FUTU_GATEWAY,
"Futufutures": FUTUFUTURES_GATEWAY
}
TIME_STEP = 60000 # time step in milliseconds
DATA_PATH = {
"kline": "C:/Users/josephchen/data/k_line",
}
DATA_MODEL = {
"kline": "Bar",
}
DB = {
"sqlite3": "/Users/qtrader/data"
}
CLICKHOUSE = {
"host": "localhost",
"port": 9000,
"user": "default",
"password": ""
}
ACTIVATED_PLUGINS = ["analysis"]
LOCAL_PACKAGE_PATHS = []
ADD_LOCAL_PACKAGE_PATHS_TO_SYSPATH = False
AUTO_OPEN_PLOT = True
IGNORE_TIMESTEP_OVERFLOW = False
TELEGRAM_TOKEN = ""
TELEGRAM_CHAT_ID = 1
DATA_FFILL = True