• 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

Event when chart instrument changes

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

    Event when chart instrument changes

    Hey there,

    Is there an event that I can hook into to tell me when the instrument or the timeframe has changed on that chart?

    thanks,

    Kevin.

    #2
    Hello Kevin,

    I am not aware of an event such as this that would trigger when the instrument has changed.
    You may try tracking the instrument using a static variable.

    I am happy to submit a feature request on your behalf to add this functionality. Please let me know if you would like to submit this as a feature request.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hey Chelsea!! Thanks for the quick response... I am in such a hurry at the moment. geee this puts me in a pickle because my addon kinda needs to know what Instrument its working with. I guess I will just need to do a loop inside an async task and keep checking it to see if it has changed since the window was first loaded.

      What about the instrument and timeframe selectors at the top of the chart... they must have a change event that I can work with? I'm not sure how to hook into them though... and of course it wouldn't work with the DataSeries windows, but I could live with it. Any ideas?

      Comment


        #4
        Hello Kevin,

        Changing the instrument on a chart will reload all indicators as well. If you use an indicator on each chart that updates a static variable when State is State.DataLoaded you may be able to use this to only update when there has been a change.

        Or you could loop with timer.

        I am not aware of any way to add events to the controls on a chart and if these exist these will not be documented in the help guide.
        This thread will remain open for any community members that would like to assist.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Chelsea, got this working great using an indicator!! Thanks for the tip!!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by U0000999, Today, 05:44 AM
          1 response
          11 views
          0 likes
          Last Post NinjaTrader_ShawnB  
          Started by Teebone21, Today, 10:38 AM
          2 responses
          9 views
          0 likes
          Last Post Teebone21  
          Started by futurestrader7, Today, 11:31 AM
          0 responses
          3 views
          0 likes
          Last Post futurestrader7  
          Started by J_o_s, 03-30-2020, 12:29 AM
          2 responses
          16 views
          0 likes
          Last Post J_o_s
          by J_o_s
           
          Started by ptpatrader, Today, 10:27 AM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_ChrisL  
          Working...
          X