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

Is there a "reverse" for the swing function?

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

    Is there a "reverse" for the swing function?

    Hi,
    Is it possible to determine what swing strength a bar has?

    Thanks

    Thomas

    #2
    Hello Thomas,

    Thanks for your post.

    Regarding, "Is there a "reverse" for the swing function?" The swing method allows you to determine a swing high and a swing low. Can you clarify what you are referring to as a reverse?

    Regarding, "Is it possible to determine what swing strength a bar has?" I am not sure what this would be relative to.

    Can you post a screenshot of what you are trying to accomplish with both questions?

    Also, are you using the strategy builder or working directly in the ninjascript editor?
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hi Paul,

      I'm programming a proprietary indicator. I'd like to know e.g. what swing strength BarsAgo=10 has.
      I probably could do a loop comparing the high[BarsAgo] to high[BarsAgo-i] and high[BarsAgo+i] until I find a bar that has a higher high, but I thought there might be a more elegant method.

      Best regards

      Thomas

      Comment


        #4
        Hello Thomas,

        Thanks for your reply.

        I think what is confusing is the use of the terminology "swing strength". The method uses a strength setting as a means to determine a high (or a low). The strength setting specifies how many bars are required to confirm a High (or low) has occurred. I don't think this is what you are meaning by swing strength.

        Yes, you could loop through the swings to find the highest if that is the goal.

        If you are looking for the highest high bar you could always use HighestBar(): https://ninjatrader.com/support/help...highestbar.htm

        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Hi Paul,

          I have an indicator, that e.g. shows possible double bottoms with a swing strength >= 2.
          If I get a signal, it would be nice to know, what swing strength that swing has. This could be used to e.g rate/filter signals. Click image for larger version

Name:	2020-03-04_1734.png
Views:	342
Size:	32.7 KB
ID:	1089330

          Comment


            #6
            Hello Thomas,

            Thanks for your reply.

            Does the indicator use the NinjaTrader provided Swing Indicator? If so are you using multiple instances in your indicator, where one is set to a strength of 2 and the other is set to a strength of 5?

            If you are using a 3rd party swing indicator then likely you should check with that provider as my only references would be the platform provided Swing indicator.
            Paul H.NinjaTrader Customer Service

            Comment


              #7
              Hi Paul,

              Thanks for your reply. Yes, I'm using the "inbuilt" swing indi and it's also planned to use several instances of the indicator (with different swing strength, lookback and other settings).
              To provide the swing strength is probably only a concern for automated trading, as otherwise one can glance at the chart and see the differences.

              Thanks

              Thomas

              Comment


                #8
                Hello Thomas,

                Thanks for your reply.

                I am not aware of any methods that would help you to determine the swing strength of a bar using the Swing indicator.

                With several instances of swing using different strength settings, I would suspect that on one particular bar you would have more than one instance marking it as the swing point and perhaps the number of instances selecting that bar would give you what you are looking for?

                Paul H.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by thumper57, Yesterday, 04:30 PM
                7 responses
                22 views
                0 likes
                Last Post thumper57  
                Started by morrnel, Today, 06:07 PM
                2 responses
                18 views
                0 likes
                Last Post morrnel
                by morrnel
                 
                Started by sastrades, 05-10-2024, 09:59 AM
                3 responses
                55 views
                0 likes
                Last Post rc5781
                by rc5781
                 
                Started by guyonabuffalo, Yesterday, 10:01 PM
                2 responses
                22 views
                0 likes
                Last Post guyonabuffalo  
                Started by reynoldsn, 05-10-2024, 07:04 PM
                5 responses
                28 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Working...
                X