arleigh418 / python-and-Taiwan-stock-market

Python 金融市場賺大錢聖經:寫出你的專屬指標
54 stars 17 forks source link

mpl_finance過時? #3

Open wst0310 opened 2 years ago

wst0310 commented 2 years ago

每次執行K線圖, 皆會出現:

WARNING: mpl_finance is deprecated:

Please use `mplfinance` instead (no hyphen, no underscore).

To install: `pip install --upgrade mplfinance`

For more information, see: https://pypi.org/project/mplfinance/

=================================================================

__warnings.warn('\n\n ================================================================='+ 但改用mplfinance則會報錯, 無candlestick2_ochl方法。

arleigh418 commented 2 years ago

Hi,原則上如果不影響功能與結果,通常我們會選擇無視Warning。 當然如果您真的很擔心,如您所說mpl_finance的維護者似乎將重心轉而放在mplfinance上。 而mplfinance沒有candlestick2_ochl()方法,據我所知是: mplfinance.plot(data,type='candle')

供參考,看各人選擇囉,我因為比較懶所以至今仍然在使用mpl_finance,使用多年了。當然使用官方重心維護的mplfinance也是一個很好的選擇。