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 Mindset, 04-21-2026, 06:46 AM
        0 responses
        92 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        138 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        68 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        122 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        73 views
        0 likes
        Last Post PaulMohn  
        Working...
        X