예제 #1
0
win.setLayout(layout)
win.resize(600, 500)

combo = QComboBox()
combo.setEditable(True)
[
    combo.addItem(i) for i in
    'AMRK FB GFN REVG TSLA TWTR WMT CT=F GC=F ^FTSE ^N225 EURUSD=X ETH-USD'.
    split()
]
layout.addWidget(combo, 0, 0, 1, 1)
info = QLabel()
layout.addWidget(info, 0, 1, 1, 1)

ax = fplt.create_plot_widget(win, init_zoom_periods=100)
win.axs = [ax]  # finplot requres this property
layout.addWidget(ax.ax_widget, 1, 0, 1, 2)


@lru_cache(maxsize=15)
def download(symbol):
    return yf.download(symbol, '2019-01-01')


@lru_cache(maxsize=100)
def get_name(symbol):
    return yf.Ticker(symbol).info['shortName']


plots = []
예제 #2
0
app = QApplication([])
win = QGraphicsView()
win.setWindowTitle('Quantl AI Technical Analysis')
layout = QGridLayout()
win.setLayout(layout)
win.resize(600, 500)

combo = QComboBox()
combo.setEditable(True)
[combo.addItem(i) for i in 'AAPL SHOP ZI'.split()]
layout.addWidget(combo, 0, 0, 1, 1)
info = QLabel()
layout.addWidget(info, 0, 1, 1, 1)

ax = qplt.create_plot(init_zoom_periods=100)
win.axs = [ax]  # quantlplot requres this property
axo = ax.overlay()
layout.addWidget(ax.vb.win, 1, 0, 1, 2)


@lru_cache(maxsize=15)
def download(symbol):
    return read_mongo('POLYGON_STOCKS_EOD', symbol)


#@lru_cache(maxsize=100)
def get_name(symbol):
    return read_mongo('POLYGON_STOCKS_EOD', symbol)


plots = []