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

Need method to set interval programmatically

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

    Need method to set interval programmatically

    There needs to be a simple method to change the chart interval programmatically, for example by passing a BarPeriod object. Using SendKeys generally does not work per (https://ninjatrader.com/support/foru...ad.php?t=81953), and even if that did work, it does not provide a means to set a custom interval.

    This is a feature that has been asked for numerous times since NT7, and should be easy to add since the interval selector obviously already handles the change, and just needs to be properly exposed to us with a BarPeriod input.

    #2
    Hello aslane,

    Thanks for your inquiry.

    The feature request ticket ID is SFT-1085. It has not yet been fulfilled, so I will submit a vote on your behalf for a supported way to programmatically change a chart's instrument/interval.

    Upon fulfillment feature requests will be noted in the help guide when a release of NinjaTrader contains the implementation. Release notes can be found here: https://ninjatrader.com/support/help...ease_notes.htm

    In the meantime, you may wish to investigate Chelsea's RolloverIndications indicator to experiment with a way to do this through unsupported code. The button press to rollover starts at line 138.

    His script can be found here: https://ninjatrader.com/support/foru...atid=7&lpage=1

    Please let us know if we can be of further assistance.
    JimNinjaTrader Customer Service

    Comment


      #3
      Thank you, that code reference is very helpful.

      Also, while it is not documented, it seems that setting the Interval on the IntervalSelector to any period value seems to work (including custom bar types). Not sure if there are any unknown side affects, but so far seems to work. YMMV. If that was properly tested/documented that would meet the requirements for setting the interval.

      Comment


        #4
        Please add my vote for this as well.

        Comment


          #5
          Hello RandomTask,

          Thank you for your reply.

          I have added a vote for you to SFT-1085 as well. If this is implemented, it will be mentioned in the Release Notes my colleague Jim linked above.

          Please let us know if we may be of further assistance to you.
          Kate W.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by DanielSanMartin, Yesterday, 02:37 PM
          2 responses
          12 views
          0 likes
          Last Post DanielSanMartin  
          Started by DJ888, 04-16-2024, 06:09 PM
          4 responses
          12 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by terofs, Today, 04:18 PM
          0 responses
          11 views
          0 likes
          Last Post terofs
          by terofs
           
          Started by nandhumca, Today, 03:41 PM
          0 responses
          7 views
          0 likes
          Last Post nandhumca  
          Started by The_Sec, Today, 03:37 PM
          0 responses
          3 views
          0 likes
          Last Post The_Sec
          by The_Sec
           
          Working...
          X