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

IDataSeries for a custom struct or array

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

    IDataSeries for a custom struct or array

    Hi!

    How can I use an IDataSeries for a custom struct or array? I try to create an indicator that will hold a lot off different "bar properties" for each bar in a BarsSeries. Insted of creating a lot of separate DataSeries, one for each property, I would like to add all bar properties to a custom struct or array an then add the struct/array to an IDataSeries. How can this be done so that I can use the methods associated with an IDataSeries? Besides a cleaner code I suppose that this solution would be computitional more efficient.

    Is there a documentation for the IDataSeries class that I can study? Is it based on the ArrayList Class (since the name space System.Collection.Genereric isn't used) ?

    Another option would of course be to use the c# List(T) Class with a custom struct. But how do I make sure that the List(T) always is synced to the BarsSeries like one sync the IDataSeries in the Initalize() section?

    Any other suggestions or thoughts concering how to create and use a "StructSeries" or an "ArraySeries"?

    /Regards
    Last edited by poseidon_sthlm; 07-10-2010, 05:21 PM.

    #2
    Hello Poseidon_sthlm,

    Unfortunately this is more C# related than NinjaScript so we are unable to offer support. Hopefully you can receive input from our community members and can get started using the links below.

    Documentation for DataSeries class.

    IDataSeries
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      I would appreciate some more guidance on this subject. How would the sync issue be handeld for instance? The c# code for the NT IDataSeries and DataSeries Class would help.

      /Regards

      Comment


        #4
        End users can not create objects of the interface type IDataSeries, and hence can not reuse the existing infrastructure of functions which support IDataSeries type.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by bortz, 11-06-2023, 08:04 AM
        47 responses
        1,603 views
        0 likes
        Last Post aligator  
        Started by jaybedreamin, Today, 05:56 PM
        0 responses
        8 views
        0 likes
        Last Post jaybedreamin  
        Started by DJ888, 04-16-2024, 06:09 PM
        6 responses
        18 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by Jon17, Today, 04:33 PM
        0 responses
        4 views
        0 likes
        Last Post Jon17
        by Jon17
         
        Started by Javierw.ok, Today, 04:12 PM
        0 responses
        12 views
        0 likes
        Last Post Javierw.ok  
        Working...
        X