For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
IB live: access data directly at 5min intervals (instead of resampling it)
-
For live trading currently I am getting data at 1 minute interval and resampling it to 5 mins.
store = bt.stores.IBStore(port=4002) stockkwargs_mins = dict(tz=pytz.timezone('US/Eastern'), timeframe=bt.TimeFrame.Minutes, rtbar=True, historical=false, qcheck=0.5, backfill_start=True, backfill=True) stock = args.ticker + "-STK-SMART-USD" data_mins = store.getdata(dataname=stock, **stockkwargs_mins) cerebro.resampledata(data_mins, timeframe=bt.TimeFrame.Minutes, compression=5)
But I want to access data directly at 5min intervals from interactive broker and don't want to use resampling. Can someone help me with this ?
Thank you!