Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

NinjaScript Unit Testing

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

    NinjaScript Unit Testing

    Hi,
    In any professional software development, unit tests are a daily part of life. They are a great way to measure code behavior, and can be used along side client requirements for accountability. And as well as that, debugging with Print statements and an output window seem to be arcane methods for testing code completion.

    Has there been any thought on how one might be able to unit test ninja strategies? Is it possible? Could it be possible? Is it relevant?

    cheers
    Mat

    #2
    Thanks for the suggestion. We will put it on the list for future considerations.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by mwyatt View Post
      Hi,
      And as well as that, debugging with Print statements and an output window seem to be arcane methods for testing code completion.
      But, you can debug NinjaScript objects using Microsoft Visual Studio ...
      It's an amazing improvement.

      Regards.

      Comment


        #4
        Originally posted by cls71 View Post
        But, you can debug NinjaScript objects using Microsoft Visual Studio ...
        It's an amazing improvement.

        Regards.
        How do you do that exactly?

        Comment


          #5
          Here is a link on VS debugging - http://www.ninjatrader-support.com/H...ualStudio.html
          RayNinjaTrader Customer Service

          Comment


            #6
            Which versions of VS does this work with? 2005, 2008?

            Comment


              #7
              Both should work.

              Comment


                #8
                Hi, I have opened another thread on Unit Testing and TDD https://ninjatrader.com/support/foru...6-unit-testing

                Comment


                  #9

                  Ideally, I would like to develop Unit Tests for each Indicator which would operate under .OnBarClose OR .OnEachTick. I believe this would require mocking (or similar) a specified sequence of OnBarUpdate events. Ideally, a sequence of tick data could be recorded (or extracted) and used to develop a mock series. Unit Tests could then consume the mock series (under .OnBarClose OR .OnEachTick) to test and validate Indicator behavior.
                  Last edited by NinjaTrader_ChelseaB; 06-09-2019, 08:59 PM.

                  Comment


                    #10
                    Hello romanirenton,

                    I will submit your vote to this feature request.

                    Once I have a tracking ID, I will post in this thread for future reference.
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      Hello romanirenton,

                      I have received tracking ID# SFT-2793 for this request for unit / test driven development.

                      Please note it is up to the NinjaTrader Development to decide if or when any request will be implemented.

                      We appreciate your feedback on this.
                      Chelsea B.NinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by rtwave, 04-12-2024, 09:30 AM
                      2 responses
                      19 views
                      0 likes
                      Last Post rtwave
                      by rtwave
                       
                      Started by tsantospinto, 04-12-2024, 07:04 PM
                      5 responses
                      67 views
                      0 likes
                      Last Post tsantospinto  
                      Started by cre8able, Today, 03:20 PM
                      0 responses
                      6 views
                      0 likes
                      Last Post cre8able  
                      Started by Fran888, 02-16-2024, 10:48 AM
                      3 responses
                      49 views
                      0 likes
                      Last Post Sam2515
                      by Sam2515
                       
                      Started by martin70, 03-24-2023, 04:58 AM
                      15 responses
                      115 views
                      0 likes
                      Last Post NinjaTrader_Jesse  
                      Working...
                      X