Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to get a faster algorithm for backtesting ?

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

    How to get a faster algorithm for backtesting ?

    Hi Ninjas,

    After reading in many forums about the capabilities of Intel 5fth generation chips ( in my case i7-5500 ) AND the actual difference between idiomatic and non-idiomatic C programming, I was wondering if you can show me tips and tricks in order to squeeze all power out of my hardware for getting faster backtestings. I work with high frequency intraday data, thus a lot of work; so any help will be highly appreciated.
    Last edited by pstrusi; 05-15-2015, 04:22 AM.

    #2
    Hello pstrusi,

    Since all NinjaScript runs in the UI thread, my advice would be to limit the number of windows, indicators, and other scripts running.

    NinjaTrader 8 will be multi-threaded for each chart window, so this will improve the performance quite a bit.
    http://www.ninjatrader.com/downloads...njaTrader8.pdf

    Regarding the code, reducing the number of variables used is always helpful.
    Any reading and writing to file uses increased CPU.

    Really you would have to provide an example of the code and we may be able to say, this could be done more efficiently or this is the best way that we know to do this.

    I don't have any general tips for making a script run faster other than reduce the code as much as possible while still getting the same functionality.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea,

      Thanks a lot for your always useful help. I can see you always try your very best even in matters with not official available issue addressing. I've taken in account previously all your logic hints. I was just wondering about how to manage arrays more efficiently, how to concentrate all the cpu power in a long backtesting...etc. I'll continue to research about these subjects, in case of a reasonable doubt, I'll let u know.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      627 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      359 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      105 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      562 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      568 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X