Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi series indicator

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

    Multi series indicator



    Hi,

    How should I add an existing indicator within a new one using NT7 ?

    I obtained an indicator from a vendor and I would like to access it from within a newly created indicator (or if not possible from a strategy). For instance to determine the Low in a certain period., etc

    In NT8 I would use OnStateChange and test if State equals State.DataLoaded to assign the indicator.

    NT8:
    Code:
    public class ClassNameIndicator : Indicator
        {
    
            private NinjaTrader.NinjaScript.Indicators.SomeIndicator SI1;
    
    ....
    
            protected override void OnStateChange()
            {
                if (State == State.SetDefaults)
                {....}
                else if (State == State.Configure)
                {
                 AddPlot(new Stroke(Brushes.Yellow), PlotStyle.Dot , "Dots");
    ...
               }
    
    else if (State == State.DataLoaded)
    
                {
    
                  // Instantiate the indicator
    
    
                SI1  =    SomeIndicator(Close, true, ..);

    How would I do this in NT7 ?

    #2
    Hello investor, thanks for your post.

    The OnStartUp() method can be thought of as the data loaded state in NT7. Declare SI1 at the class level the same way as in your code snipped, but call the constructor within OnStartUp.

    Kind regards.

    Comment


      #3
      Hi Chris,

      Thank you for your answer. It solved by problem

      Thanks!
      Tom

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      599 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      344 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
      558 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      557 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X