In the shaped weights lesson, the least squares average read the end of a straight line drawn through the last few closes. This lesson is about that line itself, and six indicators built from it. The slope, the intercept and the angle. R-squared. The time series forecast. And the standard error. By the end, you'll know what each one measures, what units it's in, and why the angle reads the same on every market.
1 of 8
What you'll learn
- Work out the line of best fit. Find its slope, start and end from a few closes.
- Turn the slope into ticks a candle. Read the angle the same way on every market.
- Read the forecast as arithmetic. It carries the line on and knows nothing new.
- Score how straight the closes are. R-squared says how straight, not which way.
- Measure how far closes stray. Work out the standard error in ticks.
Exercise
- On the 5-minute practice chart in Wildflower, or any platform, take the closes of the last 5 One bar on a price chart. It shows where price opened and closed, and the highest and lowest it reached, in one stretch of time.More in the glossary.
- Work out the How far the line of best fit moves each candle. In Wildflower its level is in ticks a candle, and below zero is a falling line.More in the glossary as in the worked example, and turn it into The smallest step a price can move. On many stock index futures that’s 0.25 of a point.More in the glossary a candle for your market.
Practise this on Wildflower's free practice chart. It needs a free account.
Join waitlistQuick check
1. A line of best fit rises 1 tick a candle. What is its angle?
2. R-squared is 0.95. What does that tell you?
3. What is the time series forecast?
0 of 3 answered.
Finished this lesson?
Tick it off and keep your place
Read the full notes
The line of best fit is the straight line through the last closes with the smallest misses. Its slope is in ticks a candle, its angle in degrees (45 is one tick a candle on every market), R-squared says how straight the closes are, the forecast carries the line one candle on, and the standard error says how far closes stray.
- The The straight line through a set of closes that keeps their misses from it smallest, with each miss squared and added up. Its end is the least squares moving average.More in the glossary is the straight line through the last closes with the smallest misses, squared and added (least squares). It passes through the average close at the middle candle. Its end is the The end point of the straight line that best fits the last few closes. It has no lag on a straight climb and overshoots at turns.More in the glossary (Averages with shaped weights).
- Closes 5,000, 5,002, 5,005, 5,004, 5,009: average 5,004; How far the line of best fit moves each candle. In Wildflower its level is in ticks a candle, and below zero is a falling line.More in the glossary (8 + 2 + 0 + 0 + 10) ÷ 10 = 2 points a candle; line 5,000 to 5,008; Where the line of best fit starts: its value on the oldest of the closes it is drawn through. It is drawn on price.More in the glossary 5,000 (the oldest candle); end 5,008.
- The The line of best fit carried one candle further. It is arithmetic from the closes, not a prediction, and it is drawn on price.More in the glossary is the line carried one candle on: 5,008 + 2 = 5,010. It's arithmetic, not a prediction. On a steady climb, the close sits below it the whole way (Position and swing oscillators has the How far the close is from where a straight line through recent closes said it would be, as a percentage of the close.More in the glossary).
- In Wildflower the slope is in The smallest step a price can move. On many stock index futures that’s 0.25 of a point.More in the glossary a candle: 2 points on the A smaller version of a futures contract. It moves in the same steps as the full-size one, but each step is worth less, often a tenth as much.More in the glossary (tick 0.25) is 8 ticks.
- The The slope of the line of best fit as an angle from −90 to 90 degrees, measured in ticks a candle. 45 degrees is one tick a candle on every market.More in the glossary turns ticks a candle into degrees: 1 tick = 45° on every market, 2 = 63°, 4 = 76°, 8 = 83°, never 90. It isn't scaled by the range, as the The step of an exponential average turned into an angle from −90 to 90 degrees, scaled by the recent high-to-low range. Above zero the average rose, and below zero it fell.More in the glossary is, and it isn't the angle on your screen.
- How closely the closes sit on their line of best fit, from 0 (not at all) to 1 (exactly). It is trend strength multiplied by itself, so it says how straight, not which way.More in the glossary = How closely recent closes line up with time, from −1 to 1. Closes that rise by the same step every candle score 1, fall by the same step −1, and flat closes 0.More in the glossary squared, 0 to 1. 0.9 gives 0.81. It says how straight, not which way. The five closes: 1 − 6 ÷ 46 = 0.87 (Is the market trending or choppy?).
- The How far the closes stray from their line of best fit: the misses squared and added, divided by the number of closes minus 2, then square-rooted.More in the glossary = √(misses squared and added ÷ (closes − 2)): √(6 ÷ 3) = 1.41 points, 5.66 ticks. It divides by 2 fewer because the line was fitted to the same closes.
- On the made-up chart, the 20-candle R-squared was 0.94 at the top of the climb (8.1 ticks a candle), 0.15 sideways (at most 0.18 once all 20 closes were sideways) and 0.96 in the fall (−6.1 ticks a candle).
Worked example
Made-up numbersThe line through five closes
Made-up numbers · Micro S&P 500 · closes 5,000, 5,002, 5,005, 5,004, 5,009
- Average close 5,004, at the middle candle (number 2 of 0 to 4)
- Candle distances −2, −1, 0, 1, 2; close distances −4, −2, 1, 0, 5
- Multiply and add: 8 + 2 + 0 + 0 + 10 = 20. Divide by 4 + 1 + 0 + 1 + 4 = 10. Slope 2 points, or 8 ticks, a candle
- Line 5,000, 5,002, 5,004, 5,006, 5,008. Forecast 5,010
- Misses 0, 0, 1, −2, 1. Squared and added, 6. Standard error √(6 ÷ 3) = 1.41. R-squared 1 − 6 ÷ 46 = 0.87
The line rises 2 points a candle, fits the closes well but not exactly, and its next step is 5,010. That step is arithmetic, not a prediction.
Your turn
DrillMade-up numbers · Micro S&P 500 · tick 0.25 · slope 1.5 points a candle
Trading is risky. You can lose money. This lesson explains how trading works. It isn't advice.