Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Refreshing the Chart

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

    Refreshing the Chart

    With NT, charts refresh only when new data arrives. I have things going on that I would like to see without having to wait for the next tick. Is there a way to refresh a chart from within a NT script?

    Thanks
    Dave

    #2
    Originally posted by DaveS View Post
    With NT, charts refresh only when new data arrives. I have things going on that I would like to see without having to wait for the next tick. Is there a way to refresh a chart from within a NT script?

    Thanks
    Dave


    You won't have anything happening in OnBarUpdate,

    You'll need to use OnMarketDepth for bid/ask changes, or do some sort of timing interrupt.

    Comment


      #3
      Hi sledge
      Thanks for your reply. Yes, I realised it would need to be outside OnBarUpdate.
      I think its probably not possible in NT

      Comment


        #4
        Hello DaveS,

        If you want to do some calculations regardless if there is any incoming ticks you would have to have a custom event with a timer object. You may view an example of this at the following thread.
        JCNinjaTrader Customer Service

        Comment


          #5
          Originally posted by DaveS View Post
          Hi sledge
          Thanks for your reply. Yes, I realised it would need to be outside OnBarUpdate.
          I think its probably not possible in NT
          You would have to create your own CustomEvent(), most probably a Timer() of some sort.

          Comment


            #6
            Why not just invalidate and update the ChartPanel when you have something ready to display?

            Code:
            public void Refresh()
                    {
                        m_ChartControl.ChartPanel.Invalidate();
                        m_ChartControl.ChartPanel.Update();
                    }
            This, of course, repaints the panel immediately.
            Last edited by BigWaveDave; 02-24-2013, 03:48 PM.

            Comment


              #7
              Originally posted by BigWaveDave View Post
              Why not just invalidate and update the ChartPanel when you have something ready to display?

              Code:
              public void Refresh()
                      {
                          m_ChartControl.ChartPanel.Invalidate();
                          m_ChartControl.ChartPanel.Update();
                      }
              This, of course, repaints the panel immediately.
              That code would still have to be called by the CustomEvent(), though I usually just use ChartControl.Refresh().

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              648 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              369 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              108 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              572 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              574 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X