Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Chart Not Updating

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

    Chart Not Updating

    I'm using OnMarketData() to update my charts. I construct and render my own chart bars etc. I have noticed that if the chart is not displayed upper most then it does not reliably update. I would say it does not process all the incoming tick information. Is there something I need to know?
    Last edited by boreland; 06-06-2016, 10:22 AM.

    #2
    Hello boreland,

    Are you doing custom rendering in the Plot override in NT7 after collecting the data in OnMarketData?

    Do you have prints to show that the ticks received in the script do not match the ticks received in the Time & Sales window?

    When you mention "displayed upper" is this referring to bringing the indicator to the top of the z-order?
    Does this mean the indicator must be in panel 1?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      I'm using NT8. The the tickdata is processed within OnMarketData() and displayed using OnRender(). When I say upper most I'm referring to the chart window being top most. The indicator appears notto always process the data if it is covered by another window (application).
      Last edited by boreland; 06-06-2016, 12:37 PM.

      Comment


        #4
        Hello boreland,

        In that case, set IsSuspendedWhileInactive to false in State.SetDefaults.
        http://ninjatrader.com/support/helpG...leinactive.htm

        Below I am providing a link to the forum area for NinjaTrader 8.
        http://ninjatrader.com/support/forum...splay.php?f=59

        http://ninjatrader.com/support/forum...splay.php?f=60
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Thanks do you want to move this thread to the right forum area? I've made the changes you recommended/
          Last edited by boreland; 06-06-2016, 12:43 PM.

          Comment


            #6
            Hi boreland,

            No, its not necessary to move this thread, that tip was just a heads up for the future.

            (We are currently prioritizing NinjaTrader 7 over NinjaTrader 8 Beta. As posts come in from the forum, having these in the correct section allows us to prioritize accordingly. Also, it helps us to know where we should be researching an answer for NT7 or for NT8.)
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              I'm made the recommended change. Are there any other settings I should be aware off. Perhaps you could show the default state set up for your T&S window.

              Comment


                #8
                Hello boreland,

                Rendering in general has changed. For a persistant dxbrush (so that you don't use resources recreating this on each OnRender run causing choppiness) you would need to .Dispose() and recreate with ToDxBrush() in OnRenderTargetChanged().
                http://ninjatrader.com/support/helpG...getchanged.htm

                Also new is IsInstantiatedOnEachOptimizationIteration.
                http://ninjatrader.com/support/helpG...niteration.htm

                There are also changes in implementation that you should look over.
                Below I am providing a link to the code breaking changes in the help guide.
                http://ninjatrader.com/support/helpG...ng_changes.htm

                These are a few things I've had to relearn with NT8, though likely there is a lot that I am leaving out. I'm not sure if you are asking me about whats different in NinjaTrader 8's settings or if you are asking about what else is needed to have a script still process when the window does not have focus.
                Last edited by NinjaTrader_ChelseaB; 06-06-2016, 02:16 PM.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  First let me say thanks for this information. I was concerned that I was not disposing of the brush. Let me also give something back to the group. I'm not sure if I learned this here or someplace else but I know there are threads asking how to implement a windows brush (alpha, r,g,b) to a DxBrush. Well here is how I do it. It would be nice if this could be added to the manual.

                  var brush = new System.Windows.Media.SolidColorBrush(System.Window s.Media.Color.FromArgb((byte)alpha, (byte)r, (byte)g, (byte)b));

                  myBrush = brush.ToDxBrush(RenderTarget);

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by bortz, 11-06-2023, 08:04 AM
                  47 responses
                  1,607 views
                  0 likes
                  Last Post aligator  
                  Started by jaybedreamin, Today, 05:56 PM
                  0 responses
                  9 views
                  0 likes
                  Last Post jaybedreamin  
                  Started by DJ888, 04-16-2024, 06:09 PM
                  6 responses
                  19 views
                  0 likes
                  Last Post DJ888
                  by DJ888
                   
                  Started by Jon17, Today, 04:33 PM
                  0 responses
                  6 views
                  0 likes
                  Last Post Jon17
                  by Jon17
                   
                  Started by Javierw.ok, Today, 04:12 PM
                  0 responses
                  15 views
                  0 likes
                  Last Post Javierw.ok  
                  Working...
                  X