Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 rdtdale, Today, 01:02 PM
    0 responses
    2 views
    0 likes
    Last Post rdtdale
    by rdtdale
     
    Started by alifarahani, Today, 09:40 AM
    3 responses
    15 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by RookieTrader, Today, 09:37 AM
    4 responses
    18 views
    0 likes
    Last Post RookieTrader  
    Started by PaulMohn, Today, 12:36 PM
    0 responses
    7 views
    0 likes
    Last Post PaulMohn  
    Started by love2code2trade, 04-17-2024, 01:45 PM
    4 responses
    41 views
    0 likes
    Last Post love2code2trade  
    Working...
    X