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

Converting Current day ADE from N7 to N8

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

    Converting Current day ADE from N7 to N8

    Ho do i convert the Anna current day indicator from N7 to N8 ??????
    Please advise

    #2
    Hello saeed, and thank you for your question.

    The two most useful tools for converting NT7 indicators to NT8 indicators, are the code breaking changes page, http://ninjatrader.com/support/helpG...ng_changes.htm , and the code creation wizards built into NT8. A good process to follow for converting NinjaScript files is as follows :


    • From the NinjaTrader Control Center -> New -> NinjaScript Editor
    • Right click the type of object you are importing in the NinjaScript Explorer and choose the option that creates a new version of it. For example, to import an Indicator, right click Indicator and select New Indicator
    • Code as much of your indicator as possible through the wizard. Don't worry about it if a field doesn't make a lot of sense, you will have an opportunity to code later and can leave any field set to its default value. Refer to the NT8 Help Guide frequently, http://ninjatrader.com/support/helpG..._reference.htm
    • Create any parameters and properties that did not get created through the wizard, that exist in your old NT7 code. Use wizard created parameters and properties as a template.
    • Create any private variables that existed in your old NT7 NinjaScript file
    • Copy any code from your Initialize routine in NT7 into the appropriate places in OnStateChange. As a general rule, State == State.SetDefaults covers properties you can set from right-click windows, and State == State.Configure covers any initialization and instantiation. Refer to the Help Guide if you are unsure where something should go.
    • Compile your code with F5. Fix your code and compile again until it compiles without errors.
    • Test your code's interface out. For example, all right-click menu options should appear the way you'd like. Fix your code, compile, and test again until it works correctly
    • Copy your OnBarUpdate method in to your indicator as is, along with any helper methods it relies on. Compile, refer to the code breaking changes page, ask questions here in the forums, and repeat until this section compiles
    • Finally, refer to the Help Guide to see if your other event methods have changed name, and copy this code in. Repeat the procedure you used to get OnBarUpdate compiling
    • Once your code compiles correctly, come up with a test scenario for your old script in NT7, and run your old script through this scenario using the Strategy Analyzer. A test scenario involves a set of known historical data and an instrument
    • Once you have test results, repeat your test in NT8.
    • As a control, run a known good NinjaScript through both your NT7 or NT8 tests to make sure your tests are valid. Good examples of known good NinjaScript are the SMA indicator and the SampleMACrossover strategy. Fix your test until these known good NinjaScript files work the same way in NT7 and NT8, then run your tests again on your NinjaScript



    When questions come up, this forum, http://ninjatrader.com/support/forum...splay.php?f=57 , is the best resource available for any specific questions you may come across.
    Jessica P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by junkone, Today, 11:37 AM
    2 responses
    15 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by frankthearm, Yesterday, 09:08 AM
    12 responses
    44 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Started by quantismo, 04-17-2024, 05:13 PM
    5 responses
    35 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by proptrade13, Today, 11:06 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Started by love2code2trade, 04-17-2024, 01:45 PM
    4 responses
    36 views
    0 likes
    Last Post love2code2trade  
    Working...
    X