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

Swing Indicator Mean?

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

    Swing Indicator Mean?

    Is it possible to plot the mean of the Swing high/low values? I'm looking for something similar to the Donchian Channel mean, except it would be the Swing H/L values that would determine the mean output. Any thoughts? Thanks.

    #2
    Hi MiniDowTrader,

    Yes, swing source code is available through Tools > Edit NinjaScript menu. You can save copies of your own by right clicking > Save as. Median is typically (High + Low) / 2.

    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Wow! 466 lines of code.

      Can someone help me out with where and what I'd need to input to get the median of the Swing H/L values?

      Thanks!

      Comment


        #4
        Hello MiniDowTrader,

        If you have limited time or programming capabilities, you can discuss your requirements with any of our NinjaScript consultants.
        Click here for a list of certified NinjaScript Consultants

        We will leave this thread open and allow other users to offer their input or advice here.
        MatthewNinjaTrader Product Management

        Comment


          #5
          Originally posted by MiniDowTrader View Post
          Wow! 466 lines of code.

          Can someone help me out with where and what I'd need to input to get the median of the Swing H/L values?

          Thanks!
          You will require custom coding.

          Your requirement is not clear. How do you mean the median of the Swing H/L values?
          • Just take all the swing high values and all the swing low values and find the median?
          • Find the median of all the swing highs and all the swing lows separately?
          • Find the median of the actual swings from each extreme to the next?
          • ???

          Comment


            #6
            Thanks Matthew.

            koganam, what I'm looking for is a line that indicates the 50% retrace of the subsequent swing high/low or low/high. This line would appear once the next high/low appears therefore showing the median of the last H/L or L/H. It would continue making the line until the next swing high/low was created then a new median line is created.

            Please see attached image. Blue line would represent the median of the swing low to high. But it would not appear until the swing high is created.
            Attached Files
            Last edited by MiniDowTrader; 09-15-2011, 07:08 PM.

            Comment


              #7
              Originally posted by MiniDowTrader View Post
              Thanks Matthew.

              koganam, what I'm looking for is a line that indicates the 50% retrace of the subsequent swing high/low or low/high. This line would appear once the next high/low appears therefore showing the median of the last H/L or L/H. It would continue making the line until the next swing high/low was created then a new median line is created.

              Please see attached image. Blue line would represent the median of the swing low to high. But it would not appear until the swing high is created.
              Have you written any code to try to do this yourself, which does not quite do it right, or are you looking to have a complete indicator coded?
              Last edited by koganam; 01-10-2016, 03:15 PM. Reason: Corrected grammar.

              Comment


                #8
                I have next to no coding experience of than simple modifications.

                Unless I can get help with modifying the existing Swing indicator, I may have to use some other resources to build a new indicator.

                Comment


                  #9
                  Originally posted by MiniDowTrader View Post
                  I have next to no coding experience of than simple modifications.

                  Unless I can get help with modifying the existing Swing indicator, I may have to use some other resources to build a new indicator.
                  The existing Swing() indicator recalculates/replots the past, so that what you see visually is not really what you get.

                  It will be easier to write another indicator that calls the Swing() indicator for its exposed properties, and uses same to calculate the median value that you require.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  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
                  4 views
                  0 likes
                  Last Post Javierw.ok  
                  Started by timmbbo, Today, 08:59 AM
                  2 responses
                  10 views
                  0 likes
                  Last Post bltdavid  
                  Started by alifarahani, Today, 09:40 AM
                  6 responses
                  40 views
                  0 likes
                  Last Post alifarahani  
                  Started by Waxavi, Today, 02:10 AM
                  1 response
                  19 views
                  0 likes
                  Last Post NinjaTrader_LuisH  
                  Working...
                  X