Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Instrument.GetInstrument not appearing in Intellisense

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

    Instrument.GetInstrument not appearing in Intellisense

    In the NinjaScript Editor, the Intellisense for Instrument. does not include Instrument.GetInstrument. Can this be rectified?

    Thanks.

    #2
    Hello jeronymite,

    I am finding this is available.

    Are you opening Visual Studio by clicking the Visual Studio icon on the NinjaScript Editor toolbar?
    Attached Files
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea,

      I am not using Visual Studio. This is a NinjaScript Editor started from the Control Center.

      Thanks.

      Comment


        #4
        Hello jeronymite,

        Apologies, I'm not sure why I immediately thought you were looking for this in VS.

        I am showing this is available in the NinjaScript Editor as well.
        https://drive.google.com/file/d/1hnf...w?usp=drivesdk

        Are you using 8.0.21.1?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Thanks, Chelsea.

          I am on 8.0.21.0.

          Here is what I see:

          Click image for larger version

Name:	GetInstrument in NinjaScript Editor.png
Views:	60
Size:	197.3 KB
ID:	1102059

          I would have expected GetInstrument to be there. Am I missing something obvious?

          Grateful for your advice. Thanks!

          Comment


            #6
            Hello jeronymite,

            May I confirm that this script is an indicator or strategy and is extending the Indicator or Strategy class?
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Hi Chelsea,

              It's an Addon.

              Thanks.

              Comment


                #8
                Hello jeronymite,

                I'm not certain which namespace this Instrument in your script is inheriting from so use the fully qualified namespace NinjaTrader.Cbi.Instrument.
                Attached Files
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Hi Chelsea,

                  That did it!

                  When using the not-fully-qualified name, why does it not appear in Intellisense, yet I can still add it by simply typing it and it works?

                  Thanks.
                  Last edited by jeronymite; 05-28-2020, 02:34 PM. Reason: Additional detail.

                  Comment


                    #10
                    Hello jeronymite,

                    Likely an issue with inheritance and ambiguity. Use the fully qualified namespace.
                    Chelsea B.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by EquityTrader, Today, 11:37 AM
                    0 responses
                    1 view
                    0 likes
                    Last Post EquityTrader  
                    Started by georges61, Today, 11:35 AM
                    0 responses
                    6 views
                    0 likes
                    Last Post georges61  
                    Started by Atomic, Today, 11:27 AM
                    0 responses
                    5 views
                    0 likes
                    Last Post Atomic
                    by Atomic
                     
                    Started by smk200, Today, 10:29 AM
                    3 responses
                    20 views
                    0 likes
                    Last Post NinjaTrader_ChrisL  
                    Started by Austiner87, Today, 09:44 AM
                    2 responses
                    26 views
                    0 likes
                    Last Post Austiner87  
                    Working...
                    X