zha0yangchen
zha0yangchen
talib计算的和国内软件的不一样
希望能再出一个更简化的context,把on_tick,on_bar都合并到on_calculate中去,逻辑是订阅了tick数据,则不必等到bar闭合而是tick或者order或者trade有更新就可以触发on_calculate计算,否则要等到bar闭合再触发计算。这样使用习惯上就mc,tb,文华,天勤这些比较接近,迁移也没那么难了。毕竟很多搞交易的还是不是程序员出身,真的不太擅长也搞不懂回调,写起来觉得别扭。另外一些偏高频的策略也可以用这个context来实现,比如偏高频一点的套利,现在那个demo是用cta_context实现的,但是实盘如果没有tick数据,肯定不行,如果要用hft_context来实现,难度又大了不少
no document and no disscution to answer this question, is there any bro can help?
### Expected Behavior Expected data should same as this high = pd.DataFrame({'high': self.data.High}, index=self.data.index).resample('15min').agg('max').dropna().values[:, 0][-500:] ### Actual Behavior but when i use self.High = resample_apply('15min', None, self.data.High) and print( self.High[-1],...