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

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:	78
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.
    Emily C.NinjaTrader Customer Service

    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 Graci117, Today, 09:02 PM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by ETFVoyageur, Today, 07:55 PM
      0 responses
      7 views
      0 likes
      Last Post ETFVoyageur  
      Started by janio973, Today, 07:24 PM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by aligator, 01-06-2022, 12:14 PM
      4 responses
      247 views
      0 likes
      Last Post john_44573  
      Started by reynoldsn, Today, 05:56 PM
      0 responses
      14 views
      0 likes
      Last Post reynoldsn  
      Working...
      X