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 WeyldFalcon, 12-10-2020, 06:48 PM
                      14 responses
                      1,426 views
                      0 likes
                      Last Post Handclap0241  
                      Started by Barry Milan, Today, 10:35 PM
                      0 responses
                      2 views
                      0 likes
                      Last Post Barry Milan  
                      Started by DJ888, Yesterday, 06:09 PM
                      2 responses
                      9 views
                      0 likes
                      Last Post DJ888
                      by DJ888
                       
                      Started by jeronymite, 04-12-2024, 04:26 PM
                      3 responses
                      40 views
                      0 likes
                      Last Post jeronymite  
                      Started by bill2023, Today, 08:51 AM
                      2 responses
                      16 views
                      0 likes
                      Last Post bill2023  
                      Working...
                      X