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 futurenow, 12-06-2021, 05:49 PM
        18 responses
        880 views
        0 likes
        Last Post dj0ntz
        by dj0ntz
         
        Started by nailz420, 05-14-2025, 09:14 AM
        1 response
        120 views
        0 likes
        Last Post NinjaTrader_ChristopherJ  
        Started by NinjaTrader_Brett, 05-12-2025, 03:19 PM
        0 responses
        528 views
        1 like
        Last Post NinjaTrader_Brett  
        Started by domjabs, 05-12-2025, 01:55 PM
        2 responses
        85 views
        0 likes
        Last Post domjabs
        by domjabs
         
        Started by Morning Cup Of Trades, 05-12-2025, 11:50 AM
        1 response
        126 views
        0 likes
        Last Post NinjaTrader_ChristopherJ  
        Working...
        X