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
in Initialize:
vix = AddFuture(Futures.Indices.VIX,
fillDataForward: true,
resolution: Resolution.Daily,
dataNormalizationMode: DataNormalizationMode.Raw,
extendedMarketHours: true,
dataMappingMode: DataMappingMode.OpenInterest,
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).
vixcurrent = Securities[vix.Mapped];
vixcurrent_symbol = vixcurrent.Symbol;
And then at the end of Ondata I have:
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.
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!