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

Indicator Not Showing Up in Selection Panel on Chart

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

    Indicator Not Showing Up in Selection Panel on Chart

    I suddenly am having an issue where I copy an existing indicator that is working ( and shows up in selection list) - where the new copy is saved in its own unique name by changing the name of the code and in the Name = statement below.

    Also it compiles fine, and shows up as the new code name in the "Indicator list" within the Ninja Editor...

    Any clues why this is happening?

    Code is attached....

    The Name statement:

    if(State == State.SetDefaults)
    {
    Calculate = Calculate.OnBarClose;
    Name = "CWH Data Study";
    path = NinjaTrader.Core.Globals.UserDataDir + this.Instrument.FullName + "-CWH Study Data.txt"; // Define the Path to our test file
    }
    Attached Files
    Last edited by Jim-Boulder; 09-25-2017, 03:48 PM.
    Jim-Boulder
    NinjaTrader Ecosystem Vendor - Elephant Tracks

    #2
    Hello Jim-Boulder,

    I think i'm not understanding correctly.

    You have created a copy of a script using a new name, and the new script has the new name, is this correct?

    That would be the expected behavior..

    Are you saying that the new script has the old name?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Sorry for the confusion.

      I have an existing script "A" which is working fine. I do the following:

      1) I make a copy of the script in the Ninjascript Editor
      2) I change the Name = "A" to :B:
      3) and do a save as "B",
      4) and then compile "B" with no errors.

      Both "B" and "A" show up in the list of indicators in the Ninja Editor, but when I go to a chart and try to add "B" it is NOT showing up in the list of available indicators in the chart dialogue list, however "A" is showing as available.
      Jim-Boulder
      NinjaTrader Ecosystem Vendor - Elephant Tracks

      Comment


        #4
        Found the Issue

        I found the issue - even though the script compiled without error, there was an error in the code that apparently only triggered when applying to a specific instrument.

        I resolved the issue (I was not checking for a null instrument name before using it in the file path string) - and now it appears on the available indicator list in the chart dialog box.

        Thank you.
        Jim-Boulder
        NinjaTrader Ecosystem Vendor - Elephant Tracks

        Comment


          #5
          Hi Jim-Boulder,

          Thank you for letting me know you've resolved the behavior...

          However, I'm curious if the code in strategy B is exactly the same as strategy A with a different name, how is strategy A not also affected by this error?
          Chelsea B.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by michi08, 10-05-2018, 09:31 AM
          5 responses
          741 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by The_Sec, Today, 02:29 PM
          0 responses
          2 views
          0 likes
          Last Post The_Sec
          by The_Sec
           
          Started by tsantospinto, 04-12-2024, 07:04 PM
          4 responses
          62 views
          0 likes
          Last Post aligator  
          Started by sightcareclickhere, Today, 01:55 PM
          0 responses
          1 view
          0 likes
          Last Post sightcareclickhere  
          Started by Mindset, 05-06-2023, 09:03 PM
          9 responses
          259 views
          0 likes
          Last Post ender_wiggum  
          Working...
          X