Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NinjaTrader - Event: Charts and Indicators in a workspace have been fully loaded

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

    NinjaTrader - Event: Charts and Indicators in a workspace have been fully loaded

    Hello there,

    I am currently working on a project. For it to work we need to be able to identify from an AddOn when all charts in a workspace and their indicators have been fully loaded (e.g. historical data has been loaded and indicators have stopped calculating). I could not find an existing event for this.

    Another alternative I tried is to check with an AddOn windows that are created in OnWindowCreated. By using the Window.ContentRendered Event I am able to identify when the window is being shown but there are no indicators in the ChartControl at this point. I could keep track of the windows and periodically check if Indicators have been loaded, but there might be a chart window without indicators.

    So my questions are:
    Is there already an Event which would tell me if the Charts and its Indicators are done loading? If not, does anyone have a better suggestion on how to identify if the chart is fully loaded?

    Any help will be greatly appreciated. Thank you in advance.

    #2
    Hello Devside_Victor, thanks for writing in.

    There's no documented event that will tell an addon when the charts are done loading. One way of doing it would be to loop through the Indicators on the chart to see if they are in State.RealTime. We have an example addon that loops through all charts and gets each indicator on each chart:

    https://ninjatrader.com/support/foru...tor#post717883

    This example demonstrates how to get the charts and their indicators, and those indicator's properties.

    Please let me know if you have any questions about this material.

    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Good reading here.

      Comment


        #4
        This is a solution I have contemplated doing, but one issue to be careful of is the multi-threaded access. Unless the State property is a thread safe property, accessing it from multiple threads could be problematic. One would need to use the dispatcher of the indicator to retrieve the result and figure out how to return it in a thread safe manner.

        Comment


          #5
          Hello all,

          Thank you all very much for your help. I will take a closer look at your suggestions and probably come back to you with further questions

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by PWillard, Today, 12:56 AM
          0 responses
          1 view
          0 likes
          Last Post PWillard  
          Started by WidenThur, Today, 12:48 AM
          0 responses
          1 view
          0 likes
          Last Post WidenThur  
          Started by devidbelly, Today, 12:39 AM
          0 responses
          2 views
          0 likes
          Last Post devidbelly  
          Started by anderson, Yesterday, 11:06 PM
          0 responses
          1 view
          0 likes
          Last Post anderson  
          Started by eseorafva, Yesterday, 10:43 PM
          0 responses
          0 views
          0 likes
          Last Post eseorafva  
          Working...
          X