matplotlib / mplfinance

Financial Markets Data Visualization using Matplotlib
https://pypi.org/project/mplfinance/
Other
3.61k stars 624 forks source link

Custom Candlestick Timeframe #675

Closed pije76 closed 3 months ago

pije76 commented 4 months ago

Can I create my own custom candlestick by using mplfinance? I want to create custom candlestick chart by using the data from lower timeframe (example: Hourly or Daily) and then create my custom Weekly or Monthly chart based on the specified date-frame from user input, example: from 15 May to 20 May (6 calendar days).

DanielGoldfarb commented 4 months ago

@pije76 - Yes, you can do this. But you do this with Pandas. Mplfinance simply plots candlesticks the OHLCV data that you pass in, whether the candles are every 15 minutes, or hourly, or daily, weekly, etc.

You can change the frequency of your candles using Pandas DataFrame resample functionality. See the following links for further details:

pije76 commented 3 months ago

@pije76 - Yes, you can do this. But you do this with Pandas. Mplfinance simply plots candlesticks the OHLCV data that you pass in, whether the candles are every 15 minutes, or hourly, or daily, weekly, etc.

You can change the frequency of your candles using Pandas DataFrame resample functionality. See the following links for further details:

Thank you so much for the information @DanielGoldfarb I will try it.