Skip to content

Latest commit

 

History

History
69 lines (47 loc) · 1.07 KB

vnpy linux.md

File metadata and controls

69 lines (47 loc) · 1.07 KB
  1. clone source
git clone https://vnpy/vnpy.git
cd vnpy
  1. create venv
python3 -m venv venv
source venv/bin/active
  1. 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
  1. build & install vnpy
python setup.py install
  1. 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