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

AI Generated Strategy in Strategy Builder - How do I use it on a chart?

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

    AI Generated Strategy in Strategy Builder - How do I use it on a chart?

    I am fairly new. I used strategy analyzer to create a strategy for me. How do I now apply it to a chart and use it? Thanks!

    #2
    Hello woodruaj,

    Thanks for your post and welcome to the Ninjatrader forums!

    The steps to take, after creating in AI generate:

    1) Click on "View" to see the code generated. At this point, you can right mouse click in the code and select "Compile" noting the name of the strategy will be "autoStrategy(n), where n will depend on how many previous AiGenerate strategies you have compiled if any, OR you can select "save as" and provide a new name (recommended) for the strategy. This will cause a new Ninjascript tab to open with your newly named strategy and in this code then right mouse click and select compile to add the strategy to the system.

    2) To add your new strategy to a chart, on the chart right mouse click and select "strategy..", in the pop-up window, locate your strategy and click "add" (or double left click to add). On the right side of the window, locate the "Enable" check box and enable, finally click OK to run the strategy.

    Here are further details on running a strategy on the chart: https://ninjatrader.com/support/help...t_strategy.htm

    You may also want to review: https://ninjatrader.com/support/help...strategies.htm

    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thanks, Paul! Appreciate the help.

      Comment


        #4
        Hi. I have been trying to follow the steps here to save, then compile an AI generated strategy. After compiling, it adds duplicate indicators into my indicator list. When I delete the new strategies, and close Ninjatrader, it will go back to the normal list of indicators on restarting Ninjatrader.

        It will duplicate the indicators whether I save it first, then compile, or I compile it first as an "AutoStrategy(n)".

        I want to keep the AI strategies but don't want to have duplications in my indicator list....and I also wonder if it will triple and quadruple and so on the indicators in the indicator list if I continue to add more AI generated strategies.

        Thank you for any help you can give.
        Last edited by traderbot; 06-04-2021, 10:05 AM.

        Comment


          #5
          Hello traderbot,

          Thanks for your post and welcome to the NinjaTrader forums!

          Background: On a chart, when you open the indicators window, on the left side there are two panels. The upper left panel is "Available" and this is the list of all indicators in the platform, there can be no duplicates. In the lower-left panel called "Configured", is the list of all indicators that are applied to the chart and yes you can have duplicates, for example, you may have several SMA indicators of different periods.

          When you use AIgenerate to create a strategy, by default, it will use AddChartIndicator() in its code to display the indicators you selected in the AIgenerate process. This means when the strategy is loaded on the chart, it will automatically load all of the selected indicators. When you remove the strategy, the indicators the strategy loaded will be removed.

          For example, if on your chart you have added the ADL indicator and you have created an AI strategy that used the ADL indicator when you then add the strategy to the chart it will indeed add a duplicate ADL. when you remove the strategy it will remove the ADL indicator it added leaving yours.

          If using AIgenereate to create your strategy just be aware that it will automatically display on the chart the selected indicators which means all you need to do is create a chart of the data series of interest and then add the strategy and you will automatically get the indicators used.




          Paul H.NinjaTrader Customer Service

          Comment


            #6
            Thank you!

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by bortz, 11-06-2023, 08:04 AM
            47 responses
            1,607 views
            0 likes
            Last Post aligator  
            Started by jaybedreamin, Today, 05:56 PM
            0 responses
            9 views
            0 likes
            Last Post jaybedreamin  
            Started by DJ888, 04-16-2024, 06:09 PM
            6 responses
            19 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by Jon17, Today, 04:33 PM
            0 responses
            6 views
            0 likes
            Last Post Jon17
            by Jon17
             
            Started by Javierw.ok, Today, 04:12 PM
            0 responses
            15 views
            0 likes
            Last Post Javierw.ok  
            Working...
            X