Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Calculating a point on the Andrew’s Pitchfork

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

    Calculating a point on the Andrew’s Pitchfork

    I thought it should be possible to calculate a point on the pitchfork, but I can’t get the math to line up. Maybe someone could help.
    I have three points on the attached chart:
    • B (20, 1056.75)
    • C (28, 1052.25)
    • D (37, 1055)
    Here are the steps that I took.
    Step 1
    I am calculating the midpoint between C and D. This seems to work fine.
    Step 2
    Between B and my new midpoint, I am calculating slope using this formula:
    • M = (midpointY – By) / (midpointX – Bx)
    This also appears valid.
    Step 3
    Since I now have slope, I thought that I could use y=mx+b to find a point from my C or D point. However, it is always off.
    Questions
    Am I missing something? I thought this would work, but is this not possible because of the scale differences between X and Y?
    What formula does NT use to draw the pitchfork? Is that available?
    Thanks for your help!

    Attached Files

    #2
    moflaherty, unfortunately the NT used formula is proprietary and not available.

    Are you checking each calculation step with Print outs to confirm the calculated values?

    If you believe it's a scale issue, in NT7 we have an option to work on a fixed pricescale.

    Comment


      #3
      Math

      Yes, I have had one of my employees who is a math nut check it. I will play with it some more, but how you are calculating your lines is not obvious. If you are saying that the NT Andrew's Pitchfork calculations are not industry standard and something that you cooked up in-house, that is a huge concern for what I am trying to do.

      Comment


        #4
        moflaherty, unfortunately the underlying calculation can't be accessd, but we're offering industry standard calculation methods - standard, Schiff and modified Schiff - please check into those, too and see if the values then align as you would expect.

        Comment


          #5
          Extending Lines on a Chart

          OK, I think I have the math down now. I have read more about Andrew's Pitchforks than I thought I ever would.

          I can draw lines on the Andrew's Pitchfork (see attached.) However, is there a way to draw a line that fits the size of the chart? Like a horizontal or vertical line? The line API does not appear to support it (unless I am missing something.)

          Thanks!
          Attached Files

          Comment


            #6
            Hello,

            Are you trying to draw the highlighted lines or some other line? Sorry, I am confused as to what you want.
            DenNinjaTrader Customer Service

            Comment


              #7
              Extending Lines

              I am trying to extend the highlighted lines across the entire chart similar to the horizontal and veritical lines.

              Comment


                #8
                Correct, Extend right / left is unfortunately not supported for the DrawLine() methods, you would need to custom code this via the supplied endBars value. With NT7 you could also then draw into the future as potential projections -

                Comment


                  #9
                  Nt7

                  What is the call in NT7 that this can be done with?

                  Comment


                    #10
                    You can use the regular Draw object calls and use the overloads then that offer to pass in the anchor poins as DateTime's (as there's no negative current bar index forward)

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    574 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    333 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    101 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    553 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    551 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X