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

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 ETFVoyageur, Today, 07:55 PM
        0 responses
        4 views
        0 likes
        Last Post ETFVoyageur  
        Started by janio973, Today, 07:24 PM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by aligator, 01-06-2022, 12:14 PM
        4 responses
        242 views
        0 likes
        Last Post john_44573  
        Started by reynoldsn, Today, 05:56 PM
        0 responses
        12 views
        0 likes
        Last Post reynoldsn  
        Started by bortz, 11-06-2023, 08:04 AM
        51 responses
        1,996 views
        0 likes
        Last Post aligator  
        Working...
        X