0
Ich versuche die 30-minütige Candlebar mit Candlestick_ohlc in Python zu plotten. Aber es hat versagt und ein seltsames Bild zurückgegeben.Fehler beim Plotten der 30-minütigen Candlebar mit Candlestick_ohlc in Python
ha_bar ist eine Liste mit Zeit, offen, hoch, niedrig und nah.
ha_bar=[(736389.41666666663, 24.317, 25.109, 24.317, 24.29975),
(736389.4375, 24.308374999999998, 25.529, 25.027750000000001,
25.027750000000001), (736389.45833333337, 24.668062499999998, 25.977,
25.543499999999998, 25.543499999999998), (736389.47847222222, 25.10578125,
25.898, 25.541249999999998, 25.541249999999998), (736389.5625,
25.323515624999999, 25.818000000000001, 25.454000000000001,
25.454000000000001)]
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.finance as mpf
import matplotlib.ticker as ticker
from matplotlib.dates import DateFormatter
fig, ax = plt.subplots()
ax.xaxis.set_major_formatter(DateFormatter('%y-%m-%d %H:%M:%S'))
mpf.candlestick_ohlc(ax, ha_bar,width=0.6)
fig.autofmt_xdate()
plt.show()
wie die 30 Minuten candlebar plotten?