• 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

Is it possible render an Indicator and a DrawingTool separately ?

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

    Is it possible render an Indicator and a DrawingTool separately ?

    I have an indicator which does intensive calculations and a very complex rendering.
    On the other hand I have a DrawingTool with a simple rendering and that is painted on the same panel as the indicator. The DrawingTool is called from the indicator by a Draw method.

    I need to update the DrawingTool rendering much more often than the Indicator rendering.

    The rendering for the DrawingTool must be done within the OnMarketDepth event and for the Indicator within the OnMarketData event.
    My question is if are the separated renderings possible ?

    Thanks.

    #2
    Hello,

    Thank you for the question.

    Although the Indicator and Drawing tool are separate files, the OnRender is still being called by the chart for both so there would be no way to really separate these apart.

    Is there a problem with the two being out of sync or what is the use case where you would need to force the render faster than what the chart is doing?

    You could look into the Rendering options such as ForceRefresh and try those also to see if this helps: http://ninjatrader.com/support/helpG...rcerefresh.htm

    Please let me know if I may be of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      I want to subscribe to the OnMarketDepth event from DrawingTool (but for now it is not working well. See http://ninjatrader.com/support/forum...ad.php?t=80979).

      When the event handler is executed, the OnRender method of the DrawingTool must be executed to render the DrawingTool. But only the DrawingTool. I dont want the rest of the CharControl is renderized also with each quote received within the OnMarketDepth.

      This is one reason why it would be very useful to separate the rendering of the various objects in the ChartPanel.

      Thanks.

      Comment


        #4
        Hello,

        Thank you for the reply.

        Rather than subscribing to the data from the drawing too, because you already have access to the calling instruments subscriptions you could just use that data in the OnRender of the drawing tool. I had updated your other post with the syntax for that: http://ninjatrader.com/support/forum...ad.php?t=80979

        This may resolve the problem you are running into, in the case that the Indicator calls the drawing tool, the drawing tool is already subscribed to the instrument and in its OnRender you just read those values. This should eliminate the need for subscribing, and in the case you need to update the drawing tool more frequently, you could certainly use the same Tag and call the drawing tool in multiple locations like OnMarketData and OnMarketDepth for example which would force it to be redrawn with the chart with any new values.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Nat11, Today, 04:30 AM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by Option Whisperer, Yesterday, 11:50 AM
        2 responses
        10 views
        0 likes
        Last Post Option Whisperer  
        Started by TraderJim618, Yesterday, 01:20 PM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Started by drpapp, 01-24-2019, 06:57 AM
        6 responses
        72 views
        1 like
        Last Post brucerobinson  
        Started by ttodua, 12-06-2019, 11:40 PM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X