@jakub-wozniak
Jakub,
Can you please post the main code flow you use to connect to IB and trade? I have the same problem with my paper account.
Thank you.
@jakub-wozniak
Jakub,
Can you please post the main code flow you use to connect to IB and trade? I have the same problem with my paper account.
Thank you.
here is the entire code sample:
# Create a cerebro entity
cerebro = bt.Cerebro()
# load symbol list from file
with open('list.txt', 'r') as f:
reader = csv.reader(f)
tickers = list(reader)
for ticker in tickers:
# Create a Data Feed
data = bt.feeds.QuandlCSV(
dataname=ticker[0]+'.csv',
fromdate=datetime.datetime(2013, 1, 1),
todate=datetime.datetime(2016, 12, 29),
adjclose=False, reverse=True)
# Add the Data Feed to Cerebro
cerebro.adddata(data)
the data was added using cerebro.adddata
for ticker in tickers:
# Create a Data Feed
data = bt.feeds.QuandlCSV(
dataname='ticker[0]+'.csv',
fromdate=datetime.datetime(2013, 1, 1),
todate=datetime.datetime(2016, 12, 29),
adjclose=False, reverse=True)
# Add the Data Feed to Cerebro
cerebro.adddata(data)
I added the data source with
data = bt.feeds.QuandlCSV(dataname="+ticker[0]+".csv",...)
but when calling print(order.data._name) I get the name of the ticker for datas[0] every time, regardless of the order sent to the print command, BTW all other parameters are displayed OK, only the _name is the same.
it should be basic and intuitive to get the ticker symbol.
but data attribute does not include the ticker, or am I missing something?
what is the data attribute for the ticker symbol?
How can I tell which ticker symbol was opened or closed when notify_order is called?