Trend

Auto Trendlines: Support and Resistance Lines

Auto Trendlines looks through the recent candles, joins swing lows into support lines and swing highs into resistance lines, and keeps the best of them. A line ends when price has closed beyond it for the number of candles you set.

Loading the live chart.

Close
–

Open the gold chart

What it shows

Thick lines on the price chart: green for support under the price, red for resistance above it. A line that has not been broken runs on to the right edge; a broken one stops where it was broken. Circles on the two anchor points are optional.

How Pravex works it out

  1. Look at the last 5,000 candles. Compute ATR(14) for the size of a normal candle range.
  2. Find swing points at two scales. Large swings are pivots with 25 candles on each side, and a swing is dropped when it differs from its neighbour by 5 × ATR or less. Small swings use 5 candles each side and 2 × ATR. Highs and lows alternate.
  3. A candidate line joins a swing to the next swing of the same kind (two steps on in that list). Highs make resistance lines, lows make support lines.
  4. Reject the candidate if any close between its two points is beyond the line: above a resistance line or below a support line.
  5. Look past the second point for a breakout: the line ends at the first candle after which the number of closes set for a break, in a row, are beyond it. With no breakout the line runs on to the latest candle. If that stretch would be more than twice the distance between the two points, the line is cut off at the second point.
  6. Count the touches: smaller 3-candle pivots on the same side that lie within half the average of the two points’ ATR values from the line.
  7. Rank the candidates. More touches wins, then a longer line, then a large over a small one, then a flatter slope. Of two lines of the same kind whose base parts overlap by more than 30%, only the better one is kept.
  8. With Both, a small line is dropped if it runs within the touch area of a large line the whole way.

Settings

SettingDefaultWhat changing it does
Closes needed to break3How many closes in a row beyond the line end it. A higher number lets a line survive brief pokes through it and run longer; 1 ends a line on the first close beyond it.
Which sizes to drawBothLarge looks only at the big swings (25 candles each side), Small only at the short ones (5 each side), Both draws large and small lines together.
Mark the anchor pointsoffPuts a small circle on the two swing points each line is anchored to.

How traders read it

Traders use a rising support line to judge whether a dip is still part of an up-move, and a falling resistance line the same way for a down-move. A touch that holds adds weight to the line; the touch count is part of how the study ranks lines.

The break is the other half of the story. When a line stops, price has closed beyond it for the number of candles you set for a break. Some traders wait for that, then watch whether the old line now acts from the other side.

Picture a support line (made-up example) runs under three lows on the hourly chart and price closes under it for three candles. The line stops there. A pullback to the same area that stalls below it is the retest breakout traders watch for.

When it misleads

It chooses the lines for you, and a different set of sizes or break count gives different lines from the same candles. A line is only good while its anchors are the two points you would pick; in a messy range the study can draw several short lines that cross, and none of them is worth acting on. The newest swings need candles on their right to be confirmed (up to 25 for the large scale), so the most recent lines may be based on older points. Lines are drawn by close, not by wick, so a wick through a line does not break it.

Questions and answers

How does Auto Trendlines pick the lines?

It joins each swing to the next swing of the same kind, throws out lines that a close has already crossed, counts the touches, and keeps the best one when lines overlap. Touches come first, then length.

Why do some trendlines run on to the right edge?

A line that no run of closes has broken yet stays open and carries on to the latest candle. A broken line stops at the candle where the run of closes completed.

How do I get fewer, bigger trendlines?

Set the sizes to draw to Large, which only uses swings of 25 candles on each side. Raising the closes needed for a break also lets each line live longer.

Why is a trendline on my chart cut short?

Either price closed beyond it for the number of candles set for a break, or the part after the second point would have been more than twice as long as the base, so Pravex stops it at the second point.

Related: Auto Pitchfork, Pivot Points High Low, Auto Fib Retracement, Auto Trend Detector, every indicator.

Not financial advice. Read our disclaimer.

Pro charts. Zero paywalls.

Charts for gold, oil, US indices and crypto, with every tool free to use.

Open the chart

No card, no trial, no upgrade pop-ups.