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

Test Driven Development (TDD)

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

    Test Driven Development (TDD)

    NT Forum,

    I am working to improve my programming in NT by using Test Driven Development (TDD). I a novice programmer and currently use Visual Studio Express to debug NT code.

    Can anyone provide guidance on using TDD to develop indicators and strategies in NT?
    Also, can anyone provide guidance on using a version control system for NT code?

    Any words of wisdom, direction to reference material or websites is greatly appreciated
    Thanks
    Shannon

    #2
    NT Forum,

    Happy to report I am successfully using Visual Studio Pro 2013 (VS2013) as my Integrated development environment (IDE) for NT. Thanks to all posters who have illuminated the way.

    This was achieved by:
    1) Open NinjaTrader.Custom in VS2013 (https://www.bigmiketrading.com/ninja...html#post52463)
    2) Construct an AutoHotKey script to easily compile in NT from VS2013 (https://www.bigmiketrading.com/ninja...html#post54642)
    3) Set up version control with MS Team Foundation Server (http://www.visualstudio.com/products...nline-basic-vs) Free for five users.

    Now, in the vein of Test Driven Development (TDD) I am trying to write tests for indicators.
    I have hit a brick wall ! As per the below code, I have successfully created the template for a test:
    - It has a reference to NinjaTrader.Custom.
    - However, IntelliSense is alerting me of an issue when I attempt to add the statement "using NinjaTrader.Custom"
    - I am struggling to instantiate an indicator so that I may test its methods.
    Code:
    namespace NinjaTrader.Indicator.<IndicatorName>.Tests
    {
      [TestClass()]
      public class <InnerClassNameTests>
      {
        [TestMethod()]
        public void <MethodNameTest>()
        {
          //-- Arrange
            //  Struggling to instantiate <IndicatorName> or <InnerClassName>      
            //  e.g. var instance = new NinjaTrader.Indicator.<IndicatorName>();       
          //-- Act
          //-- Assert       
        }
      }
    }
    Any assistance or guidance would be appreciated.
    Regards
    Shannon
    Last edited by Shansen; 06-30-2014, 04:25 AM.

    Comment


      #3
      Hi Shannon, would unfortunately not have a best practice on this item as this is nothing we could support officially unfortunately. However we have TDD concepts noted on our feedback list for future consideration - perhaps a community member with expertise in this area can chime in and offer his thoughts on this script development approach.
      BertrandNinjaTrader Customer Service

      Comment


        #4
        Bertrand,

        Thank you for your response.

        Perhaps I am way off base in my approach. Perhaps the approach taken by third party developers would be a better path?

        I would imagine third party developers may choose to employ TDD when developing indicators (or similar) for sale. I would imagine the NT application is designed to allow third party developers to easily "extend" the application. Is there any guidance or documentation on how third party developers would/should approach their development? While I do not intend on selling anything, I would imagine this approach wold be more robust.

        In the meantime, I would welcome any insight offered from the NT community.

        Thanks again
        Shannon

        Comment


          #5
          NT Forum,

          Some years have passed since this was first posted. Is there any functionality or guidance towards implementing Test Driven Development (TDD). Any guidance or examples from NT or third party developers would be greatly appreciated.

          Shannon

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by BarzTrading, Today, 07:25 AM
          2 responses
          26 views
          1 like
          Last Post BarzTrading  
          Started by devatechnologies, 04-14-2024, 02:58 PM
          3 responses
          20 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by tkaboris, Today, 08:01 AM
          0 responses
          6 views
          0 likes
          Last Post tkaboris  
          Started by EB Worx, 04-04-2023, 02:34 AM
          7 responses
          163 views
          0 likes
          Last Post VFI26
          by VFI26
           
          Started by Mizzouman1, Today, 07:35 AM
          1 response
          11 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Working...
          X