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 Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            581 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            338 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            103 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