0
Follow
0
Followers
其他都没问题, 回测正常, 实盘中只运行一次就结束了, 代码如下。
import time
import json
params = {
"arrBasePrice": [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
}
def process(index):
global params #定义全局变量
ticker = _C(e.GetTicker) #获取价格信息
def main():
global params
for i in range(len(exchanges)) :
params["acc"].append(_C(exchanges[i].GetAccount))
params["arrTick"].append(_C(exchanges[i].GetTicker))
exchanges[i].SetPrecision(params["arrPricePrecision"][i], params["arrAmountPrecision"][i])
for key in params :
if len(params[key]) < len(exchanges):
Log(len(params[key]), len(exchanges))
raise "params error!"
while True:
for i in range(len(exchanges)):
process(exchanges[i], i)
代码框架大概就是这样的。 实盘只运行了一次, 没有重复获取, 运行一次, 的具体次数, 是
arrBasePrice 后面字符长度的次数。
Related Recommendations
How to Specify Different Versions of Data for the Rented Strategy by Its Rental Code MetadataAdvanced Tutorial for FMZ Quant platform Strategy WritingElementary Tutorial for FMZ Quant platform Strategy WritingGet Started with FMZ Quant PlatformSECURITY BUGI keep getting error: Exchange_GetAccount: Invalid ContractTypeWe have an incredibly profitable market making algorithm for sideways markets on Bitmex - but need expert to help eliminate wait times during downward volatility in the marketError with deribitLimitations of the backtesting engineHow to install ta-lib on linux docker?
Comment
All comments (1)
- 1
