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 is not listed as Available for charts

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

    Strategy is not listed as Available for charts

    Hi,

    I combined two strategies. It appears to compile without error. Nothing in log or output window. But when I try to load strategy to chart, it's not listed as available.

    What am I missing?

    Thanks

    Bob

    #2
    Hello Bob,

    Thank you for your note.

    Are there any error messages appearing on the Log tab of the Control Center as the Strategy Window is opened?

    If so, what do these say?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea,

      There's no error messages. I actually found the strategy.

      It appears that even though I did a 'save as', it still show up with the original strategy name I copied from when trying to add to a chart. So I now havw two strategy's with the name 'Sample PNL' in the drop down list to add a strategy to a chart, but a differnt strategy name when I select via the ninjascript editor.
      Last edited by bob77713; 11-13-2017, 03:58 PM.

      Comment


        #4
        Hello bob77713,

        In the original script does the Name variable match the class name?
        Does the Name and class name match the filename?

        To confirm, you are not able to see the copy script in the Window?
        Or are you able to see the copy script in the window and it has the name set to the Name variable in State.SetDefaults?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          I'm lost. Within Ninjascript editor the strategy name is the same as the following:

          public class HMATrendV1wPL : Strategy

          When I try to add a strategy, the available strategy name is:
          Sample PNL

          Comment


            #6
            Hello Bob,

            I'm not certain that I am understanding.

            When you say "When I try to add a strategy" are you talking about opening the Strategies Window?

            Is this the original script and not the copy?

            What value is the Name variable assigned in State.SetDefaults?

            Is the Name variable not being set in State.SetDefaults?

            Is the Name variable being set multiple times?

            And it is showing in the the name 'Sample PNL' in the Strategy Window?
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Hi Chelsea,

              Ok, now I understand. I had the original copied strategy name in 'State.SetDefaults'.

              After correcting name in 'State.SetDefaults', I compiled strategy, and it's now listed as an available strategy to add to a chart.

              Thanks for your help!

              Bob

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by RubenCazorla, Today, 09:07 AM
              2 responses
              11 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by i019945nj, 12-14-2023, 06:41 AM
              7 responses
              81 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by timmbbo, 07-05-2023, 10:21 PM
              4 responses
              158 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by tkaboris, Today, 08:01 AM
              1 response
              7 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by Lumbeezl, 01-11-2022, 06:50 PM
              31 responses
              819 views
              1 like
              Last Post NinjaTrader_Adrian  
              Working...
              X