Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator Output as another inidcator input

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

    Indicator Output as another inidcator input

    Hi:

    I am new to Ninjatrader indicator development but am familiar with C#. With Ninjatrader 7 is it possible to use the output of one custom indicator as the input of another custom indicator?

    This forum is great! Many thanks for any help you can give.

    Chris

    #2
    Hi chisound,

    Yes, it certainly is.

    For example, if you have one indicator with a plot named Plot1, you can call it from another indicator...
    Code:
    double Variable1 = CustomIndicator1Name().Plot1[0];

    As for getting started with programming, check out the following links
    NinjaScript Overview


    Developing Custom Indicators


    Developing Custom Strategies


    And our forum samples at - http://www.ninjatrader-support2.com/...splay.php?f=30
    And tips at - http://www.ninjatrader-support2.com/...splay.php?f=31
    TimNinjaTrader Customer Service

    Comment


      #3
      Thanks Tim, great!

      Comment


        #4
        Hi Tim:

        I am having a bit of a problem calling the output of one indicator from another indicator. Here is the code I am using from my second indicator to call the output from my first indicator. The first indicator is called Ratio and it has a plot also called Ratio

        double Spread = Ratio().Ratio[0];

        I am getting the following error when I compile.

        "No overload for method 'Ratio' takes '0' arguments" . The error code is CS1501.

        Any ideas??

        Thanks

        Comment


          #5
          Hi chisound,

          Most indicators require arguments as well, for example, the Bollinger requires a standard deviation, and a period
          Code:
          double smatest = Bollinger(2, 14).Upper[0];
          Once you type
          Code:
          double Spread = Ratio(
          you will see the required arguments, and optional overloads.
          More on the intellisense at - http://www.ninjatrader-support.com/H...l?Intellisense
          TimNinjaTrader Customer Service

          Comment


            #6
            It may be a little late to reply to this thread but earlier tonite I arrived here searching for the same thing and by way of example will post what finally worked for me in NT 7.

            I wanted to use the D9ParticleOscillator rawtrend output series as input to another instance of the D9ParticleOscillator and finally discovered I could use Strategy Wizard to show me how to code it.

            To make a longish story short the D9ParticleOscillator function looks like this with the rawtrend output series selected:

            d9ParticleOscillator(Period, Phase).RawTrend

            and the combined function like this:

            d9ParticleOscillator(d9ParticleOscillator(Period, Phase).RawTrend, OuterPeriod, OuterPhase).RawTrend

            In other words it appears that if an indicator is of the form

            Indicator(parameter1,parameter2, ..., parameterN)

            to use a data series "Indicator2_Series" other than the default (e.g., price) as input, the format is

            Indicator(Indicator2_Series,parameter1,parameter2, ..., parameterN)
            Last edited by bnichols; 01-18-2011, 02:35 PM.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            574 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            332 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            553 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            551 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X