Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Load indicator only once per chart window

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

    Load indicator only once per chart window

    Hello, how can I prevent the indicator from being added twice in my indicator code? I want it to be possible to load the indicator only once per chart window.

    Click image for larger version

Name:	Screenshot_3.jpg
Views:	319
Size:	22.6 KB
ID:	1167544
    sidlercom80
    NinjaTrader Ecosystem Vendor - Sidi Trading

    #2
    Hello sidlercom80,

    Thanks for your post.

    Can you clarify if this is a strategy that is adding the indicator?

    If not can you clarify the steps to recreate?

    Comment


      #3
      Hello _PaulH, it's a manually added indicator. I would like to prevent an indicator from being manually added to a chart several times. Can I do this via an attribute or similar?
      Click image for larger version

Name:	Screenshot_1.jpg
Views:	293
Size:	69.7 KB
ID:	1167584
      sidlercom80
      NinjaTrader Ecosystem Vendor - Sidi Trading

      Comment


        #4
        Hello sidlercom80,

        Thanks for your reply.

        There would be no way to prevent the indicator from being selected and added to the chart.

        The best we can suggest is to loop through ChartControl.Indicators in State.DataLoaded, and flip a bool that the indicator was already added, so that instance does nothing but informs the user it is a duplicate.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        566 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
        547 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        548 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X