As I have answered, use the maths of a line "y = m * x + c". Do some research on the web about it.
Forum on trading, automated trading systems and testing trading strategies
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
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.)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
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?