• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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.
              DierkNinjaTrader Customer Service

              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, 07: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 FabianoTrader, Today, 04:00 PM
                      2 responses
                      11 views
                      0 likes
                      Last Post FabianoTrader  
                      Started by FabianoTrader, Today, 03:53 PM
                      0 responses
                      4 views
                      0 likes
                      Last Post FabianoTrader  
                      Started by swcooke, Today, 11:18 AM
                      2 responses
                      8 views
                      0 likes
                      Last Post swcooke
                      by swcooke
                       
                      Started by pjsmith, Today, 01:56 AM
                      1 response
                      9 views
                      0 likes
                      Last Post NinjaTrader_ChelseaB  
                      Started by JasonH, Yesterday, 11:03 PM
                      1 response
                      7 views
                      0 likes
                      Last Post NinjaTrader_ChelseaB  
                      Working...
                      X