So I'm getting a bit of an issue, I have code setup for SetContract that works well with my ES futures but when I try to add the VIX futures I get an error:
 

Runtime Error: The string must be splittable on space into two parts. in SecurityIdentifier.cs:line 719 

  1. in Initialize:
  2. vix = AddFuture(Futures.Indices.VIX,
  3. fillDataForward: true,
  4. resolution: Resolution.Daily,
  5. dataNormalizationMode: DataNormalizationMode.Raw,
  6. extendedMarketHours: true,
  7. dataMappingMode: DataMappingMode.OpenInterest,
  8. contractDepthOffset: 0);

My other futures are ES with a second resolution at this moment with the same settings otherwise.

At the beginning of OnData I call Set Contract which has the following in it (right below where I have my other contract swap but without any other logic).

  1. vixcurrent = Securities[vix.Mapped];
  2. vixcurrent_symbol = vixcurrent.Symbol;

And then at the end of Ondata I have:

  1. Previous_vix = vixcurrent;

I don't have anything else interacting with VIX yet as I'm trying to just get the algo to run with a second subscription and this is farther than I've gotten before but can't get around it. 

Author

Echoes McCarthur

December 2022