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 voltation, Today, 04:32 PM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_ShawnB  
            Started by coopgrafik, Today, 03:44 PM
            2 responses
            23 views
            0 likes
            Last Post coopgrafik  
            Started by cionjay, Today, 02:36 PM
            1 response
            9 views
            0 likes
            Last Post NinjaTrader_Kate  
            Started by onnb1, Today, 02:08 PM
            1 response
            10 views
            0 likes
            Last Post NinjaTrader_Jim  
            Started by omermirza, Today, 01:15 PM
            4 responses
            20 views
            0 likes
            Last Post omermirza  
            Working...
            X