Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple Series and Futures Expiration

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Multiple Series and Futures Expiration

    I want to add a secondary series NQ futures.

    AddDataSeries("NQ 12-20", Data.BarsPeriodType.Tick, 1, Data.MarketDataType.Last);

    Is there a way to not have to update the symbol expiration in code when the symbol rolls over?

    Can I create a user input variable for the secondary data series?
    If so what would that look like... just put the variable in place of "NQ 12-20" or would I have to convert it to a string?


    #2
    Hello sdauteuil, thanks for writing in.

    We generally recommend using the hardcoded string literal in AddDataSeris to avoid issues while running the strategy in the Strategy Analyzer, but you can do this:

    AddDataSeries(Instrument.FullName, Data.BarsPeriodType.Tick, 1, Data.MarketDataType.Last);

    Please let me know if this does not resolve your inquiry.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    79 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    40 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    63 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    63 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    54 views
    0 likes
    Last Post CarlTrading  
    Working...
    X