Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Non-invocable member cannot be used like a method error

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

    Non-invocable member cannot be used like a method error

    Any idea why am I seeing this error?

    Thanks for any help
    Attached Files

    #2
    Hello ark321,

    Thank you for your post.

    This error typically means you are trying to use something like a property as a method. Below is the Microsoft documentation on this compile error.



    What type of script is TDUFootprintPlots? Is this an indicator? Does the code for this script allow for it to take any inputs?

    Comment


      #3
      It is an Indicator and I was trying to initialize. The example provided above is to access properties inside an indicator

      Comment


        #4
        Hello ark321,

        An indicator property cannot be accessed in this way (using parentheses). What kind of property from the indicator are you trying to access? Is it a public property?

        We have an example script that demonstrates exposing indicator values that are not plots.

        Comment


          #5
          That error is shown when I was just initializing the indicatopr.

          Comment


            #6
            Apologies, in your last response you mentioned trying to get an indicator property this way.

            Does the indicator code allow for it to take any inputs?

            Comment


              #7
              yes, it should but not sure why that error while initializing

              Comment


                #8
                Hello,

                Do you mind sharing the indicator script so we can take a look at it?

                To export a NinjaTrader 8 NinjaScript so this can be shared and imported by the recipient do the following:
                1. Click Tools -> Export -> NinjaScript Add-on...
                2. Click the 'add' link -> check the box(es) for the script(s) and reference(s) you want to include
                3. Click the 'Export' button
                4. Enter a unique name for the file in the value for 'File name:'
                5. Choose a save location -> click Save
                6. Click OK to clear the export location message
                By default your exported file will be in the following location:
                • (My) Documents/NinjaTrader 8/bin/Custom/ExportNinjaScript/<export_file_name.zip>
                Below is a link to the help guide on Exporting NinjaScripts.
                http://ninjatrader.com/support/helpG...-us/export.htm

                Comment


                  #9
                  Please see attached
                  Attached Files

                  Comment


                    #10
                    Hello,

                    This is the strategy code - please post the indicator code. I would like to verify that the code does allow for input parameters.

                    Comment


                      #11
                      I dont have indicator code. It is a dll file that i sent to you

                      Comment


                        #12
                        Hello ark321,

                        If this is a third-party indicator, you'll need to reach out to the developer directly for assistance on how to properly reference this indicator script within your own code. We cannot assist with third-party scripts since you don't have access to the source code.

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by NullPointStrategies, Yesterday, 05:17 AM
                        0 responses
                        62 views
                        0 likes
                        Last Post NullPointStrategies  
                        Started by argusthome, 03-08-2026, 10:06 AM
                        0 responses
                        134 views
                        0 likes
                        Last Post argusthome  
                        Started by NabilKhattabi, 03-06-2026, 11:18 AM
                        0 responses
                        75 views
                        0 likes
                        Last Post NabilKhattabi  
                        Started by Deep42, 03-06-2026, 12:28 AM
                        0 responses
                        45 views
                        0 likes
                        Last Post Deep42
                        by Deep42
                         
                        Started by TheRealMorford, 03-05-2026, 06:15 PM
                        0 responses
                        50 views
                        0 likes
                        Last Post TheRealMorford  
                        Working...
                        X