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

Custom strategy not appearing in available strategies list

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

    Custom strategy not appearing in available strategies list

    Hello. Brand new to creating scripts. When trying to add a strategy to a chart, my custom strategy doesn't appear in the list of available strategies. 1st picture is the CTRL+S dialogue (from an ES chart). 2nd shows the list of strategies in the right margin (highlight added) and the compiled ESReversals script.
    Thanks!

    Solved: looked in the "log" tab as suggested in another post and found I was getting a run time error. This prevents the script from showing up in the list. Fixed now.
    Last edited by Sigma Cypher; 01-08-2022, 06:55 PM. Reason: Edit: The log showed an error related to a draw command. I removed the draw command and the script appeared in the list.

    #2
    Hello Sigma Cypher,

    Are any error messages appearing on the Log tab of the Control Center when opening the Strategies window? (Errors in OnStateChange when State is State.SetDefaults would prevent an instance of the script from being created to list in the Strategies window)

    If so, what is the full error message?

    What line of code is causing the error?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Yes, there was an error message in the log. I tried to draw a line in the OnStateChange() method, which is not allowed -- it has to be in OnBarUpdate(). You can delete this post if you like, I just edited it in case someone else ran into this problem.

      Comment


        #4
        Hi, please help, what if I have the same problem but I don't get any error messages in Log tab?

        Comment


          #5
          Hello naruti,

          Has the script compiled without any compile errors in the NinjaScript Editor?

          Does the Name property set in State.SetDefaults match the classname and filename?

          Can you export the file and let me test on my end?

          To export a NinjaTrader 8 NinjaScript so this can be shared and imported by the recipient do the following:
          1. Click Tools -> Export -> NinjaScript Add-on...
          2. Click the 'add' link -> check the box(es) for the script(s) and reference(s) you want to include
          3. Click the 'Export' button
          4. Enter the script name in the value for 'File name:'
          5. Choose a save location -> click Save
          6. Click OK to clear the export location message
          By default your exported file will be in the following location:
          • (My) Documents/NinjaTrader 8/bin/Custom/ExportNinjaScript/<export_file_name.zip>
          Below is a link to the help guide on Exporting NinjaScripts.
          http://ninjatrader.com/support/helpG...nt8/export.htm
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            Hi Chelsea,

            So yes, I have compiled zip file. Where should I send it for you to test it?

            Comment


              #7
              Originally posted by NinjaTrader_ChelseaB View Post
              Hello naruti,

              Has the script compiled without any compile errors in the NinjaScript Editor?

              Does the Name property set in State.SetDefaults match the classname and filename?

              Can you export the file and let me test on my end?

              To export a NinjaTrader 8 NinjaScript so this can be shared and imported by the recipient do the following:
              1. Click Tools -> Export -> NinjaScript Add-on...
              2. Click the 'add' link -> check the box(es) for the script(s) and reference(s) you want to include
              3. Click the 'Export' button
              4. Enter the script name in the value for 'File name:'
              5. Choose a save location -> click Save
              6. Click OK to clear the export location message
              By default your exported file will be in the following location:
              • (My) Documents/NinjaTrader 8/bin/Custom/ExportNinjaScript/<export_file_name.zip>
              Below is a link to the help guide on Exporting NinjaScripts.
              http://ninjatrader.com/support/helpG...nt8/export.htm


              Hi Chelsea,

              So yes, I have compiled zip file. Where should I send it for you to test it?​

              Comment


                #8
                Hello naruti,

                Can you attach this to your next post? (Click the upload attachments button when replying)

                If you would like to take the conversation private, you can email scriptingsupport [at] ninjatrader [dot] com and include a link to this forum thread.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by NinjaTrader_ChelseaB View Post
                  Hello naruti,

                  Can you attach this to your next post? (Click the upload attachments button when replying)

                  If you would like to take the conversation private, you can email scriptingsupport [at] ninjatrader [dot] com and include a link to this forum thread.
                  Hey, I just sent an email with the script attached to your provided email address.

                  Thank you!

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by DJ888, Today, 10:57 PM
                  0 responses
                  6 views
                  0 likes
                  Last Post DJ888
                  by DJ888
                   
                  Started by MacDad, 02-25-2024, 11:48 PM
                  7 responses
                  158 views
                  0 likes
                  Last Post loganjarosz123  
                  Started by Belfortbucks, Today, 09:29 PM
                  0 responses
                  7 views
                  0 likes
                  Last Post Belfortbucks  
                  Started by zstheorist, Today, 07:52 PM
                  0 responses
                  7 views
                  0 likes
                  Last Post zstheorist  
                  Started by pmachiraju, 11-01-2023, 04:46 AM
                  8 responses
                  151 views
                  0 likes
                  Last Post rehmans
                  by rehmans
                   
                  Working...
                  X