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 sjsj2732, 03-23-2026, 04:31 AM
      0 responses
      78 views
      0 likes
      Last Post sjsj2732  
      Started by NullPointStrategies, 03-13-2026, 05:17 AM
      0 responses
      313 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      315 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      149 views
      1 like
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      115 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Working...
      X