Announcement

Collapse
No announcement yet.

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 cjanau, Today, 11:07 AM
            0 responses
            8 views
            0 likes
            Last Post cjanau
            by cjanau
             
            Started by TrendFollowingCapital, Today, 05:53 AM
            0 responses
            10 views
            0 likes
            Last Post TrendFollowingCapital  
            Started by TrendFollowingCapital, Today, 05:38 AM
            0 responses
            7 views
            0 likes
            Last Post TrendFollowingCapital  
            Started by John Bogui, Today, 03:57 AM
            2 responses
            41 views
            0 likes
            Last Post John Bogui  
            Started by Dolfan, 12-30-2020, 12:04 PM
            9 responses
            72 views
            0 likes
            Last Post timko
            by timko
             
            Working...
            X