I am trying to plot an asset from 8/15/21 to the present date - but the last date I see on the chart is Dec 22, 2021 (instead of the current date).
Here is the code:
class VirtualFluorescentYellowJackal(QCAlgorithm):
def Initialize(self):
self.SetStartDate(2021, 8, 15) # Set Start Date
self.SetEndDate(2022, 2, 16) # Set End Date
self.SetCash(100000) # Set Strategy Cash
self.tqqq = self.AddEquity("TQQQ", Resolution.Hour)
# create 21 day EMA of TQQQ
self.ema = self.EMA("TQQQ", 21 * 8, Resolution.Hour);
self.SetWarmUp(21)
# Defaults to Equity market
self.SetBenchmark("TQQQ")
def OnData(self, data):
if self.IsWarmingUp:
return
self.Plot("Data Chart", "Asset Price", self.Securities["TQQQ"].Open)
self.Plot("Data Chart", "EMA", self.ema.Current.Value)
And here is the chart which ends on Dec 22, 2021 instead of today:
Why isn't the chart plotting extend to the current day?
Fred Painchaud
Hi Etay,
If I recall correctly, there is a limit of 10 000 points that you can plot on a chart, per series I believe. I'm not sure of the exact limits but I know there are limits.
I did not do the calculations re how many points those hourly prices represent but a quick test you could do to test that hypothesis is change your resolution from hours to days. If you get a chart up to the current date with that, you have your answer.
Fred
Etay Luz
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!