mpl_finance cannot convert -100000 to a date

后端 未结 1 1411
一个人的身影
一个人的身影 2021-01-27 16:24

I am trying to make a simple candlestick ohlc chart with mpl_finance. On their website, it says that the first element in the quotes argument of the candlestick_ohlc method is t

相关标签:
1条回答
  • 2021-01-27 17:22

    The format of the input to candlestick_ohlc needs to be a list of (datetime, open, high, ...) tuples, or the respective numpy array.
    Here you are providing a list of [[datetime1, datetime2, ...], [open1, open2, ...], ...] instead.

    To convert to the required format, you may e.g. use

    ohlc = list(zip(formatteddates, dailyopen, dailyhigh, dailylow, dailyclose))
    
    0 讨论(0)
提交回复
热议问题