ranaroussi / qtpylib

QTPyLib, Pythonic Algorithmic Trading
http://qtpylib.io
Apache License 2.0
2.13k stars 508 forks source link

[BUG] When running blotter.py no data is being stored #143

Open ngehr opened 4 years ago

ngehr commented 4 years ago

Describe the bug After installing everything correctly and IB Gateway running, I have configured the blotter.py file to connect with my demo account.

IB Gateway was configured with the steps according to installation docs.

My problem is, when I run python blotter.py, it connects successfully to IB Gateway and recognizes the symbol from symbols.csv. It even logs the market data into the IBGW protocol. But it does not seem to store the data into the mysql db.

There is no error message. But when I explore the DB, I see no entries.

After the "Contract Added [IBDE30]"-message, no more message shows up and it just continues to run without storing..

Also, when I then go on and try to run a strategy, it does not seem to run either.. I guess its related.

When the strategy has the "preload" param set, it actually manages to load and store the data correctly however! After the preload ran, I was able to select the bar data in the db for the first time.. So it's just the live tick data that is not being stored at all..

Any ideas?? Thanks in advance! blotter

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

ngehr commented 4 years ago

The symbol I'm trying to get is: IBDE30,CFD,SMART,EUR,,0.0,0.0

sajjudroid commented 4 years ago

I have the same issue. I am using Windows 10, python 3.7.6. What I figure out is that symbol.csv file is generated but no market data is fetched and stored in the database. I am using Trader Workstation with a demo account. I tried to tick the API options and the connection is established but no data stored in the database.

shanka19 commented 3 years ago

Facing the same issue! I run blotter.py in the background along with TWS and also the strategy.py but no market data gets fetched.

yubobao27 commented 3 years ago

No market data is coming in...mysql is empty...running strategy does nothing.... does this require a live instead of paper-trading IB account to work?

n2535904 commented 2 years ago

Did you guys resolve this issue? Have you been able to log data?

mit10000 commented 2 years ago

Facing the same problem, anyone can help us out? Thanks!