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 NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    62 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    134 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    75 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X