No announcement yet.

Partner 728x90


Up-Down Stream NT7 to NT8 convert

  • Filter
  • Time
  • Show
Clear All
new posts

    Up-Down Stream NT7 to NT8 convert

    Hi experts,

    i am trying to convert a code NT7 to NT8 and not developer.

    Where do i wrong by converting? All references i read in NT website. But i don`t upload this add-on.

    Many thanks for your help
    Attached Files

    There is very helpful NT7 to NT8 information from NinjaTrader_AlanP in his reply04-17-2018, 03:09 PM to post

    My suggestion for helping NT converters would be to add a new section under NinjaTrader 8:

    NinjaTrader 8

    Platform Technical Support
    General platform technical support for NinjaTrader 8.
    General Development
    General NinjaScript development questions.
    Indicator Development
    Support for the development of custom indicators using NinjaScript.
    Strategy Development
    Support for the development of custom automated trading strategies using NinjaScript.
    Conversion from NinjaTrader 7
    Information and questions about conversion

    Moving all the relevant posts to this section would be very helpful for converters.

    I may submit this as a suggestion when I have time. From experience as far back as NT 5, the chances of this happening are a fraction of a per cent.

    A brilliant mentor of mine always said:

    "If your best product ideas aren't coming from your customers, then you aren't listening!"

    William Louis Witzel "Bill"


      Hello Azraell35,

      Thanks for your post.

      I see in the script you shared that you are calling AddPlot() within an Initialize() method.

      NinjaTrader 8 uses States (OnStateChange()) and does not use the Initialize() method found in NinjaTrader 7.

      You would need to remove the Initalize() method from the script and call AddPlot() in the OnStateChange() method when the State equals State.SetDefault.

      See this help guide for more information and sample code:

      I also see that your script does not contain an OnBarUpdate() method. You would need to include this method in the script. Then calculate your values and assign a value to the plot in that method.

      My advice is to start by creating as much of the script as possible in NinjaTrader 8 using the Strategy Builder (or Strategy Wizard). This will create the framework of the indicator or strategy which has large changes from NinjaTrader 7 to NinjaTrader 8.

      Then copy all code from the NinjaTrader 7 scripts OnBarUpdate to the OnBarUpdate of the NinjaTrader 8 script. This will introduce errors that will need to be resolved.

      Below I am including a link to a list of the code-breaking changes from NinjaTrader 7 to NinjaTrader 8.

      The help guide will be the best way to see how things have changed from NinjaTrader 7 to NinjaTrader 8.

      When first starting to port scripts, I myself would open the NinjaTrader 7 help guide and the NinjaTrader 8 help guide to the same sections so that I could compare. The majority of code supported by NinjaTrader is included in the help guides.

      Below is a link to a forum post with helpful information about getting started with NinjaScript.

      Please let us know if we may assist further.
      Brandon H.NinjaTrader Customer Service


      Latest Posts


      Topics Statistics Last Post
      Started by BartMan, Today, 06:49 PM
      0 responses
      Last Post BartMan
      by BartMan
      Started by Alley93, Today, 04:20 PM
      0 responses
      1 view
      Last Post Alley93
      by Alley93
      Started by joselube001, Today, 02:49 PM
      1 response
      Last Post NinjaTrader_ChrisL  
      Started by TheFil, Today, 06:20 AM
      1 response
      Last Post NinjaTrader_Clayton  
      Started by WalterSkinner, Today, 03:14 PM
      0 responses
      Last Post WalterSkinner