Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to get the intermediate values of an inclied line in the chart

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

    How to get the intermediate values of an inclied line in the chart

    Hello!!
    I was wondering the best way to know the Price values of the intermediate bars of an inclined line that is plotted in the chart.
    Is there any hint you may provide me?
    Thank you very much!!!
    FVJ

    #2
    Hello efeuvejota01,

    To do that you would need to use math, there is a sample of finding a value in the middle of a rays projection in the following link:

    Comment


      #3
      If you remember (or can be reminded of) the formulas y = mx + b and m = (y2 - y2) / (x2 - x1) from middle or high school algebra, then you have everything you need to know to find the value of any point along a line. Using two points, you can solve for m using the slope formula (the second one). Then, using the now known value of m and one of the points, you can solve for b using the point-slope formula (the first one). Now that you know both m and b, you can plug in an arbitrary value of x into the point-slope formula with your known m and b and determine the corresponding value of y. If the line is vertical, that is a special case - in that case m will be +/- infinity in the slope formula, and all of the x will be the same. Alternatively, given two points you could do it like this by combining the two formulas: y - y1 = (y2 - y1)(x - x1)/(x2 - x1) to skip straight to solving for y for a given x, assuming you have two (x,y) points, and assuming x2 <> x1.
      Bruce DeVault
      QuantKey Trading Vendor Services
      NinjaTrader Ecosystem Vendor - QuantKey

      Comment


        #4
        Thank you Bruce!! already done!!
        FVJ

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        597 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        343 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        556 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        555 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X