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

Strategy not listed

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

    Strategy not listed

    Hello,

    I've been coding in easylanguage to get my feet wet in algo trading. I wanted to branch into Ninjatrader as it has been recommended by several of my friends. I believe I have successfully "transferred" my trading strategy over to Ninjascript. It compiles just fine. But when I go to the chart window, my strategy doesn't show in the list of available strategies to add to the chart. In fact it has some old ones from a year ago when I dabbled in it that are defunct and I can't open them from the NinjaScript Editor (as they do not show). I am confused as to why some strategies show up in Editor and some show up in Chart while seemingly the same as the chart options show up in Control Center.

    What am I seeing/not seeing? What database is corrupt? Is there a way to fix that?
    Just trying to get a bead on the limitations or what appears to be "multiple personalities" of Ninjatrader Desktop.

    Thanks in advance for the help, all.

    #2
    Hello alphatango,

    Thank you for your post.

    Adding a strategy directly to the control center will not associate the strategy with a chart. The strategy has to be added directly to a chart to be associated with that chart.

    Right-click on the chart > Strategies > click on your strategy > add > OK.

    Additionally, please confirm if your strategy has been compiled. Are you seeing any compile errors? If so, what is the full error message and on what line of code?

    When you open the Strategies window, are there any error messages appearing in the Log tab of the Control Center? If so, what is the complete error message?

    I look forward to your response.
    Gaby V.NinjaTrader Customer Service

    Comment


      #3
      When I go to Chart > Strategies > "Click on your strategy" the strategy is not listed there. Yes it compiles without error.

      Comment


        #4
        Hello,

        Thank you for your response.

        Please let me know if when you open the Strategies window, are there any error messages appearing in the Log tab of the Control Center? If so, what is the complete error message?

        If there are no log errors, check what the Name = "" string inside SetDefaults of your strategy is set to. Make sure that thisName = field (This is what the drop-down or strategy selector uses) shows the same name as the public class name.​

        I look forward to your response.
        Gaby V.NinjaTrader Customer Service

        Comment


          #5
          There are no error messages.

          I feel like NT is waiting for something, but I can't for the life of me find out what. If I could get a bead on what NT was waiting for (like an error message) that would be great.

          Comment


            #6
            Hello,

            If there are no error messages, then it is likely the script is loaded but has an incorrect name. Please check what the Name = "" string inside SetDefaults of your strategy is set to. Make sure that this Name = field (This is what the drop-down or strategy selector uses) shows the same name as the public class name.​

            A script has 3 names, the class name, the file name and the Name = "" in State.SetDefaults. Only the Name ="" string is used for the UI (the selectable strategy name you would see in the Strategies window).
            Gaby V.NinjaTrader Customer Service

            Comment


              #7
              As an update. I was able to get it to be seen! I clicked enough things and found a settings window for the Strategy. I was able to denote what instrument I wanted it set for and it shows up now. I am trying to find that again just for muscle memory. Any ideas where a settings screen would be for individual specific strategies?

              Comment


                #8
                Hello,

                The Properties of a strategy will be displayed to the right of the Available and Configured sections of the Strategies window. You will need to select the strategy for its Properties to display.

                Please also check out the Help Guide page on Running a NinjaScript Strategy from a Chart:

                Code:
                [URL]https://ninjatrader.com/support/helpGuides/nt8/index.html?running_a_ninjascript_strategy.htm#HowToRunAninjascriptStrategyInAChart[/URL]
                Note: It is wrapped in code tags because there is an issue with links in the forum that have hashtags. Our Development Team is aware of the issue and is working on a solution. Sorry for any inconvenience.

                Please let us know if you have any other questions.
                Gaby V.NinjaTrader Customer Service

                Comment


                  #9
                  No problem with the URL. Thanks for the udpate. The Original issue was that it would not show in that window. Open up a chart > Right Click > Strategies (window) > Issue: The strategy did not exist in the Available section.

                  I had to go somewhere else and edit the settings on the strategy to make it show up there and in CC. I can't recall where I had to go to set my instrument.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Taddypole, 04-26-2024, 02:47 PM
                  2 responses
                  12 views
                  0 likes
                  Last Post Taddypole  
                  Started by futtrader, 04-21-2024, 01:50 AM
                  6 responses
                  58 views
                  0 likes
                  Last Post futtrader  
                  Started by sgordet, Today, 11:48 AM
                  0 responses
                  4 views
                  0 likes
                  Last Post sgordet
                  by sgordet
                   
                  Started by Trader146, Today, 11:41 AM
                  0 responses
                  5 views
                  0 likes
                  Last Post Trader146  
                  Started by jpapa, 04-23-2024, 07:22 AM
                  2 responses
                  22 views
                  0 likes
                  Last Post rene69851  
                  Working...
                  X