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 Mestor, 03-10-2023, 01:50 AM
                      16 responses
                      388 views
                      0 likes
                      Last Post z.franck  
                      Started by rtwave, 04-12-2024, 09:30 AM
                      4 responses
                      31 views
                      0 likes
                      Last Post rtwave
                      by rtwave
                       
                      Started by yertle, Yesterday, 08:38 AM
                      7 responses
                      29 views
                      0 likes
                      Last Post yertle
                      by yertle
                       
                      Started by bmartz, 03-12-2024, 06:12 AM
                      2 responses
                      22 views
                      0 likes
                      Last Post bmartz
                      by bmartz
                       
                      Started by funk10101, Today, 12:02 AM
                      0 responses
                      7 views
                      0 likes
                      Last Post funk10101  
                      Working...
                      X