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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    88 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    134 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    118 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    67 views
    0 likes
    Last Post PaulMohn  
    Working...
    X