Relative Content

Tag Archive for pythonmatplotlibmplfinance

How to add threshold lines to a secondary panel of a mplfinace plot?

I have a custom indicator that I display in a secondary plot in an mplfinance plot. The plot uses a y axis ranging from 100 to -100. Points on the indicator above 20 and below -20 are significant, so I want to plot threshold lines for +20 and -20 on the same plot using the same y axis as the indicator. When I plot these lines they have their own y axis (shown on the right of the plot) ranging from 20 to -20. How can I get them to use the indicator’s y axis?

MPL Finance sub plots not coloring background

I have the following code that is intended to look at the “delta” values and where they are negative the relevant subplot background color should either become red or green:

how do i make my own live candlestick chart with python?

Im trying to create a live candlestick chart that gets the price from just scraping the live gold price from a website. I’m not sure but i think that is the only way of getting live forex data without paying. I was thinking about updating a candle with the scraped data for 15 minutes and then close that candle and create a new candle so it works like TradingView. Is it possible to create something like that using matplotlib and are there any recommendations for creating something like that?