0
Follow
0
Followers
def get_records(value):
Log("get records day:",value)
records = exchange.GetRecords(PERIOD_D1)
res = 0
for i in range(-(value + 1),-1):
res = res + records[i]["Close"]
Log("time:", records[i]["Time"], "value:",records[i]["Close"])
return res/value
Sử dụng hàm này để tính đường trung bình
Trong thử nghiệm, không thể thiết lập chu kỳ k-line của ổ cứng là ngày, vì vậy độ dài của các bản ghi thường chỉ có 5,6 ngày, không thể có được đường trung bình 30 ngày, làm thế nào để giải quyết?
Related Recommendations
Advanced 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?5.5 Trading strategy optimization
