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

How to call another indicator

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

    How to call another indicator

    I would like to develop an indicator that uses the values of the "Swing (High/Low)" array or output. The Swing indicator tracks the historical values of pivot highs and lows within a given period and lookback timeframe. I know VB programming, but I don't know C# syntax very well. What is the method to call the Swing indicator to get the current value of the High and Low pivots from the OnBarUpdate code in my new indicator?

    Thank you!
    Bryan
    cassb
    NinjaTrader Ecosystem Vendor - Logical Forex

    #2
    Please ensure you are using NT6.5. In 6.5 we have exposed the Swing plot values for you to call.

    Code:
    Swing(5).SwingHigh[0];
    Swing(5).SwingLow[0];
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Excellent, thanks Josh. I have v6.0 still -- I thought 6.5 was still in beta?

      Sorry to bug people about C# syntax...still learning. ;-)

      Bryan
      cassb
      NinjaTrader Ecosystem Vendor - Logical Forex

      Comment


        #4
        Yes, 6.5 is still in beta.
        RayNinjaTrader Customer Service

        Comment


          #5
          Originally posted by Josh View Post
          Please ensure you are using NT6.5. In 6.5 we have exposed the Swing plot values for you to call.

          Code:
          Swing(5).SwingHigh[0];
          Swing(5).SwingLow[0];

          Just a question, if you want the most recent Swing High you use :
          Swing(5).SwingHigh[0] but if there's a way to obtain the prior Swing value.

          For example If I use the index [1] what value I obtain?

          Regards

          Comment


            #6
            An index of [1] will return the value of the swing high 1 bar ago. This could be the current swing high, or the prior one. To determine this, you would need to use:


            Swing(int strength).SwingHighBar(int barsAgo, int instance, int lookBackPeriod)

            this returns the number of bars ago a swing high pivot was found. Please see the detailed Help Guide in 6.5 for the Swing indicator.
            RayNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by jaybedreamin, Today, 05:56 PM
            0 responses
            2 views
            0 likes
            Last Post jaybedreamin  
            Started by DJ888, 04-16-2024, 06:09 PM
            6 responses
            18 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by Jon17, Today, 04:33 PM
            0 responses
            1 view
            0 likes
            Last Post Jon17
            by Jon17
             
            Started by Javierw.ok, Today, 04:12 PM
            0 responses
            6 views
            0 likes
            Last Post Javierw.ok  
            Started by timmbbo, Today, 08:59 AM
            2 responses
            10 views
            0 likes
            Last Post bltdavid  
            Working...
            X