修复vn.oanda中地址错误的bug
This commit is contained in:
parent
6aa67354a9
commit
9c3a5fce52
@ -9,7 +9,7 @@ from threading import Thread
|
||||
API_SETTING = {}
|
||||
API_SETTING['practice'] = {'rest': 'https://api-fxpractice.oanda.com',
|
||||
'stream': 'https://stream-fxpractice.oanda.com'}
|
||||
API_SETTING['trade'] = {'rest': 'https://api-fxpractice.oanda.com',
|
||||
API_SETTING['trade'] = {'rest': 'https://api-fxtrade.oanda.com',
|
||||
'stream': 'https://stream-fxtrade.oanda.com/'}
|
||||
|
||||
|
||||
|
@ -181,15 +181,13 @@ class DoubleEmaDemo(CtaTemplate):
|
||||
|
||||
|
||||
########################################################################################
|
||||
## 基于tick级别细粒度撤单追单测试demo
|
||||
|
||||
class OrderManagementDemo(CtaTemplate):
|
||||
"""追撤单策略Demo"""
|
||||
"""基于tick级别细粒度撤单追单测试demo"""
|
||||
|
||||
className = 'OrderManagementDemo'
|
||||
author = u'用Python的交易员'
|
||||
|
||||
# 策略参数
|
||||
|
||||
initDays = 10 # 初始化数据所用的天数
|
||||
|
||||
# 策略变量
|
||||
@ -270,6 +268,7 @@ class OrderManagementDemo(CtaTemplate):
|
||||
|
||||
self.sendOrder(self.orderType, self.tick.lastprice - 10, 1)
|
||||
self.lastOrder = None
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
def onBar(self, bar):
|
||||
"""收到Bar推送(必须由用户继承实现)"""
|
||||
|
@ -9,7 +9,7 @@ from threading import Thread
|
||||
API_SETTING = {}
|
||||
API_SETTING['practice'] = {'rest': 'https://api-fxpractice.oanda.com',
|
||||
'stream': 'https://stream-fxpractice.oanda.com'}
|
||||
API_SETTING['trade'] = {'rest': 'https://api-fxpractice.oanda.com',
|
||||
API_SETTING['trade'] = {'rest': 'https://api-fxtrade.oanda.com',
|
||||
'stream': 'https://stream-fxtrade.oanda.com/'}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user