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 lmatiukas, Today, 07:09 PM
            0 responses
            1 view
            0 likes
            Last Post lmatiukas  
            Started by ComfyCouch, Today, 06:04 PM
            0 responses
            9 views
            0 likes
            Last Post ComfyCouch  
            Started by Ousher, Today, 04:35 PM
            0 responses
            4 views
            0 likes
            Last Post Ousher
            by Ousher
             
            Started by Rugosoft, 11-17-2020, 08:22 AM
            3 responses
            37 views
            0 likes
            Last Post Shansen
            by Shansen
             
            Started by hpolthof, Today, 03:48 PM
            0 responses
            7 views
            0 likes
            Last Post hpolthof  
            Working...
            X