掘金社区

在掘金3平台或 jupyter QtConsole都无法运行Pinned highlighted

tcy 发表在问题反馈 2019-01-18 15:47:39

问题反馈
283
1
0

你好有在线的吗?
原代码

from future import print_function, absolute_import, unicode_literals
from gm.api import *
def init(context):
subscribe(symbols='SHSE.600000', frequency='1d')
def on_bar(context, bars):
# 打印当前获取的bar信息
bar = bars[0]
# 执行策略逻辑操作
print(bar)
if name == 'main':
run(strategy_id='strategy_1', filename='main.py', mode=MODE_BACKTEST,token='token_id',
backtest_start_time='2016-06-17 13:00:00', backtest_end_time='2017-08-21 15:00:00')

在网页上在掘金3运行显示
效的token

(tcy_p36) C:\Users\Administrator.goldminer3\projects\e5b8a6fb-1aef-11e9-8986-488ad215bba6>cd c:\Users\Administrator.goldminer3\projects\e5b8a6fb-1aef-11e9-8986-488ad215bba6 && cmd /C "set "PYTHONIOENCODING=UTF-8" && set "PYTHONUNBUFFERED=1" && python c:\Users\Administrator\AppData\Roaming\Goldminer3\resources\app\extensions\ms-python.python\pythonFiles\experimental\ptvsd_launcher.py --default --nodebug --client --host localhost --port 64079 c:\Users\Administrator.goldminer3\projects\e5b8a6fb-1aef-11e9-8986-488ad215bba6\main.py "

评论: 1

Looks like your connection to 掘金量化社区 - 量化交易者的策略交流学习社区 was lost, please wait while we try to reconnect.