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 charlesugo_1, 05-26-2026, 05:03 PM
          0 responses
          65 views
          0 likes
          Last Post charlesugo_1  
          Started by DannyP96, 05-18-2026, 02:38 PM
          1 response
          149 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 05-11-2026, 05:56 AM
          0 responses
          162 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 05-10-2026, 08:12 PM
          0 responses
          99 views
          0 likes
          Last Post CarlTrading  
          Started by Hwop38, 05-04-2026, 07:02 PM
          0 responses
          286 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Working...
          X