• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 aslane, Today, 01:29 PM
      1 response
      9 views
      0 likes
      Last Post aslane
      by aslane
       
      Started by itrader46, Today, 01:09 PM
      0 responses
      5 views
      0 likes
      Last Post itrader46  
      Started by elnoppo, Today, 12:38 PM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_Kate  
      Started by TradingRocks, Today, 11:44 AM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by Brillo, Today, 11:39 AM
      2 responses
      11 views
      0 likes
      Last Post Brillo
      by Brillo
       
      Working...
      X