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 rtwave, 04-12-2024, 09:30 AM
        5 responses
        37 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by funk10101, Today, 12:02 AM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Started by GLFX005, Today, 03:23 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by nandhumca, Yesterday, 03:41 PM
        1 response
        13 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by The_Sec, Yesterday, 03:37 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X