Backtrader-MQL5-API icon indicating copy to clipboard operation
Backtrader-MQL5-API copied to clipboard

backfill_from not working?

Open junaidnasir opened this issue 6 years ago • 0 comments

Hi, thanks for the package. I tried to run it with mt5 but to reduce the backfill time i tried running with backfill_from=data where data is a pandas feed. but it seems like backfill is not used and it gets everything from mt5.

# this works individually i.e if used with cerebro.adddata(backfill_data)
backfill_data = bt.feeds.PandasData(dataname=d2, datetime="datetime")
store = MTraderStore()
# this downloads all data from mt5 instead of using backfill_data
data = store.getdata(
    dataname="EURUSD",
    timeframe=bt.TimeFrame.Minutes,
    fromdate=start,
    compression=1,
    historical=True,
    backtfill_from=backfill_data,
)
cerebro.adddata(data)
cerebro.run()
cerebro.plot()

junaidnasir avatar Dec 19 '19 16:12 junaidnasir