- clone source
git clone https://vnpy/vnpy.git
cd vnpy
- create venv
python3 -m venv venv
source venv/bin/active
- install ta-lib
wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
tar -xzf ta-lib-0.4.0-src.tar.gz
cd ta-lib
./configure --prefix=/usr
make
sudo make install
- build & install vnpy
python setup.py install
- run
create file run.py (same example/vn_trader/run.py but comment some codes)
# flake8: noqa
from vnpy.event import EventEngine
from vnpy.trader.engine import MainEngine
from vnpy.trader.ui import MainWindow, create_qapp
from vnpy.app.portfolio_strategy import PortfolioStrategyApp
def main():
""""""
qapp = create_qapp()
event_engine = EventEngine()
main_engine = MainEngine(event_engine)
main_engine.add_app(PortfolioStrategyApp)
main_window = MainWindow(main_engine, event_engine)
main_window.showMaximized()
qapp.exec()
if __name__ == "__main__":
main()
python run.py
NOTE: must run in Linux with GUI