Comments (3)
@datatalking I wrote my own blotter.py
script but its essentially the same as the examples file.
Blotter defaults to using Interactive Broker's TWS/Gateway so you'll need that up and running first. I also believe it may require MySQL be running locally.
The Blotter
class has the following arguments and default values (I just copy pasted these below from the library's code).
I include this list so that you can make sure your IBKR TWS/Gateway is available on the expected Port and expected Client ID (you just have to make these values match between the API Settings in TWS and the Python code).
# Arguments you can include when instantiating `Blotter()` to make it work with TWS.
bport=4001,
ibclient=999,
ibserver="localhost",
# Arguments you can include when instantiating `Blotter()` to make it work with MySQL
dbhost="localhost",
dbport="3306",
dbname="qtpy",
dbuser="root",
dbpass="",
And just for reference, here is the most basic version of blotter.py with some of the details I listed above explicitly added. Once everything is running, just run python blotter.py
. If you run into errors related to IBKR connection or MySQL, double check those other pieces of software are configured as expected.
# blotter.py
from qtpylib.blotter import Blotter
class MainBlotter(Blotter):
pass # we just need the name
if __name__ == "__main__":
blotter = MainBlotter(
bport=4001,
ibclient=999,
ibserver="localhost",
dbhost="localhost",
dbport="3306",
dbname="qtpy",
dbuser="root",
dbpass="",
)
blotter.run()
from qtpylib.
Hi @thesupershan, I too ran into this issue recently when trying to install via pip. My suggested solution, which it sounds like you have stumbled upon, is cloning and installing locally via python setup.py install
. Feels safe to assume there may not be a fix pushed for this so you'll have to find a more permanent workaround in your own workflow. The maintainer is busy building other great software for us :).
More Info About the Error:
The pip installation error seems to be an existing issue that must be worked around. The cause is due to an unexpected value for the package_data
in setup.py
. The below thread includes individuals discussing it a bit more detail if curious.
from qtpylib.
@htpeter Once you did that. Instruction #1 says to create blotter.py.
The blotter script is the same one located in qtpylib/examples/blotter.py
Did you just cd examples
then run blotter from there?
from qtpylib.
Related Issues (20)
- [BUG] TypeError: unsupported operand type(s) for -: 'float' and 'str'
- [BUG] Find available cash and account value inside strategy. HOT 1
- Ujhj
- Dependabot couldn't authenticate with https://pypi.python.org/simple/
- [BUG] pip install error (different than issue #141) HOT 1
- How can I add an FX broker using MT4/5 platform?
- ATR differences with TradingView
- How to backtest options strategy? How to add options data to MySQL database from csv?
- How to "first cross"
- Documentation down HOT 1
- [BUG] HOT 1
- http://www.qtpylib.io/ not accessible - documentation offline ? [BUG] HOT 1
- Order book logging and back testing
- Increase the usage of augmented assignment statements
- Arguments Helps
- Fatal Errors during installation (after preparing isolated conda environment for pip installation) [BUG] HOT 2
- [BUG] No module named 'Queue' in ibpy2 dependency HOT 2
- [BUG] error: invalid path 'Icon?'
- [BUG] module 'pandas' has no attribute 'ewma'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qtpylib.