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

Access Trading Hour Template via code

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

    Access Trading Hour Template via code

    Hi!

    I want my secondary bar series to always choose the same Trading Hour Template as chosen in the Strategy Analyzer via code.

    I have the following code:
    AddDataSeries(Instrument.MasterInstrument.Name, new BarsPeriod { BarsPeriodType = BarsPeriodType.Minute, Value = 1440 }, Instrument.MasterInstrument.TradingHours.Name);

    The problem is, "Instrument.MasterInstrument.TradingHours.Name " only adds the Trading Hours Template of the default instrument trading hour template. If I choose another Trading Hour Template in the Strategy Analyzer, the secondary bar series still uses the default instrument trading hour template. How can I solve this?

    Thanks!

    Kirk

    #2
    Hello Kirk,

    Unfortunately, I'm not seeing that this would be possible if a different instrument name is specified. If the instrument is the same, the TradingHours will also be the same.

    I will submit a feature request on your behalf for the developers to consider this.
    Once I have a tracking ID for this request I will post in this thread for future reference.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello Kirk,

      This request for 'Ability to add a series using the trading hours template of the primary series' is being tracked with ID# SFT-5234.

      Please note, we receive many requests and cannot reasonably implement all requested features or changes. Interest is tracked internally and if enough interest is tracked, it would be weighed against how feasible it would be to make those changes to consider implementing, so we cannot offer an ETA or promise of fulfillment.

      When new features are implemented, they will be listed in the Release Notes page of the Help Guide. The ID number may be different than the internal feature request tracking ID, but the description of the feature will let you know if that feature has been implemented.

      Release Notes - https://ninjatrader.com/support/help...ease_notes.htm
      Chelsea B.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by bortz, 11-06-2023, 08:04 AM
      47 responses
      1,610 views
      0 likes
      Last Post aligator  
      Started by jaybedreamin, Today, 05:56 PM
      0 responses
      9 views
      0 likes
      Last Post jaybedreamin  
      Started by DJ888, 04-16-2024, 06:09 PM
      6 responses
      19 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by Jon17, Today, 04:33 PM
      0 responses
      6 views
      0 likes
      Last Post Jon17
      by Jon17
       
      Started by Javierw.ok, Today, 04:12 PM
      0 responses
      16 views
      0 likes
      Last Post Javierw.ok  
      Working...
      X