Hi QuantConnect Community,

I am designing an intraday algorithm to trade the E-mini S&P 500 futures contract based on signals derived from the VIX index and a simple moving average (SMA) of the E-mini S&P 500's price. Here's a brief overview of my strategy:

  1. Calculation of Expected Move:
    • I use the prior day's close of the VIX index to calculate the daily expected move of the E-mini S&P 500 futures contract.
  2. Creation of Bands:
    • I create upper and lower bands for the current trading day using the prior day's closing price of the VIX and the prior day's close of the E-mini S&P 500 futures.
  3. Trade Signals:
    • A trade signal is generated when the current price on the 5-minute time frame closes above the 20-period SMA within the lower band.

However, I am encountering a runtime error: 'NoneType' object has no attribute 'Close'.

Could anyone help me identify and fix the issue causing this runtime error? I'm new to QuantConnect and any guidance would be greatly appreciated!

Thank you in advance!