Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Constructor Series(Bars) is obsolete

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

    Constructor Series(Bars) is obsolete

    when instantiating a Series<> object to store data from a secondary series, I get a deprecation warning:


    Click image for larger version

Name:	image.png
Views:	129
Size:	43.5 KB
ID:	1252652
    What is the correct way to instantiate this class?

    #2
    Hello kevinenergy,

    Thank you for your inquiry.

    Series<T>(bars) is a valid constructor for creating a series. This is listed on the following help guide page:


    There are many warnings that come from the NinjaTrader.Custom project. Using Visual Studio can even result in additional warnings that do not show up in the NinjaScript Editor. The warning you have mentioned may be safely ignored. The particular constructor in the warning may be marked as obsolete because typically the MaximumBarsLookBack would be set in the UI rather than controlling it from the constructor.

    Please let us know if we may be of further assistance.

    Comment


      #3
      Originally posted by NinjaTrader_Emily View Post
      Hello kevinenergy,

      Thank you for your inquiry.

      Series<T>(bars) is a valid constructor for creating a series. This is listed on the following help guide page:
      https://ninjatrader.com/support/help...t8/seriest.htm

      There are many warnings that come from the NinjaTrader.Custom project. Using Visual Studio can even result in additional warnings that do not show up in the NinjaScript Editor. The warning you have mentioned may be safely ignored. The particular constructor in the warning may be marked as obsolete because typically the MaximumBarsLookBack would be set in the UI rather than controlling it from the constructor.

      Please let us know if we may be of further assistance.
      NinjaTrader_Emily If you're not planning to remove the constructor, it should not be marked as deprecated. Using the deprecated tag in the way you have described (because you anticipate that usually, the user will set it from the UI) is inappropriate and not what the deprecated tag is for.

      The deprecated tag is to clearly articulate that the feature will be removed in a near-term future release and you have just stated that is not the case so unless there is some misunderstanding, that tag does not belong there.

      It seems probable that NT has simply turned off deprecated tags from showing at all in the NinjaScript Editor.
      Bruce DeVault
      QuantKey Trading Vendor Services
      NinjaTrader Ecosystem Vendor - QuantKey

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      605 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      351 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      105 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      560 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      561 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X