Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Finding Unused Names (Variables)

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

    Finding Unused Names (Variables)

    Is there a way within the NS editor to find unused variables?

    I tried using the VS editor and it's not obvious how to do that either.

    Using the find tool works, but is tedious if one has a lot of unused names (like when you edit an existing piece of code).

    Anyone have any ideas?

    Thanks

    #2
    Hello x703jko,

    Thank you for writing in. There is no native way to do this in the NinjaScript Editor unfortunately. If you would like I can submit a feature request on your behalf for the NinjaScript editor to be able to locate unused variables/methods. Please let me know if you would like me to do this.

    There are many tools that have been made for this purpose which are publicly available on the internet.

    Please let me know if I may be of further assistance.
    Michael M.NinjaTrader Quality Assurance

    Comment


      #3
      Originally posted by x703jko View Post
      Is there a way within the NS editor to find unused variables?

      I tried using the VS editor and it's not obvious how to do that either.

      Using the find tool works, but is tedious if one has a lot of unused names (like when you edit an existing piece of code).

      Anyone have any ideas?

      Thanks
      FxCop. I think the functionality has been included into VS.

      Comment


        #4
        Originally posted by NinjaTrader_MichaelM View Post
        Hello x703jko,

        Thank you for writing in. There is no native way to do this in the NinjaScript Editor unfortunately. If you would like I can submit a feature request on your behalf for the NinjaScript editor to be able to locate unused variables/methods. Please let me know if you would like me to do this.

        There are many tools that have been made for this purpose which are publicly available on the internet.

        Please let me know if I may be of further assistance.
        Yes, I believe a feature like this would be a useful thing to have. Is it already in NT8? If not, it would be a good thing for both NT7 and 8.

        What are the various publicly available tools to do this? I know about Resharp, but it is not freeware and the price is somewhat high for something that I may use relatively infrequently.

        Comment


          #5
          Originally posted by x703jko View Post
          Yes, I believe a feature like this would be a useful thing to have. Is it already in NT8? If not, it would be a good thing for both NT7 and 8.

          What are the various publicly available tools to do this? I know about Resharp, but it is not freeware and the price is somewhat high for something that I may use relatively infrequently.
          For NT8, get it from Visual Studio.

          I am not quite sure that you can do the same with NT7. You may have to use FxCop.
          Attached Files

          Comment


            #6
            Hello x703jko,

            I have submitted this as a feature request on your behalf. I will update this thread when I have further information.

            Thank you for your continued patience in the meantime.
            Michael M.NinjaTrader Quality Assurance

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            571 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            330 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            548 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            549 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X