Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

dynamically change traded instrument list

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

    dynamically change traded instrument list

    Hello. I developed a strategy that applies to all stocks in Russell 3000 Index. However, on a particular day, only a small number of stocks are traded. The stock symbols traded on a particular day are pre-determined and can be imported daily from a file. In the Initialize() method, do I need to add all 3000 stocks, or is there a way to only add the stocks traded for a particular day and change that list dynamically? Thank you for your help!

    #2
    Hi Tony, welcome to our forums here - unfortunately dynamically adding symbols would not be something we can support - it's on our list for future consideration though (I've added a vote into this tracking item on your behalf). So one way would be adding in all stocks and then drive logic dynamically per your file for the day, or to amend the Initialize() as needed on changes, but this would mean code changes as well, as the # of instruments that would be traded each day (as I understand) could vary.

    Comment


      #3
      Hi Bertrand. Thank you for your reply. You mentioned that I can amend the Initialize() method as needed to change the traded instrument list. My understanding is that this approach only works for live trading, where I can program to add the instruments traded for the given trading day. How do I do it for backtesting over multiple days? My understanding is that the Initialize() method only runs once when the backtest is started, therefore the instrument list cannot change over the backtest period. Is that correct? Thanks.

      Comment


        #4
        Hi Tony, yes that understanding is unfortunately correct - in the backtest you could not recall Initialize() to add another selection in on a per day basis. So here you would add in all you need and process logic as desired per BarsInProgress then.

        Comment


          #5
          Bertrand, I'm assuming this functionality that tonyz wants to do is not implemented yet. If that's correct, could you add a vote on my behalf with development? I'd like to do similar stuff to what tonyz's talking about. Thanks!

          Comment


            #6
            Hello upshot,

            Thanks for your reply.

            This would have to be coded into the BarsInProgress, it would not be possible to call Initialize() like this.
            Last edited by NinjaTrader_Brandon; 03-27-2014, 02:56 PM.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            648 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            369 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            108 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            572 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            574 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X