Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

how to load an indicator programmatically from within another indicator

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

    how to load an indicator programmatically from within another indicator

    Folks,

    I have two custom indicators. I'll call the first one REVEAL - it shows some information about the loaded security, in a separate panel (so it is not an overlay).

    A second one, I'll call it BOLTON, is essentially an overlay onto REVEAL - BOLTON portrays additional information that supplements what is shown by REVEAL.

    According to my own rules, BOLTON should only be shown in the context of a loaded REVEAL indicator.

    If neither of my custom indicators is loaded yet in a chart, and if my customer tells NinjaTrader to load the BOLTON indicator, are there Ninjascript API calls I can make, in my BOLTON custom indicator code, to automatically, programmatically load a REVEAL indicator too?

    #2
    Hi dween, thanks for writing in. The Strategies have the AddChartIndicator() method where you can add indicator objects to the chart. This method is not available through other indicators, so one must create the indicator object (IndicatorA) in the indicator (HostIndicator), call AddPlot() within HostIndicator and fill that plot with the IndicatorA values instead.



    Kind regards,
    -ChrisL

    Comment


      #3
      Thanks for the reply. So either one indicator (HostIndicator) has to plot all the data for both indicators (HostIndicator and IndicatorA), or, I need to explore a Strategy. Is that right?

      Comment


        #4
        Hi dween , that is correct. Please let me know if you have any questions.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        649 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        370 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        109 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        574 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        576 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X