Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help converting Ninjatrader 7 to Ninjatrader 8!

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

    Help converting Ninjatrader 7 to Ninjatrader 8!

    I need to convert a custom indicator of which i have the source code from NT 7 to 8. I am not sure who is more pathetic at coding me or the 5 AI models I have tried.
    ​Thanks
    Attached Files

    #2
    Hello,

    Thank you for your post.

    If this is not a script that you have written, I would recommend you contact the vendor that creates the NT7 version and inquire if there is a new version available for NT8.

    If this is a script you have created that you would like to port to NT8, 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 NT7 to NT8.

    Then copy all code from the NT7 scripts OnBarUpdate to the OnBarUpdate of the NT8 script.

    This will introduce errors that will need to be resolved. The help guide will be the best way to see how things have changed from nt7 to nt8.

    Below I am including a link to a list of the code breaking changes from NT7 to NT8.


    When first starting to port scripts, I myself would open the NT7 help guide and the NT8 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.


    If you get stuck at any time please let us know.
    Gaby V.NinjaTrader Customer Service

    Comment


      #3
      I have reached out to the person who posted it on ecosystem.
      Draws a maximum of 21 evenly spaced horizontal lines from a midpoint outward. Inputs are; Number of lines, Line spacing, Midpoint price. Color, width, & style can be changed for all lines with one setting. Instead of having to set each Plots setting for all 21 lines. Updated 3/1/2014: Added a parameter to allow the […]

      Comment


        #4
        I know what the problem with the indicator is I just don't know how to solve it. What I am trying to do is to create an indicator that only plots 21 lines. The plots are based on the starting price. I think my problem is at every bar close it creates a new line of plots on every line. If you apply the indicator when it builds it builds 21 lines, and for every 21 lines it builds a new plot every bar on the 21 lines. If you create a drawing on the chart and double click it there will be thousands upon thousands of lines. I am so close but yet so far away.



        Attached Files

        Comment


          #5
          Hello,

          Are you trying to use Plots, or draw lines? You have added several plots via AddPlot(), but are only calling Draw.Line() within the script.

          If you want to use plots, you will need to assign values to those plots in OnBarUpdate().

          Gaby V.NinjaTrader Customer Service

          Comment


            #6
            All I am trying to do is draws a maximum of 21 evenly spaced horizontal lines from a market price that is set in the indicator options with line spacing that is set in the indicator options.

            Comment


              #7
              If you are trying to draw lines then using Draw.Line is the way to go. Or, you could use AddLine().



              To understand why the script is behaving as it is, such as placing orders or not placing orders or drawing objects when expected, it is necessary to add prints to the script that print the values used for the logic of the script to understand how the script is evaluating.

              In the strategy add prints (outside of any conditions) that print the date time of the bar and all values compared in every condition that places an order.

              The prints should include the time of the bar and should print all values from all variables and all hard coded values in all conditions that must evaluate as true for this action to be triggered. It is very important to include a text label for each value and for each comparison operator in the print to understand what is being compared in the condition sets.

              The debugging print output should clearly show what the condition is, what time the conditions are being compared, all values being compared, and how they are being compared.

              Prints will appear in the NinjaScript Output window (New > NinjaScript Output window).

              I am happy to assist you with analyzing the output from the output window.

              Run or backtest the script and when the output from the output window appears save this by right-clicking the output window and selecting Save As... -> give the output file a name and save -> then attach the output text file to your reply.

              Below is a link to a support article that demonstrates using informative prints to understand behavior and includes a link to a video recorded using the Strategy Builder to add prints.

              https://support.ninjatrader.com/s/ar...nd-TraceOrders
              Gaby V.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by michelz, 02-18-2025, 08:30 AM
              18 responses
              330 views
              0 likes
              Last Post neveral0n3  
              Started by Schools, Yesterday, 03:32 PM
              1 response
              15 views
              0 likes
              Last Post Schools
              by Schools
               
              Started by Mindset, Today, 09:58 AM
              0 responses
              5 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by llanqui, 03-05-2025, 06:03 AM
              21 responses
              121 views
              0 likes
              Last Post bltdavid  
              Started by kujista, 03-13-2025, 12:41 AM
              8 responses
              45 views
              0 likes
              Last Post kujista
              by kujista
               
              Working...
              X