Update dmaAlgo.py

This commit is contained in:
cclauss 2018-06-20 09:34:19 +02:00 committed by GitHub
parent 10e9be7c03
commit ecb86676c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,9 +31,9 @@ class DmaAlgo(AlgoTemplate):
# 参数强制类型转换保证从CSV加载的配置正确 # 参数强制类型转换保证从CSV加载的配置正确
self.vtSymbol = str(setting['vtSymbol']) # 合约代码 self.vtSymbol = str(setting['vtSymbol']) # 合约代码
self.direction = text_type(setting['direction']) # 买卖 self.direction = text_type(setting['direction']) # 买卖
self.offset = text_type(setting['offset']) # 开平 self.offset = text_type(setting['offset']) # 开平
self.priceType = text_type(setting['priceType']) # 价格类型 self.priceType = text_type(setting['priceType']) # 价格类型
self.price = float(setting['price']) # 价格 self.price = float(setting['price']) # 价格
self.totalVolume = float(setting['totalVolume']) # 数量 self.totalVolume = float(setting['totalVolume']) # 数量