Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

"ForceRefesh" there is no forcing here...

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

    "ForceRefesh" there is no forcing here...

    Hello,

    Drawing attention the the following section of the NT8 guide


    Most notebly this sentence

    "Note: As the chart is optimized on a timer, calling ForceRefresh() will NOT immediately trigger a render event. Calling ForceRefesh() simply re-queues the render event to trigger during the next timed event. In other words, it may take up to 250ms for the render event to function."

    When using an event driven command other that OnBarUpdate, lets say it is a toolbar button. THere is a lag caused by NinjaTraders unchangeable 250m before any graphical change can take place. This causes the feeling of substantial disconnect from the UI.

    Is there a way to force the render to take place programmtically? It is a horrible experience pushing buttons with this 250ms lag.....

    I dont need to reduce the 250ms of the chart as much as i need the ability to override this manually on the odd occasion and actually FORCE a refresh rather than queue it.

    See this thread for more info on the same issue. I dont know how to look up the tracking of this submissions though...

    #2
    Hello marty087,

    The ForceRefresh method would be the only supported way to queue a refresh of the chart. What is the specific action that is not happening in a reasonable amount of time?

    The event handler for your button should fire as soon as the button is clicked, but depending what you do in that handler, that may not be updated immediately on the chart.

    If you can explain the outcome of what the button should do I could see if I know of any items to work around that limitation.

    I look forward to being of further assistance.

    Comment


      #3
      Hi Jesse,

      My indicator will calcualte a bunch of techincal levels and then graphically display them using, rays, lines, and text.

      In NT7 there is ChartControl.ChartPanel.Refresh(); which causes the chart to update immediately.

      If i have a button that calculates all the support and reisistance lines on a chart of 10's of thousands of bars, lets say the calcualtion time of my algorithm takes 100ms to process, It processes this and then queues the request to show the lines with "ForceRefresh" which takes another 250ms. So we are looking at 350ms all up. Enough to have the user feeling thouroughly disconnected from the UI when pressing the button.

      In NT7, the same process feels instant. How do I match the funtionality of NT7 in this instance? Or is NT8 "limp" by comparrision in this regard?
      Last edited by marty087; 01-26-2017, 01:55 PM.

      Comment


        #4
        Hello,

        In the case of using Drawing objects, you could try to add a dummy object and remove it after you have done your calculation in the button handler. This would cause the chart to forcibly refresh by resetting the ForceRefresh queue. I had previously commented on this topic here: http://ninjatrader.com/support/forum...36&postcount=7

        Depending on your logic, this could potentially be a solution but this would be something you need to try and see if the result changes. The queuing logic technically should be reset when an object is removed, in the case of the other post that was a resolution in the sense that after the action the dummy object is removed causing the chart to re render.

        In the thread I have linked there is also other undocumented syntax, I would highly advise against using undocumented/internal methods surrounding rendering as these items can cause total platform crashes, not just a handled exception.

        I look forward to being of further assistance.

        Comment


          #5
          The dummy object didn't work. Thanks for the link.

          If I am honest, I am left scratching my head as to why The NT team has made the force refresh function subject to the minimum chart interval of 250ms, while at the same time stripping the user of the ability to adjust the chart update interval... Is it really that difficult to allow an instant refresh programmatically without opening up Pandora's box?

          For me, this is an issues that really needs to be addressed to ensure that the NT8 is a viable option over NT7. To traders that are accustomed to reading tick pace, 250ms is crippling.

          UPDATE: ChartControl.ChartPanel.Refresh(); has worked perfectly for me. Graphical update time after clicking a button is now instant. HUGE impovement. Just hoping not to have issues using unsupported features...

          Thanks Jesse.
          Last edited by marty087; 01-27-2017, 04:10 PM.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          580 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          335 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          102 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          554 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          552 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X