Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Saving CPU cycles

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

    Saving CPU cycles

    In my config, it seems the "indicators" are running the CPU at a steady 40-50% without any strategies running. One CPU running much heavier than the other.

    I have my "strategies" set to cycle OnBarUpdate every few seconds; so when they do run it is not that noticeable.

    I don't not wish to update my "indicators" at the End of the Bar. If I "return" without setting a value for the indicators; they disappear.

    Is there a way to periodically update my "indicators"?

    Thanks!

    #2
    Unfortunately not. It is every tick or at end of bar. You can use your own logic to try and filter away ticks, but that would still be using return.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Might I suggest...if my code does not change indicator values; that NT just do nothing? Why do values need to be re"Set" so the indicator does not disappear?
      Last edited by SteveB; 09-18-2008, 02:57 PM.

      Comment


        #4
        You can program it yourself that way. Instead of simply "returning" use a .Set() before the return. Set it to its last known value and bypass all the calculations. That should save you CPU cycles.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          That's what I was planning; but does NT redraw the identical image? Don't know resources/cycles used to calc vs redraw...

          Comment


            #6
            Drawing is not something you can control. Since you don't want calculate on close, but you don't want on every single tick the only place you can save cycles is filter out calculations on most ticks.
            Josh P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Hwop38, 05-04-2026, 07:02 PM
            0 responses
            161 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Started by CaptainJack, 04-24-2026, 11:07 PM
            0 responses
            310 views
            0 likes
            Last Post CaptainJack  
            Started by Mindset, 04-21-2026, 06:46 AM
            0 responses
            245 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, 04-20-2026, 05:21 PM
            0 responses
            350 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by M4ndoo, 04-19-2026, 05:54 PM
            0 responses
            179 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Working...
            X