Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unit Testing in NT8

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

    Unit Testing in NT8

    It has been recurring theme in the past - unit testing for strategies and indicators. The recommendation was to wait for NT8 beta release for some more details regarding changes in the area.

    So my question is can we (and how would we approach it) use unit testing with NT8?
    Do you have any recommendations/samples to start with
    Have any users succesfully implemented unit testing in their NT8 development?

    #2
    Hello,

    Thank you for the question.

    I have put in a question to Product Management in regard to unit testing NinjaScript items.
    Once I have further information on this subject I will reply back.

    Please let me know if I may be of further assistance.

    Comment


      #3
      We did not make any explicit documentation for unit testing or any features in the product to help you do unit testing. This could be something we explore in the future but not in the near term.

      For now I would recommend if you want to get started you treat it similar to how we would. Which is setup your own visual studio project manually. Add in NinjaTrader.Core.Dll and NinjaTrader.Gui.DLL references from your NinjaTrader install directory (c:\Program Files\NinjaTrader 8) and add in existing files from the (My Documents\NinjaTrader 8\bin\custom) directory. Then setup a visual studio test project or NUnit test project from there. However the unit testing you would be able to do is rather limited since you could only test code paths in your own code and not test anything that depends on NinjaTrader data or starting a indicator/strategy.

      For setting up bars, and data + simulating indicators/strategy startup from a Unit Test I currently do not have any valid approach to recommend at this time. This is similar to Starting a Strategy/Indicator programmatically and has been an item on the requested functionality list for NT8 so I will add your vote to the list to look into that further as well.

      -Brett
      BrettNinjaTrader Product Management

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, Yesterday, 10:06 AM
      0 responses
      14 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      11 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      9 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      4 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      31 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X