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

issue indicator name

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

    issue indicator name

    Hello,

    I closed an indicator from NinjaScriptEditor that had coding errors. When compiling an other indicator the error messages appeared. I could not find this indicator on the right side with all indicators but then I could open it with right click below in the orange error messages. I commented all the lines with errors and I could then compile.
    When I continue to work and save an indicator with that name of the indicator with the problem described it shows me that I can not save with this name because there exists already an indicator with that name. But this indicator is not shown on the right side with all indicators listed!
    Its not about the use of an indicatorname, its about having resolved all problems, maybe in the future this will cause any problem when I delete some code where it is referenced to. Why does this indicator not appear and how can I delete it please?

    Thank you!
    Tony

    #2
    Hello Tony,

    Is this an open source script?

    Was the script created with the NinjaScript Editor?

    Is the file in the Documents\NinjaTrader 8\bin\Custom\Indicators folder?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello ChelseaB,

      I found the code in the strategy-folder and could delete it there.

      This mess caused my me using the strategy-builder in between occurred maybe from finding a solution to modify a system indicator: I want to modify the pivots indicator but there appears the message from screenshot "indchange". OK so I save the pivots indicator with another name but when compiling I get the message from screenshot "Namespace".

      What do I have to do please that I can use the pivots indicator and modify it?
      (I could use it with referring in a new indicator to it but this doesn´t help because I need the indicator applied to select in parameters weekly and monthly. As I have only HighLow from priorday but not HighLow from priorweek nor priormonth I need to run this indicator and not from another indicator where I can not access HighLow priorweek and priormonth)

      Thank you!
      Tony
      Attached Files
      Last edited by tonynt; 06-26-2022, 11:36 PM. Reason: add screenshot

      Comment


        #4
        Hello Tony,

        I'm having trouble following.

        You made a copy of the pivots indicator?

        Did you change the HLCCalculationMode and PivotRange enum names or are these being duplicated?
        Same question for the PivotsTypeConverter?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hello ChelseaB,

          thank you for your reply. Yes, I saved the original pivots indicator with name pivotsV11, but because of the message during compiling I removed it from indicators.

          What would I need to change in the copy-code please to avoid the error-messages in the screenshot.

          Thank you!
          Tony
          Attached Files

          Comment


            #6
            Hello Tony,

            You would need to rename the enums and type converter so there are not duplicates, and update any references to those enums or type converter with the changed name.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Hello ChelseaB,

              thank you for your reply. Can you please give an example what you mean by rename type converter.

              Thank you!
              Tony

              Comment


                #8
                Hello Tony,

                This would mean where PivotsTypeConverter is declared, a different name would be chosen for the class. Try calling yours MyCustomPivotsTypeConverter instead, and reference that class in the Pivots indicator.

                PivotsTypeConverter is already used. You cannot have two classes in the same namespace with the same name. This why two indicators cannot have the same name.

                All variables, classes, and enums within the same scope cannot have multiple declarations with the same name.
                Chelsea B.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by ynoldsany, Today, 01:00 AM
                0 responses
                1 view
                0 likes
                Last Post ynoldsany  
                Started by Carolscogginsi, Yesterday, 10:45 PM
                0 responses
                7 views
                0 likes
                Last Post Carolscogginsi  
                Started by RaddiFX, Yesterday, 10:15 AM
                2 responses
                15 views
                0 likes
                Last Post RaddiFX
                by RaddiFX
                 
                Started by patrickmlee007, Yesterday, 09:33 AM
                2 responses
                18 views
                0 likes
                Last Post patrickmlee007  
                Started by magnatauren, 08-15-2020, 02:12 PM
                5 responses
                208 views
                0 likes
                Last Post RaddiFX
                by RaddiFX
                 
                Working...
                X