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, 05-11-2026, 05:56 AM
    0 responses
    61 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    34 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    198 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    364 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    283 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X