Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    Chris L.NinjaTrader Customer Service

    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 Max238, Today, 01:28 AM
      4 responses
      36 views
      0 likes
      Last Post Max238
      by Max238
       
      Started by r68cervera, Today, 05:29 AM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by geddyisodin, Today, 05:20 AM
      1 response
      11 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by timko, Today, 06:45 AM
      2 responses
      14 views
      0 likes
      Last Post NinjaTrader_ChristopherJ  
      Started by habeebft, Today, 07:27 AM
      0 responses
      7 views
      0 likes
      Last Post habeebft  
      Working...
      X