# How to find price where two trendline intersect?

I was studying wolphe waves

and i was trying to find how can i find the price where two trendline intersect

i can look back the bars but how to look bars forward?

Arpit T: I was studying wolphe wave and i was trying to find how can i find the price where two trendline intersect. i can look back the bars but how to look bars forward?
Use maths. The equation for a line is "y = m*x + c". Solve for "x" where the "y" of both lines are equal.

Fernando Carreiro #:
Use maths. The equation for a line is "y = m*x + c". Solve for "x" where the "y" of both lines are equal.

how to get objprop_time for bar which is not formed on chart ? We can get bar of back using iBarShift but how to do it for bars which is not developed

Arpit T #: how to get objprop_time for bar which is not formed on chart ? We can get bar of back using iBarShift but how to do it for bars which is not developed

As I have answered, use the maths of a line "y = m * x + c". Do some research on the web about it.

Experts: Safe Trend Scalp

Fernando Carreiro, 2022.04.24 12:00

y = m * x + c

Let y = price
Let x = bar index

[price] = m * [index] + c

Given:

Price at Index 9 is 105 (10th bar)
Price at Index 1 is 100 (2nd bar)

Therefore:

m = Δy / Δx = (105 - 100) / ( 9 - 1 ) = 5 / 8 = 0.625

c = y - m * x = 105 - m * 9 = 100 - m * 1 = 99.375

Equation:

y = 0.625 * x + 99.375

[price] = 0.625 * [index] + 99.375

Example:

What is trend-line price at bar index 5?

[price @ 5] = 0.625 * 5 + 99.375 = 102.5

Arpit T #: how to get objprop_time for bar which is not formed on chart ? We can get bar of back using iBarShift but how to do it for bars which is not developed

You don't. You have to assume that all bars exist. What if there are no ticks during a specific candle period? There can be minutes between ticks during the Asian session, think M1 chart. Larger charts, think weekend, market holiday (country and broker specific), requires knowledge of when your broker stops and starts (not necessary the same as the market.)

Reason: