0
Follow
0
Followers
获取布林数据代码
def get_boll(self, period = PERIOD_M1 ,variance = 2):
self.upLine = '---'
self.midLine = '---'
self.downLine = '---'
r = exchange.GetRecords(period)
if r and len(r) > 20:
boll = TA.BOLL(r, 20, 2)
self.upLine = boll[0]
self.midLine = boll[1]
self.downLine = boll[2]
log打出来2021-2-23 19:10的布林上中下轨第 -1 ,-2 ,-3 个的值为:

比如2021-2-23 19:10的布林带上轨值为48995
但是回测看K线,一分钟BB(20,2)的上轨值为48457

两个值错了500多。我对了下火币的K线,这个时候1分钟K线BB(20,2)的上轨值也为48457左右。
我知道应该是我使用问题,但是问题在哪儿啊,求助。
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 (6)
- 1


