I have read this, this, this, and other posts. It's not clear yet how I can create a candlestick chart based on the daily OHLC values and colour each candle according to some rules. (I don't want to run on a minute/hour resolution in order to build the chart.). My goal is create a chart that looks like this: https://www.tradingview.com/x/xgeqDHzM.
Secondary problem: Whenever I tried using a smaller resolution, I'd get a weird error: ‘NoneType’ object has no attribute Close.
Should I be approaching this differently? Maybe I shouldn't be trying to use QuantConnect's charting functionality and should, instead, be using matplotlib? If so, maybe I should be moving my work over to a Notebook instead?
Mak K
Hey Jason,
what exactly do you want to use the plotting for? Because the answer to your question will differ based on that.
Thanks!
Jason Annable
Ya, good question. The rules that dictate what colour the candles are is a component of a strategy. I don't need to plot in order to execute the strategy, obviously. However, it's handy to see the buy/sell signals on the chart alongside the coloured candles so that I can easily inspect what it did and why.
Mak K
Hm I see, there are currently many issues with plotting candlestick charts in QC, especially in lower resolution and I am not aware that you can customize it easily either. If all you need the plotting for is visualizing to inspect it, then I would suggest plotting it in the research environment and using something like mplfinance or matplotlib, which will also give you much more control over the plotting,
thanks!
Fred Painchaud
Plotly is also an additional option, https://plotly.com/python/candlestick-charts/.
Fred
Jason Annable
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!