Hello,

I’m experiencing some issues with chart display in my algorithm.

The equity chart sometimes shows candles that appear compressed or incorrect.

And my “SPY Price” chart does not reflect the correct timeframe. I would like to force a specific timeframe, for example Minute, even if the symbol is added with an Hour resolution.

Additionally, there are gaps in the quotes/data.

Could this be due to an error in my code or configuration? Any guidance on how to properly enforce the desired timeframe and fix the chart display would be greatly appreciated.

Thank you!

from AlgorithmImports import *

class DeterminedSkyBlueJaguar(QCAlgorithm):

    def initialize(self):
        self.set_start_date(2025, 1, 1)
        self.set_end_date(2025, 2, 1)
        self.set_cash(100000)

        self.SPY = self.add_equity("SPY", Resolution.HOUR).symbol

        chart = Chart("SPY Price")
        chart.add_series(Series("SPY OHLC", SeriesType.CANDLE, 0))
        self.add_chart(chart)

    def on_data(self, data: Slice):
        if not self.portfolio.invested:
            self.set_holdings(self.SPY, 0.33)

        if data.contains_key(self.SPY):
            bar = data[self.SPY]
            self.plot("SPY Price", "SPY OHLC", bar.close)
audric_1764979406.jpg