Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to check that the indicator is already loaded?

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

    How to check that the indicator is already loaded?

    1) How to check that the indicator is already loaded?
    How to avoid 2 times to load the same indicator?

    2) How to close (exit, drop, delete) the indicator if a repetition is found?

    Maybe I can make a global variable?

    These questions are still relevant.
    Last edited by Udimuz; 05-27-2019, 11:29 AM.

    #2
    Hi Udimuz, thanks for your post.

    The GetType() method will give the type of the referenced object. You can check an existing loaded indicator's type against the newly created indicator's type and cancel the operation if the types match.

    Please let me know if I can assist any further.


    Comment


      #3
      Thanks Chris.
      Can you also answer my second question?

      2) How to close (exit, drop, delete) the indicator if a repetition is found?

      And another question:
      Are there global variables? in Ninjascript
      Forgive me, I'm just learning.

      Comment


        #4
        Hi Udimuz, thanks for the follow-up.

        How to implement this would depend on exactly what your code is doing. Could you demonstrate why you need this?

        Yes, there are global variables in a sense. I made this post a while ago that shows how to set up a "global" double variable. It also implements a property changed event for other objects to subscribe to. The code would go inside of a .cs file within the "Addons" folder.

        I look forward to hearing from you.

        Comment


          #5
          I add the indicator "Cow".
          But I don't need it if already open indicator "Shepherd".
          1) How can I find in the indicator "Cow" that the indicator "Shepherd" is already open? In the indicator "Shepherd" already has all the functions I need.
          2) How can I close the indicator "Cow" correctly?
          Application.Current.Shutdown() <== this does not completely remove the indicator. He remains on the list.
          I could not find it myself, even in the "GetType ()" method.
          My questions are still relevant.
          Sorry for my bad english.
          Last edited by Udimuz; 05-27-2019, 11:41 AM.

          Comment


            #6
            Hi Udimuz, thanks for your reply.

            If you are trying to remove indicators from a chart, that would not be possible through an indicator. The indicator adding/loading is a part of the NT user interface and core code that can not be viewed or modified. I would be able to submit a feature request if this is what you were looking to do.

            I look forward to your reply.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            581 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            338 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            103 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            554 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            552 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X