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.
    Emily C.NinjaTrader Customer Service

    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 wobmon, Today, 11:56 AM
        8 responses
        32 views
        0 likes
        Last Post rockmanx00  
        Started by defa0009, 12-13-2024, 09:19 AM
        22 responses
        238 views
        1 like
        Last Post defa0009  
        Started by Parmenides48, Today, 06:03 PM
        0 responses
        5 views
        0 likes
        Last Post Parmenides48  
        Started by sclay115, 02-10-2025, 03:58 PM
        5 responses
        24 views
        0 likes
        Last Post rockmanx00  
        Started by sclay115, Today, 02:14 PM
        1 response
        11 views
        0 likes
        Last Post rockmanx00  
        Working...
        X