• 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

Converting NT7 strategy to NT8?

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

    Converting NT7 strategy to NT8?

    Here's a question I'd think you'd be answering for the past year - where is there a guide on migrating a strategy from NT7 to NT8? As an example, my NT 7 strategy has the declaration:

    using System.Drawing.Drawing2D;

    which does not exist in the NT8 namespace. So, I'm wondering if I just need to use a different namespace, or also convert all of the plotting statements, which depend upon this namespace. And a few other questions like this too.

    Your thoughts? Thanks,

    #2
    Hello timmbbo,

    There are a few key items to look for when converting your scripts from NinjaTrader 7 format to NinjaTrader 8, and we keep a Code Breaking Changes table updated in the NinjaTrader 8 Help Guide to assist in identifying changes or new implementations of familiar methods and properties from NinjaTrader 7: http://ninjatrader.com/support/helpG...ng_changes.htm

    Some notable items to consider when converting your code will be the following:

    Initialization has changed significantly. Initialize() has been replaced with OnStateChange(), which can be used to filter out different stages of the entire life cycle of a script (SetDefaults, Configure, Historical, Realtime, Terminated, etc.) OnStateChange() is fully covered in the Help Guide.

    The names of many methods and properties have changed slightly, so you will need to refactor these in your code. The Code Breaking Changes table can make this task much easier, and there is also an alphabetical reference in the Help Guide that can help to find new method/property names: http://ninjatrader.com/support/helpG..._reference.htm

    In numerous instances, you now have direct access to objects, where in NinjaTrader 7 you had to work with interfaces. For example, rather than the IOrder interface, you now have direct access to an Order object and its related fields. This will require a change in the way items like this are handled in your code.

    What we recommend is that you use the indicator wizard or strategy wizard to create the basic structure of the ninjascript. From the helpguide, "The NinjaScript Wizard is used to generate the minimum code to get started programming any supported NinjaScript type. This wizard will allow you to define any default properties, add custom input parameters, add additional data series, and add any relevant event methods. There are a number of different properties and options available in the NinjaScript Wizard depending on the type of NinjaScript object you are creating." Reference: http://ninjatrader.com/support/helpG...?ns_wizard.htm
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by mbesha, Today, 09:26 AM
    0 responses
    1 view
    0 likes
    Last Post mbesha
    by mbesha
     
    Started by Brillo, Today, 08:58 AM
    0 responses
    3 views
    0 likes
    Last Post Brillo
    by Brillo
     
    Started by avrege, Today, 01:48 AM
    2 responses
    9 views
    0 likes
    Last Post avrege
    by avrege
     
    Started by markbb10, Today, 07:14 AM
    0 responses
    6 views
    0 likes
    Last Post markbb10  
    Started by leodrz, Today, 05:09 AM
    0 responses
    9 views
    0 likes
    Last Post leodrz
    by leodrz
     
    Working...
    X