Skip to content

Commit

Permalink
[trade] Add real and sim trade panel
Browse files Browse the repository at this point in the history
  • Loading branch information
Charmve committed Sep 2, 2024
1 parent 94c7075 commit 0f11e50
Show file tree
Hide file tree
Showing 288 changed files with 41,307 additions and 195 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,20 @@ export BLOSC_DIR=/opt/homebrew/opt/c-blosc
<b>同上</b>
</td>
</tr>
<tr valign="top">
<td>
<b>期货</b>
</td>
<td>
<ul>
<li><a href="docs/02-经典策略/03-期货/双均线策略.md">双均线策略 ('2022)</a></li>
<li><a href="docs/02-经典策略/03-期货/网络交易.md">网格交易 ('2022)</a></li>
</ul>
</td>
<td>
<b>同上</b>
</td>
</tr>
</tr>
</tbody>
</table>
Expand Down
2 changes: 1 addition & 1 deletion auto_monitor.py → backend/auto_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def show_notification_2(title, text):
使用mac系统定时任务crontab设置告警通知的执行时间。
crontab设置过程
1. 输入 crontab -e进入设置文本。
2. 填写 */3 9-12,13-15 * * 1-5 /usr/local/anaconda3/bin/python /Users/charmve/Qbot/auto_monitor.py ,
2. 填写 */3 9-12,13-15 * * 1-5 /usr/local/anaconda3/bin/python backend/auto_monitor.py ,
即周一到周五,上午9点到12点,下午1点到3点,每三分钟执行阀值告警。
"""

Expand Down
6 changes: 0 additions & 6 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-

import os

import wx

from qbot.gui.mainframe import MainFrame
Expand All @@ -12,8 +10,4 @@
frame = MainFrame(None, title="AI智能量化投研平台")
frame.Show()

os.popen(
"python /usr/local/anaconda3/bin/python /Users/charmve/Qbot/auto_monitor.py"
)

app.MainLoop()
1 change: 1 addition & 0 deletions pyfunds/funds
Submodule funds added at 947bb3
Binary file added qbot/asserts/statics/icons/btc_logo/binance_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added qbot/asserts/statics/icons/btc_logo/bitget_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added qbot/asserts/statics/icons/btc_logo/bybit_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added qbot/asserts/statics/icons/btc_logo/coinbase.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added qbot/asserts/statics/icons/btc_logo/okx_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added qbot/asserts/statics/icons/logo-with-font.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added qbot/asserts/statics/icons/qbot.ico
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added qbot/asserts/statics/icons/vnpy.ico
Binary file not shown.
62 changes: 62 additions & 0 deletions qbot/common/configs/back_para.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"layout_dict": {
"figsize": null,
"nrows": 3,
"ncols": 1,
"left": 0.08,
"bottom": 0.15,
"right": 0.92,
"top": 0.96,
"wspace": null,
"hspace": 0,
"height_ratios": [
1.5,
1,
1
],
"subplots": [
"kgraph",
"cashgraph",
"cmppfgraph"
]
},
"subplots_dict": {
"graph_fst": {
"graph_name": "kgraph",
"graph_type": {
"trade": null,
"close_retrace": null
},
"title": "sz.000875-回测分析",
"ylabel": "价格",
"xticks": 15,
"legend": "best"
},
"graph_sec": {
"graph_name": "cashgraph",
"graph_type": {
"cash_profit": {
"cash_hold": "100000",
"slippage": "0.01",
"c_rate": "0.0005",
"t_rate": "0.001",
"stake_size": "all"
}
},
"ylabel": "资金收益和回撤",
"xticks": 15,
"legend": "best"
},
"graph_fth": {
"graph_name": "cmppfgraph",
"graph_type": {
"cmp_profit": null
},
"ylabel": "策略收益VS基准收益",
"xlabel": "日期",
"xticks": 15,
"legend": "best",
"xticklabels": "%Y-%m-%d %H:%M"
}
}
}
169 changes: 169 additions & 0 deletions qbot/common/configs/btc_trade_plat_para.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
{
"__version__": "V1.3.8",
"__author__": "Charmve",
"欧易OKX": {
"license": "xxxxxxx",
"icon": "qbot/asserts/statics/icons/btc_logo/okx_logo.png",
"ads": [
"''",
"''"
],
"labels": [
"",
""
],
"api_key": {
"real_trade": {
"uid": "",
"apikey": "",
"secretkey": "",
"passphrase": ""
},
"sim_trade": {
"uid": "",
"apikey": "",
"secretkey": "",
"passphrase": ""
}
},
"operate_sys": [
"macos",
"windows"
],
"vip_channel": "https://www.cnouyi.social/join/57246734"
},
"币安Binance": {
"license": "xxxxxxx",
"icon": "qbot/asserts/statics/icons/btc_logo/binance_logo.png",
"ads": [
"''",
"''"
],
"labels": [
"",
""
],
"api_key": {
"real_trade": {
"uid": "",
"apikey": "",
"secretkey": ""
},
"sim_trade": {
"uid": "",
"apikey": "",
"secretkey": ""
}
},
"operate_sys": [
"macos",
"windows"
]
},
"火币Huobi": {
"license": "xxxxxxx",
"icon": "qbot/asserts/statics/icons/btc_logo/huobi_logo.png",
"ads": [
"''",
"''"
],
"labels": [
"",
""
],
"api_key": {
"real_trade": {
"uid": "443400068",
"apikey": "",
"secretkey": ""
},
"sim_trade": {
"uid": "",
"apikey": "",
"secretkey": ""
}
},
"operate_sys": [
"macos",
"windows"
]
},
"CoinBase": {
"license": "xxxxxxx",
"icon": "qbot/asserts/statics/icons/btc_logo/coinbase_logo.png",
"ads": [
"'开户享惊喜佣金'",
"''"
],
"api_key": {
"real_trade": {
"uid": "",
"apikey": "",
"secretkey": ""
},
"sim_trade": {
"uid": "",
"apikey": "",
"secretkey": ""
}
},
"labels": [
"国企券商",
"安全可靠"
]
},
"BitGet": {
"license": "xxxxxxx",
"icon": "qbot/asserts/statics/icons/btc_logo/bitget_logo.png",
"ads": [
"'专门极低佣金'",
"'新客专属理财'"
],
"labels": [
"国企券商",
"安全可靠"
],
"api_key": {
"real_trade": {
"uid": "",
"apikey": "",
"secretkey": ""
},
"sim_trade": {
"uid": "",
"apikey": "",
"secretkey": ""
}
},
"operate_sys": [
"windows"
]
},
"Bybit": {
"license": "xxxxxxx",
"icon": "qbot/asserts/statics/icons/btc_logo/bybit_logo.jpg",
"ads": [
"'开户享惊喜佣金'",
"'千万Cryper选择'"
],
"api_key": {
"real_trade": {
"uid": "",
"apikey": "",
"secretkey": ""
},
"sim_trade": {
"uid": "",
"apikey": "",
"secretkey": ""
}
},
"labels": [
"国企券商",
"安全可靠"
],
"operate_sys": [
"linux_x86"
]
}
}
70 changes: 70 additions & 0 deletions qbot/common/configs/firm_para.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"layout_dict": {
"figsize": null,
"nrows": 4,
"ncols": 1,
"left": 0.05,
"bottom": 0.15,
"right": 0.99,
"top": 0.96,
"wspace": null,
"hspace": 0,
"height_ratios": [
3.5,
1,
1,
1
],
"subplots": [
"kgraph",
"volgraph",
"kdjgraph",
"macdgraph"
]
},
"subplots_dict": {
"graph_fst": {
"graph_name": "kgraph",
"graph_type": {
"ochl": null,
"sma": [
20,
30,
60
]
},
"title": "000651 格力电器-日K线",
"ylabel": "价格",
"xticks": 15,
"legend": "best"
},
"graph_sec": {
"graph_name": "volgraph",
"graph_type": {
"vol": null
},
"ylabel": "成交量",
"xticks": 15
},
"graph_thd": {
"graph_name": "kdjgraph",
"graph_type": {
"kdj": null
},
"ylabel": "KDJ",
"xticks": 15,
"legend": "best"
},
"graph_fth": {
"graph_name": "macdgraph",
"graph_type": {
"macd": null
},
"ylabel": "MACD",
"xlabel": "日期",
"xticks": 15,
"legend": "best",
"xticklabels": "%Y-%m-%d %H:%M"
}
}
}
28 changes: 28 additions & 0 deletions qbot/common/configs/sys_para.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"__version__": "V1.3.8",
"__author__": "Charmve",
"operate_sys": "macos",
"multi-panels": {
"mpl_fig_x": 5,
"mpl_fig_y": 4,
"web_size_x": 600,
"web_size_y": 300,
"mpl_fig_left": 0.1,
"mpl_fig_right": 0.95,
"mpl_fig_top": 0.9,
"mpl_fig_bottom": 0.15
},
"mailbox": {
"license": "new_license_value",
"to_address": [
"[email protected]"
],
"from_address": "[email protected]",
"server_address": "smtp.qq.com"
},
"license_reminder_box": {
"latest_pop_date": "20240831",
"release_date": "20230829",
"license_created": false
}
}
Loading

0 comments on commit 0f11e50

Please sign in to comment.