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

'Unload' a data series

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

    'Unload' a data series

    For performance reasons, I am interested to know if it is possible to 'unload' a data series. For instance, without tick reply, load tick data, get the data points you need from historical data, then dispose of that data series and just add to your data point via OnMarketData, without adding to the data series. Presumably this would be less resource hungry than using a permanent tick series?

    Possible?

    #2
    Hi pjsmith, thanks for your post.

    It's not possible to unload a series dynamically because the series is added in OnStateChanged. While BarsInProgress == 1 (assuming the 1 tick series is the only added series), you can check for if(State == State.Historical) and process the 1 tick series while that is true, then when it is false, return; This will reduce the overhead as much as possible.

    Kind regards.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Thank you. Could I ask you one more question, in the interests of performance optimization? 1 indicator that calculates an EMA from the base formula for 4 ema's with different periods (just as the supplied EMA does), or 4 x the EMA indicator. Any difference at all in resource usage? Worth combining 4 into 1, if I use them on multiple charts (only on barupdate, but if there is anything to be gained, I will do it)

      Thanks.

      Comment


        #4
        Hi pjsmith, thanks for your reply.

        If 4 different EMA's are needed for the calculation then there is a measurable amount of minimum performance needed for that. There's not really any more optimizations you could do if you are using the EMA's in an indicator. Unless you can do the calculation with less EMA's that would be the only way to improve the performance, but you should be fine.
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Than you. Suspected as much, but though thought I would check.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Tim-c, Today, 10:58 AM
          0 responses
          1 view
          0 likes
          Last Post Tim-c
          by Tim-c
           
          Started by traderqz, Yesterday, 09:06 AM
          3 responses
          21 views
          0 likes
          Last Post NinjaTrader_ThomasC  
          Started by f.saeidi, Today, 10:19 AM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by kujista, Today, 06:23 AM
          5 responses
          18 views
          0 likes
          Last Post kujista
          by kujista
           
          Started by traderqz, Today, 12:06 AM
          3 responses
          6 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Working...
          X