Thank you for the quick reply,
Can you please tell me what to look for in the data feed reference to help me skip backfilling?
Posts made by Trade Prophet
Waiting a long time for IB to backfill
I using IB for live trade but the waiting time for backfill is very long(~20 minutes+),
I need daily bars of the last year for my strategy to start so its not many bars but still, I wait a long time,
here is my code :
I have a list of strategies(one in the added example) the symbols are read from csv file(2 in this case), then IB is registered and operated, nothing fancy.
feed_folder = 'quotes'
constituents = 
cerebro = bt.Cerebro() ibstore = bt.stores.IBStore(host='127.0.0.1', port=8002, clientId=33,notifyall=True) cerebro.broker = ibstore.getbroker() lookback = datetime.timedelta(days=200) strategies = [RiskPair_NN] for strategy in strategies: strats = cerebro.addstrategy(strategy=strategy, timeframe=datetime.timedelta(days=1),optimizing=False, feed_folder=feed_folder, start_date=datetime.datetime.now() - lookback,\ end_date=datetime.datetime.now()) symbol_list = ['SPY'] for strategy in strategies: with open(strategy.get_symbol_list_filename(), 'r') as f: reader = csv.reader(f) for ticker in reader: if len(ticker): symbol_list.append(ticker) symbol_list = set(symbol_list) for ticker in symbol_list: ib_dataname = ticker+'-STK-SMART-USD' data = ibstore.getdata(dataname=ib_dataname, name=ticker, clientId=33, reverse=False) cerebro.adddata(data) cerebro.run()
Can anyone share if they have to wait a long time too? can something be done about this?
RE: Issue with order_target on live trading
I have the same problem as reported in the initial post:
in my strategy, I call self.order_target_value(...), when debugging into that function I get to the framework call value = self.broker.getvalue(datas=[data]) , this call returns an invalid value(a very large value, close to the value of the entire portfolio), in my case, it should return 0 since the ticker does not exist in IB portfolio
Can you try and replicate this behavior and fix in case there is a bug?
error when buying stocks with ib
I use ib as the live broker and everything seems to be ok until I get to the code that actually buys a stock
I get the error "error() takes 2 positional arguments but 4 were given"
can anyone help?