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

Feature Request: Chart Control OnRender and StateChange events

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

    Feature Request: Chart Control OnRender and StateChange events

    Hello,

    We are in the process of completing an AddOn that creates and updates custom Controls for interaction on the ChartControl grid. These controls are designed to be available on every Chart window created and therefore achieving this via Indicator would not make sense because manually adding an indicator to every chart would be required.

    Unfortunately, we've hit a total roadblock because we have no way of knowing when the ChartControl child collection is in a ready-state to be added to (ie. after a new data connection, symbol change, interval change, etc.). Reference this thread: https://ninjatrader.com/support/foru...-within-add-on

    If we add our controls before the chart is completely loaded and rendered, it ends up refreshing the ChartControl.Children collection without our controls for which there seems to be no good remedy except a timer which is a very non-ideal solution for obvious reasons (data loading time can vary). We also need to update the properties and location of these controls whenever the Chart is rendered, also for which there is no exposed event.

    These events are obviously part of the inner-workings of the Chart Control somehow. Can I please request the following features be exposed for AddOn development?

    1) Some sort of Chart Control loading State-Changed event or Data-Loaded property

    2) An OnRender or OnUpdated event that fires when a Chart is changed or updated (much like the OnRender override for the Indicator framework)


    I think having these events/properties available would really allow the proper development of some excellent tools from the EcoSystem. Charting is one of NT8's primary features used by traders and I'm sure that by having access to these basic chart events we can really help the user harness the power available in NinjaTrader.

    Thank you for considering this request.
    Last edited by CDXTrader; 03-17-2020, 07:43 PM.

    #2
    Hello CDXTrader,

    Thanks for your post.

    I am inquiring with our Quality Assurance Developer to see if there is any insight that we can share that can lead you towards a resolution.

    If we cannot provide a way forward, we will proceed filing the feature request.

    UPDATE:

    Ok, we have put together some code that can hopefully lead you down a path that can give you a resolution. Please note, this code is NOT supported by NinjaTrader whatsoever. It is provided AS-IS out of courtesy and we will not provide any assistance with using this code. Please do not ask us any questions on it.

    This code looks at the Window.Activated event to then trigger adding a custom ChartObject to the chart which would have access to OnRender. The example draws a red line on all charts.

    I have submitted a feature request on your behalf to consider adding those features, and I will update the thread with a ticket ID once it becomes available. This way we can track client/vendor interest in having this sort of functionality offered in a supported way.

    Ticket ID: SFT-4716

    We look forward to assisting.
    Attached Files
    Last edited by NinjaTrader_Jim; 04-10-2020, 11:04 AM.
    JimNinjaTrader Customer Service

    Comment


      #3
      Hi Jim,

      Thank you for taking the time to post the example. Although it does not handle the data load/update issue, it does answer the ChartObject related question I've had for awhile. I appreciate you submitting the feature request and look forward to possible expanded access to the chart data states in the future. Cheers.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by cmtjoancolmenero, Yesterday, 03:58 PM
      5 responses
      28 views
      0 likes
      Last Post cmtjoancolmenero  
      Started by gbourque, Today, 06:39 AM
      2 responses
      14 views
      0 likes
      Last Post gbourque  
      Started by rexsole, Today, 08:39 AM
      0 responses
      4 views
      0 likes
      Last Post rexsole
      by rexsole
       
      Started by trilliantrader, Yesterday, 03:01 PM
      3 responses
      31 views
      0 likes
      Last Post NinjaTrader_Clayton  
      Started by Brevo, Today, 01:45 AM
      1 response
      14 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X