• 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

Initialize From Nt7 to NT8

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

    Initialize From Nt7 to NT8

    Hello

    I'm trying to transfer my code from NT7 to NT8.
    I can see that that some of the code in the NT7's Initialize method was transferred to the NT8's OnStateChange method. However now it's divided into 3 parts (at least): SetDefaults, Configure and DataLoaded. How can I know which code should be transferred to which part.

    Thanks

    #2
    Hello kiss987,


    Thanks for your post.

    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.

    As always, we are more than happy to help out with tips and advice in this area, although we do not offer full script conversion services.


    Last edited by NinjaTrader_ShawnB; 04-19-2018, 12:12 PM.
    Shawn B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by U0000999, Today, 05:17 AM
    0 responses
    3 views
    0 likes
    Last Post U0000999  
    Started by Prataturry89, Today, 03:40 AM
    0 responses
    5 views
    0 likes
    Last Post Prataturry89  
    Started by UltraFastKetoBoost28, Today, 02:43 AM
    0 responses
    6 views
    0 likes
    Last Post UltraFastKetoBoost28  
    Started by kojakojids, Today, 02:04 AM
    0 responses
    5 views
    0 likes
    Last Post kojakojids  
    Started by pitifak, Today, 01:01 AM
    0 responses
    4 views
    0 likes
    Last Post pitifak
    by pitifak
     
    Working...
    X