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 Skechers, Yesterday, 05:09 PM
                      4 responses
                      37 views
                      0 likes
                      Last Post Skechers  
                      Started by ラリー, 09-05-2022, 02:02 PM
                      65 responses
                      527 views
                      0 likes
                      Last Post NinjaTrader_ChelseaB  
                      Started by Sawangold, 09-20-2022, 08:10 AM
                      1 response
                      61 views
                      0 likes
                      Last Post zacwhitesi  
                      Started by trdninstyle, Yesterday, 09:32 AM
                      32 responses
                      179 views
                      0 likes
                      Last Post NinjaTrader_ChelseaB  
                      Started by c4vito, 06-03-2021, 01:11 AM
                      7 responses
                      113 views
                      0 likes
                      Last Post NinjaTrader_Kimberly  
                      Working...
                      X