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

Display update interval for Draw() methods

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

    Display update interval for Draw() methods

    This is just a short question.

    I understand that Plot() is executed as per Chart Properties -> Display Update Interval settings, which will avoid high CPU load.

    If I use DrawRectangle(), DtawLine() or any other Draw() method in OnBarUpdate(), will this be

    (a) calculated with every incoming tick and cause high processor load, if the indicator is set to CalcOnBarClose = false, or

    (b) filtered to comply with the Display Update Interval settings under chart properties.

    Thank you for your response.

    #2
    Harry, I saw your thread on BigMike's ... I can't give you a definite answer, since what you are after is definitely beyond what we provide support for. This would require that you tested your approach under every potential situation...

    However, here is some info: IndicatorBase.Plot() call frequency is primarily impacted by the chart update frequency. Although there might be additional situations where the chart (and indicators) would require repainting.

    Comment


      #3
      Hi Dierk,

      thanks for the answer, understood that for Plot() and it makes sense. Just wanted to know whether the Draw() methods react to every incoming tick, or if they are filtered as well. A "yes" or "no" would be fine. Otherwise I can do some tests to find out, but an answer would save me some time.

      Originally posted by NinjaTrader_Dierk View Post
      Harry, I saw your thread on BigMike's ... I can't give you a definite answer, since what you are after is definitely beyond what we provide support for. This would require that you tested your approach under every potential situation...

      However, here is some info: IndicatorBase.Plot() call frequency is primarily impacted by the chart update frequency. Although there might be additional situations where the chart (and indicators) would require repainting.

      Comment


        #4
        The Draw() methods create objects which are redrawn whenever a chart is repainted which is triggered by logic below.

        Obviously the Draw() methods in your code would be called whenever OnBarUpdate() is triggered which could be down to the tick (COBC=false).

        Hope this helps

        Comment


          #5
          Thanks for the information, that was helpful.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          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 cmtjoancolmenero, Yesterday, 03:58 PM
          4 responses
          26 views
          0 likes
          Last Post cmtjoancolmenero  
          Started by Brevo, Today, 01:45 AM
          1 response
          14 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Working...
          X