Kismuz / btgym

Scalable, event-driven, deep-learning-friendly backtesting library
https://kismuz.github.io/btgym/
GNU Lesser General Public License v3.0
988 stars 261 forks source link

fix: BTgymBaseData's to_btfeed method should not directly use self.ti… #78

Closed ChunYoLin closed 6 years ago

ChunYoLin commented 6 years ago

When calling to Cerebro.run(), eventually, it will call the DataSeries getwriterinfo(), which use the timeframe as info for return value, it pass the data's timerframe to TimeFrame.TName screenshot from 2018-11-14 23-29-27 the default timeframe is minute base in btgym, but the default timeframe in backtrader is day, which are mismatch, in this patch, I correct the minute base and day base case.

Kismuz commented 6 years ago

@ChunYoLin, LGTM, thanks!

JaCoderX commented 5 years ago

@Kismuz this fix also need to be applied to 'model_based\datafeed\base' Just came across it while checking other stuff in the code :)

Kismuz commented 5 years ago

@JacobHanouna, thanks, will fix.