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

Where are the context pop-ups for user defined methods?

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

    Where are the context pop-ups for user defined methods?

    When I'm working in the NinjaScript editor, I like the way that whenever I type a method name or hover my mouse over a variable, a little box pops up to help me understand the method overloads or variable type.

    When I write a custom indicator, and refer to it from another indicator, information about the parameters pops up for my custom indicator. That's nice too.

    So why is it, if I have a bunch of custom classes and methods in a UserDefinedMethods strategy, I get no pop-up help at all when I'm editing another strategy that needs to reference that stuff? I get those helpful pop-ups only when I'm editing my user defined methods file, not when I'm editing something that needs to refer to it. I'm even putting the standard C# summary comments above each one, to no avail. I know my UserDefinedMethods is visible, because everything compiles OK.

    -Alex
    Last edited by anachronist; 05-14-2012, 05:07 PM.

    #2
    Alex, so you can compile well and access the UserDefined Strategy method, but just miss the Intellisense help?

    If you type this. in your strategy, would it then pop up allow you to select the user defined public method coming from the partial class?

    Thanks,
    BertrandNinjaTrader Customer Service

    Comment


      #3
      The methods are all in custom classes. In my strategy I have
      Code:
      protected override void Initialize() {
          BAtm atm = new BAtm(this);
      }
      Class BAtm is a public class inside my UserDefinedMethods file.

      Within class BAtm there are several public methods. While editing the UserDefinedMethods file, the Intellisense help works just fine. While editing my strategy, it doesn't matter if I access those methods using atm.MethodName() or this.atm.MethodName(), no Intellisense help pops up. But everything compiles just fine, and I can step through my code with Visual Studio and see that the methods are indeed executed.

      -Alex

      Comment


        #4
        Alex, it could be that the custom class is preventing proper Intellisense access here, if you just try this public method returning a bool in the partial strategy class in UserDefinedMethods, would you be able to see the Intellisense then for it as expected?

        public bool PermToTrade()
        {
        if (ToTime(Time[0]) >= 100000 && ToTime(Time[0]) <= 154500)
        return true;

        else return false;

        }
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Yup, that works. Looks like the custom public class is preventing intellisense from working. I even appended :Strategy to the class declaration but that didn't help.

          Funny thing is, I could swear that it was working a couple months ago.
          -Alex

          Comment


            #6
            Originally posted by anachronist View Post

            Funny thing is, I could swear that it was working a couple months ago.
            -Alex
            Alex,

            I have a complex custom class. For some reason, to get the intellisense working with NT7, I need to keep the class files open in the editor. Doesn't work when the class is not open in the editor.

            Not sure why, would love to know. But it is a work-around.

            Comment


              #7
              NJA_MC: Your experience differs from mine. I have multiple editor windows open. I get the Intellisense help for stuff in my custom class only when I'm actually working in the editor window for that custom class. In any other editor window, I don't get Intellisense help for my custom class.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by CortexZenUSA, Today, 12:53 AM
              0 responses
              1 view
              0 likes
              Last Post CortexZenUSA  
              Started by CortexZenUSA, Today, 12:46 AM
              0 responses
              1 view
              0 likes
              Last Post CortexZenUSA  
              Started by usazencortex, Today, 12:43 AM
              0 responses
              2 views
              0 likes
              Last Post usazencortex  
              Started by sidlercom80, 10-28-2023, 08:49 AM
              168 responses
              2,265 views
              0 likes
              Last Post sidlercom80  
              Started by Barry Milan, Yesterday, 10:35 PM
              3 responses
              11 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Working...
              X