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 ender_wiggum, Today, 09:50 AM
      1 response
      5 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by rajendrasubedi2023, Today, 09:50 AM
      1 response
      11 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by geotrades1, Today, 10:02 AM
      0 responses
      4 views
      0 likes
      Last Post geotrades1  
      Started by bmartz, Today, 09:30 AM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by geddyisodin, Today, 05:20 AM
      3 responses
      26 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Working...
      X