Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Collection of Custom Series<T> objects?

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

    Collection of Custom Series<T> objects?

    When you add a Plot to an indicator or strategy an entry is added to the Values collection.

    When adding a custom Series<T> object within an indicator or strategy, is that Series<T> object added to an accessible collection, similar to the Values collection?

    I'd like to be able to programmatically iterate through the collection of custom Series<T> objects and access any element of any Series<T> with in it.

    #2
    Hello volIQ,

    Thank you for your post.

    Custom Series<T> objects are not automatically added to a collection; only Series<double> objects associated with plots added via AddPlot() are added to the Values collection. You could consider adding your custom Series<T> objects to a collection, such as a list or dictionary, so that they could be iterated through as desired. Adding items to a collection (like a list or dictionary) is a general C# concept and not specific to NinjaTrader. You should be able to find more information about these items through publicly available resources, like from a Google search.

    Please let us know if we may be of further assistance.

    Comment


      #3
      No, but you could make it so - just add them to a collection of your own. Remember, though, these Series<T> have some considerable overhead. If you have so many you need a structure to keep track of them, you may want to spend some time rethinking your design.
      Bruce DeVault
      QuantKey Trading Vendor Services
      NinjaTrader Ecosystem Vendor - QuantKey

      Comment


        #4
        Thanks Bruce and Emily.

        private LIst<Series<double> myListOfSeries;

        Seems to work well! ​

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        597 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        343 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        556 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        555 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X