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

Manipulating DataSeries

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

    Manipulating DataSeries

    To reference, I'm creating my own solution to the previous topic: https://ninjatrader.com/support/foru...u-usage-on-nt8

    I've figured out a way to do so and I'm looking for an elegant solution. Currently I have an ugly solution by using an indicator to overlay an approximate copy of the bars type I wish to add to the chart. I'm then taking the output(HLCOV) of that and outputting the data series. However, because a data series fills in 0's or NaN's when not set my data series is inaccurate(or extremely slow to iterate through) because I have far more useless data than I need. Because of this, I'm taking in the indicator values and storing them in an ever growing array which eventually eats up memory. Before I start implementing even more messy code to fix that, I have a question

    Core question:
    Is there a way to remove a bar from a data series, or only add to it when I wish?

    #2
    Just to clarify what I'm looking for. Simply; When my primary data series or BarsArray is at 256, I'd like my secondary data series to be at something like ~25-30, depending on its use case.

    Comment


      #3
      Hello RaddiFX,

      Thanks for your post.

      The only supported way to be able to remove a bar would be from the BarsType with RemoveLastBar. There would not be a way to remove bars at an indicator/strategy/other NinjaScript level.

      You would have to make your own array's/collections if you wanted to have a secondary "series" that is not synchronized to bars.
      JimNinjaTrader Customer Service

      Comment


        #4
        Okay, Thanks.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by ageeholdings, Today, 07:43 AM
        0 responses
        11 views
        0 likes
        Last Post ageeholdings  
        Started by pibrew, Today, 06:37 AM
        0 responses
        4 views
        0 likes
        Last Post pibrew
        by pibrew
         
        Started by rbeckmann05, Yesterday, 06:48 PM
        1 response
        14 views
        0 likes
        Last Post bltdavid  
        Started by llanqui, Today, 03:53 AM
        0 responses
        9 views
        0 likes
        Last Post llanqui
        by llanqui
         
        Started by burtoninlondon, Today, 12:38 AM
        0 responses
        12 views
        0 likes
        Last Post burtoninlondon  
        Working...
        X