@backtrader Thanks, substituted fromdate instead of backfill_from and it works well.
For the next person searching for how do download ib historical data here is the small snippet that worked.
stockkwargs = dict(
timeframe = bt.TimeFrame.Days,
rtbar = False, # use RealTime 5 seconds bars
historical = True, # only historical download
what = 'TRADES', # historical - what to show TRADES MIDPOINT BID ASK BID_ASK HISTORICAL_VOLATILITY OPTION_IMPLIED_VOLATILITY
useRTH = False, # historical - download only Regular Trading Hours
qcheck = 0.5, # timeout in seconds (float) to check for events
backfill_start = True, # do backfilling at the start
backfill = True, # do backfilling when reconnecting
fromdate = datetime.datetime(2017,1,2), # get data from..
latethrough = False, # let late samples through
tradename = None # use a different asset as order target
)
data0 = ibstore.getdata(dataname="AAPL-STK-SMART-USD", **stockkwargs)
cerebro.adddata(data0)