Announcement

Collapse
No announcement yet.

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.

    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.

        Comment


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

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          580 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          336 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          554 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          552 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X