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 NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    64 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    139 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