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 Hwop38, 05-04-2026, 07:02 PM
      0 responses
      160 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      308 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      245 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      349 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      179 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X