Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Request: Virtual Series<T> methods

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

    Request: Virtual Series<T> methods

    Please make the get/set methods (indexers) of Series<T> virtual or provide a way to make the value lazy for descendants. I would like to override these to enable lazy calculations.

    For example, if I have a series where the calculation of the value is expensive and not all indicators/strategies would use it or use all values, it should not calculate.

    Code:
     public class MySeries : Series<MyEnum>
     {
         public override MyEnum this[int ago]
         {
             get
             {
                 if (!IsValidDataPoint(ago))
                     this[ago] = ExpensiveCalculation(ago);
      
                 return base[ago];
             }
             set { base[ago] = value; }
         }
     }

    #2
    Hello wbennettjr,

    Thank-you for your post and contributions to improving our product.

    I have submitted a feature request to the development team.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thanks a lot Paul. No prob.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Orion815, 05-02-2024, 08:39 AM
      2 responses
      15 views
      0 likes
      Last Post Orion815  
      Started by suroot, 02-25-2017, 04:43 AM
      11 responses
      2,548 views
      0 likes
      Last Post Zilvercat  
      Started by Rogers101, 05-05-2024, 11:30 AM
      16 responses
      50 views
      0 likes
      Last Post Rogers101  
      Started by ninza33, Today, 12:31 PM
      2 responses
      10 views
      0 likes
      Last Post ninza33
      by ninza33
       
      Started by Bobin, 03-12-2024, 08:51 AM
      15 responses
      482 views
      0 likes
      Last Post fiddich
      by fiddich
       
      Working...
      X