• 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

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 tvaughan4, Yesterday, 10:46 PM
          2 responses
          11 views
          0 likes
          Last Post tvaughan4  
          Started by digibob, Yesterday, 10:01 PM
          1 response
          8 views
          0 likes
          Last Post NinjaTrader_ChrisL  
          Started by ldissinger, Today, 12:55 PM
          1 response
          10 views
          0 likes
          Last Post ldissinger  
          Started by pstrusi, Today, 09:06 AM
          1 response
          23 views
          0 likes
          Last Post marcus2300  
          Started by vpzdcv, Today, 02:31 AM
          0 responses
          12 views
          0 likes
          Last Post vpzdcv
          by vpzdcv
           
          Working...
          X