SampleMultiInstrument shows how we can access data for a different stock.
But I'd like to access data for a differente future contract.
Suppose I'm running on NQ and I'd like to use ES data on the strategy. What should I do to sync it with MasterInstrument's expiry ?
if (State == State.Configure)
{
AddDataSeries("MNQ SEP24", Data.BarsPeriodType.Minute, 1, Data.MarketDataType.Last);
AddDataSeries("MES SEP24", Data.BarsPeriodType.Minute, 1, Data.MarketDataType.Last);
}
Ideally, I'd like to extract the expiry for the MasterInstrument and apply it for the DataSeries needed.
Best regards,

Comment