Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How do I select a list of stocks for the strategy

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

    How do I select a list of stocks for the strategy

    I have the same need on NT8. I created a custom strategy. The action is to fire alerts. How do I select a list of stocks for the strategy? I see there's "Additional Data" section. Is it for this purpose? But I cannot add a list of stocks, for instance SP 500 all at once. Instead, I have to add one by one. Please help, thanks!
    Attached Files

    #2
    Hello tamago168,

    As this is NinjaTrader 8 related and not NinjaTrader 7, this has been moved to the NinjaTrader 8 section of the forums.

    Further, this also does not relate to running a strategy in the strategy analyzer on a list of instruments.

    Adding a list of instruments with AddDataSeries() would not be supported, as using variables to add series dynamically is not supported.

    From the help guide.
    "Arguments supplied to AddDataSeries() should be hardcoded and NOT dependent on run-time variables which cannot be reliably obtained during State.Configure (e.g., Instrument, Bars, or user input). Attempting to add a data series dynamically is NOT guaranteed and therefore should be avoided. Trying to load bars dynamically may result in an error similar to: Unable to load bars series. Your NinjaScript may be trying to use an additional data series dynamically in an unsupported manner."


    That said, it is possible to get an instrument list of instruments. However, this cannot be used with AddDataSeries().
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    90 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    137 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
    120 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    71 views
    0 likes
    Last Post PaulMohn  
    Working...
    X