Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Does code for an NT 7 indicator work in NT 8?

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

    Does code for an NT 7 indicator work in NT 8?

    Subject line says it all. If I write code for an indicator ( a variant of the StochRSI is what I'm looking at), will that code work in NT 8, or would I have to re-write it?
    Thanks,
    Tasuki

    #2
    Hello Tasuki,

    Thank you for your post.

    NinjaTrader 7 code must be converted for use in NinjaTrader 8.

    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

    The biggest things that you will run into when converting will be:
    • 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.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by ScottWalsh, Today, 06:52 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by ScottW, Today, 06:09 PM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by ftsc2022, 10-25-2022, 12:03 PM
    5 responses
    256 views
    0 likes
    Last Post KeyonMatthews  
    Started by Board game geek, 10-29-2023, 12:00 PM
    14 responses
    244 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by Waxavi, 04-19-2024, 02:10 AM
    4 responses
    56 views
    0 likes
    Last Post sonia0101  
    Working...
    X