“ATR Based Trendlines – JD”: Trendlines Angled by How Fast Price Moves
When you draw trendlines by hand, the hardest call is usually the angle. You can connect two highs, sure, but until that second high prints, there is nothing to connect. ATR Based Trendlines – JD fills that gap with a different idea.
Every time a swing high or swing low (a pivot) is confirmed, the indicator draws a single sloped dotted line starting from that point. The angle is not set by a second high. It comes from the ATR (Average True Range) at that moment. Think of it as a projection extending to the right of the pivot: “if price keeps moving at this market’s average pace, this is roughly where it should be.”
What ATR Based Trendlines – JD Draws on the Chart
Each time a pivot is confirmed, one new sloped dotted line is added, anchored to that pivot.
Vowars DE ver.3.23.1
The visual is about as clean as it gets. As in Figure 1, swing highs get a green dotted line sloping down to the right, and as in Figure 2, swing lows get a purple dotted line sloping up to the right. No labels, no arrows, no dashboard. Dotted lines are the only thing it puts on your chart.
And as Figure 3 shows, once a line is drawn it keeps extending to the right edge. Lines stack up over time, so you can go back and check how an older line has been interacting with current price.
It is a helper tool that draws trendlines automatically. It does not print buy or sell signals.
The green line is “the path price would take from the high if it kept falling at an ATR-sized pace.” The purple line is “the path from the low if price kept rising at the same pace.” Reading which side of that path price breaks out to is the core way to use this indicator.
The Angle Comes from ATR. That Is What Sets It Apart from Other Auto Trendlines
Most auto-trendline indicators build lines by connecting previous highs to highs and lows to lows. ATR Based Trendlines – JD never looks for a second point. It anchors to a single pivot and calculates the angle from there based on volatility.
ATR Sets the Angle of the Line
The angle is not arbitrary. It is calculated from the ATR on the bar where the pivot is confirmed.
Vowars DE ver.3.23.1
Here is the math on default settings. On the bar where the pivot is confirmed, it measures ATR(15) and tilts the line by 0.15× ATR for every bar. As Figure 2 shows, over the 15 bars it takes to confirm the pivot, that works out to a drop of exactly 2.25× ATR. The purple line on the low side uses the same angle, just pointing up.
You do not need to memorize the formula. Just remember this: the more volatile the market, the steeper the line, and the quieter the market, the flatter it gets.
Same Settings, Different Angle Depending on Volatility
Two market phases with identical settings. The only difference is volatility, in other words the size of ATR.
Vowars DE ver.3.23.1
The figure uses the exact same settings on both sides. The only difference is volatility. On the right, where ATR in the lower pane is roughly twice as high, the slope of the line is roughly twice as steep too.
Lines you draw yourself tend to get pulled toward whatever “looks clean.” This indicator sets the angle the same way every time, based on volatility, so everyone ends up with the same line. That is the part I appreciated most.

Zoom out and this becomes obvious. On the weekly chart, the purple line drawn back when price and ATR were still low is almost flat, while the lines drawn after the range expanded stack up at steep angles. Same settings throughout; the change in market “speed” shows up directly in the angle.
Lines Appear 15 Bars After the Pivot. Watch How Historical Charts Look
If there is one thing to understand before using ATR Based Trendlines – JD, it is when the lines actually show up. A pivot needs 15 bars to its right before it is confirmed. In other words, the line is not drawn when the high prints. It only appears 15 bars later.
Lines Are Drawn 15 Bars After the Pivot
The line is not drawn when the high prints. It appears on the bar where 15 bars to the right have formed and the pivot is confirmed.
Vowars DE ver.3.23.1
At Figure 1, there are only 14 bars to the right, so the high has not been confirmed as a pivot yet. Once the 15th bar closes at Figure 2, a line anchored to the high from 15 bars earlier is drawn in one go, as shown in Figure 3.
Once confirmed, the line starts exactly at the high. Scroll back through history and it looks like the line was there right after the top, but in reality you could only see it 15 bars later. When you check how well lines held on past charts, do not count any price action before the bar where the line actually appeared.
Once a line is drawn, its position and angle never change. It is calculated only from confirmed bars; the backward drawing is simply because the line is anchored to the pivot bar.
The live, still-forming bar is a slightly different story. While the 15th bar is still moving, the pivot can be confirmed and then invalidated depending on price, so a line may briefly appear and then disappear. Waiting for the bar to close before acting is the safer approach.
If you want to see the timing for yourself, TradingView’s Bar Replay is handy. Step forward one bar at a time and you will see the line pop up 15 bars after the pivot. How far back you can replay depends on your plan and timeframe.
How to Read It on the Chart: Focus on the Bar That Breaks the Line
Once you know what the lines mean, it is clear where to look. The green line is “the path from the high if price kept falling at an ATR-sized pace.” If price closes above it, the selling has slowed down more than expected. The purple line is the mirror image: a close below it means the rally is losing pace.
Watch for the Bar That Closes Through the Line
The line is a guide for “where price would be if it kept moving at an ATR-sized pace.” The bars that break away from that guide are the ones worth reading.
Vowars DE ver.3.23.1
In Figure 1, price closes above the downward-sloping green line. The selling pressure eased and a bounce followed. Figure 2 is the opposite: price closes below the upward-sloping purple line, right where the rally’s pace broke down.
ATR Based Trendlines – JD itself does not mark the breakout bar or fire an alert. The ▲▼ in the figure were added for illustration; on a real chart you read the relationship between the close and the line yourself.
1 Set the higher-timeframe bias first
On the 4H or daily, check whether the most recent line is green or purple, and which line price is trading inside of. If price is still below a downward-sloping green line, the selling pace is still intact.
2 Wait for a candle close through the line
Ignore candles that only poke the line with a wick; what matters is whether the bar closes through it. Also note whether the breakout candle was a big bullish or bearish bar or a small one that just crept past the line. That gives you a feel for the momentum behind the move.
3 Treat the broken line as a key level
The line stays on the chart after it is broken. Whether price comes back to a broken green line and holds it, or gets rejected under a broken purple line, is useful input for your next entry.

Testing it on the 4H chart, there was a case where price ripped higher right from the big bullish candle that broke the downward-sloping green line. In setups like this, keeping the line’s angle and the ATR at the time it was drawn in mind makes it easier to compare how strong the move is. That said, it does not play out this way every time; sometimes price gets pushed right back after breaking the line. Always confirm with other evidence.
The Four Settings and How to Tune Them
There are only four settings. Few as they are, one of them affects both pivot detection and the angle, so after the table we will go through them one by one.
| Setting | Default | Suggested | Effect |
|---|---|---|---|
| loockback length pivots | 30 | 30 (a solid baseline from 1H to daily). 40–60 for fewer lines, around 20 for faster reactions | The range used to find pivots: this many bars to the left and half as many to the right are checked for the swing high or low. It also sets the ATR length (half the bars) and the slope multiplier. Higher values mean fewer lines, slower confirmation, and steeper angles |
| atr target percentage | 100 | Start at 100. 50–75 for flatter lines, around 150 for steeper ones. With lookback at 60, around 50 keeps the angle close to default | Multiplier (%) applied to the line’s slope. 50 halves the angle and 200 doubles it. Does not affect pivot detection. Setting it to 0 gives horizontal lines |
| Draw lines from wicks (checked) or real bodies (unchecked)? | Checked | Checked. Uncheck it if you do not want sudden long wicks to affect the lines | Checked uses wick tips (high/low) as pivots; unchecked uses candle bodies (the higher or lower of open and close). The angle calculation is unchanged, so the line just shifts in parallel with the anchor |
| checked = monochrome lines, unchecked = direction colored lines? | Unchecked | Unchecked. Check it if the lines are hard to see when stacked with other indicators | Unchecked draws high-side lines in green and low-side lines in purple. Checked draws every line in a single teal color |
loockback length pivots Moves Pivots, ATR, and Angle Together
loockback length pivots (spelled exactly as it appears in the settings, with one extra “o” in lookback) sets the range used to find pivots. With the default of 30, the highest (or lowest) bar within 30 bars to the left and 15 bars to the right becomes the pivot.
Three Things loockback length pivots Controls
This setting affects not only the pivot search range but also the ATR length and the angle of the lines.
Vowars DE ver.3.23.1
The easy thing to miss is that this setting also drives the ATR length and the slope coefficient. As Figure 1 shows, raising the value also raises the multiplier relative to ATR, so lines get steeper. At 20 you get 10 bars on the right, ATR(10), and 0.10× ATR per bar; at 60, 30 bars on the right, ATR(30), and 0.30× ATR per bar.
Go higher and only the major swing highs and lows remain, so you get fewer lines, but you also wait longer for confirmation. Go lower and you get more lines and faster reactions, at the cost of lines drawn from minor wiggles. Start with the default 30, then nudge it to 40–60 if there are too many lines, or around 20 if there are too few.
atr target percentage Only Adjusts the Angle
atr target percentage is a multiplier applied to the calculated angle. 100 is the baseline, 50 halves the slope, and 200 doubles it.
Tuning the Angle with atr target percentage
Same chart, only atr target percentage changed. The value works directly as a multiplier on the angle.
Vowars DE ver.3.23.1
In Figure 1, at 50 the lines are flatter and price needs a solid move to break them. A break carries more weight, but you notice it later. In Figure 3, at 200 the slope is so steep that price slips outside the line almost immediately.
Since it has no effect on pivot detection, a good order is to set the number of lines with loockback length pivots first, then fine-tune just the angle here. Fun fact: setting it to the minimum of 0 removes the slope entirely, so you get horizontal lines from each pivot. That is handy if you want recent swing highs and lows as horizontal levels.
Say you want to raise loockback length pivots to 60 to keep only the major swings, but keep the angle close to default. In that case, lower atr target percentage to around 50 and the multiplier relative to ATR goes back to the default 0.15×.
Draw from Wicks or from Candle Bodies
Draw lines from wicks (checked) or real bodies (unchecked)? is checked by default, which uses the wick tips as pivots. Uncheck it and pivots are based on the higher of the open and close (or the lower one on the low side).
Draw from Wicks or from Candle Bodies
The Draw lines from wicks… setting switches whether pivots are taken from wicks or from candle bodies.
Vowars DE ver.3.23.1
The angle calculation does not change, so as in Figure 2, the line simply shifts in parallel by the distance the anchor moved. The difference is small in this example, but on symbols that tend to print long wicks, or on a high that spiked briefly right after a news release, the anchor moves by the full length of that wick. If you do not want random wicks throwing your lines around, try unchecking it and compare.
Switch to Single-Color Lines
checked = monochrome lines, unchecked = direction colored lines? removes the green/purple color coding and draws every line in a single teal color. Useful when you are stacking other indicators and the chart gets busy. The slope already tells you the direction, so once you are used to it, one color is easy to read.
Example Settings by Goal
Here is a summary of setting combinations by goal. Treat these numbers as starting points; the right values vary by symbol and timeframe, so adjust while watching the chart.
| Goal | loockback length pivots | atr target percentage | Draw from wicks |
|---|---|---|---|
| Start with the default look | 30 | 100 | Checked |
| Only see major swings (swing trading) | 50–60 | 100 | Checked |
| Only major swings, angle close to default | 60 | 50 | Checked |
| Faster reactions (lower timeframes) | 20 | 100 | Unchecked |
| Only catch strong bounces or pullbacks | 30 | 50–75 | Checked |
| See recent highs/lows as horizontal levels | 30 | 0 | Checked |
Which Timeframes and Markets It Suits
Because pivots need 15 bars to the right to confirm, lower timeframes produce more lines, and each one carries less weight.

On the 1-minute chart, line after line appeared within just a few hours. Confirmation 15 bars later is only 15 minutes on the 1m, so it reacts fast, but it also spawns lines from small noise. If you scalp with it, filtering helps, for example only paying attention when the line agrees with the direction of the higher-timeframe lines.
Personally, I found it easiest to read from the 1H up to the daily. On the daily, the 15 bars needed for confirmation are about two weeks in crypto, which trades on weekends, and about three weeks in forex or stocks. That may feel slow, but in exchange you only get lines drawn from meaningful swing highs and lows.

On the daily, there were cases where pullbacks bottomed out near a purple line drawn from a swing low. Whether price bounces near a trendline is something traders watch closely, just like with hand-drawn lines.
It works on any market. Because ATR sets the angle, you get the same kind of line on high-volatility assets like Bitcoin and on lower-range FX pairs like USD/JPY or EUR/USD. On trend-prone markets such as gold or stock indices, watching whether price respects the green or the purple lines more makes it easier to read the overall market tone.
Where It Shines and Where to Keep Expectations in Check
Where It Shines
- No more second-guessing the angle; lines that match current volatility are drawn automatically
- Lines can be compared on the same basis in both volatile and quiet markets
- Once drawn, lines never move, so you can backtest on historical charts with confidence
- Works on any symbol or timeframe, and with only four settings there is little to learn
Keep Expectations in Check
- Lines appear 15 bars after the pivot (default), so they can be too late for sharp reversals
- In choppy markets lines get broken quickly, so breakouts mean less
- No markers or alerts on the breakout bar, so you have to read the close versus the line yourself
- As lines pile up, you need a good eye to pick the ones that still matter
Most of the drawbacks come from waiting for pivot confirmation. Speed and reliability are always a trade-off, so the key to getting the most out of this indicator is finding the sweet spot for your timeframe with loockback length pivots.
Check What Is Behind the Breakout Bar with Balance of Power
ATR Based Trendlines – JD only tells you whether price broke the line. Whether the breakout bar was a strong bullish candle or one that barely scraped past the line with a long upper wick is something you have to judge from the candles yourself. To put a number on that, I added TradingView’s built-in Balance of Power in a lower pane.
Checking the Breakout Bar with Balance of Power
Balance of Power shows whether buyers or sellers won out inside the very bar that broke the line.
Vowars DE ver.3.23.1
Balance of Power shows, on a scale of −1 to +1, whether buyers or sellers won out within a single bar. The more a bar closes above its open and near its high, the closer it gets to +1. The bar that broke above the green line in Figure 1 shows a BOP of around +0.6 in Figure 2, which reads as a breakout where buyers were firmly in control. The bar that broke below the purple line in Figure 3 also shows a deeply negative BOP.
On the flip side, if the breakout bar’s BOP sits near 0, price barely closed through the line while buyers and sellers were evenly matched inside the bar. With breakouts like that, there is no harm in waiting to see how the next few bars play out. Both tools work one bar at a time, which made them a natural fit for focusing on the bar that breaks the line.
If you want to explore other combinations, here are a few candidates.
- Vortex Indicator uses two lines to show whether upward or downward movement is in control. Checking whether a line break lines up with the two lines crossing over, a shift in control, gives you an extra layer of confirmation that the market tone is changing.
- Volatility Stop plots an ATR-based stop line that flips direction when price crosses it. Since ATR Based Trendlines – JD has no exit guide of its own, it works as a stop-loss reference after you enter on a line break.
Things to Know Before You Use It
There Are No Built-In Alert Conditions
ATR Based Trendlines – JD has no alert conditions, so you cannot get a “price broke the line” notification from the indicator alone. If you want notifications, draw a trendline with TradingView’s drawing tools on top of the indicator’s line and set an alert on that drawing. Drawn trendlines support alerts that trigger when price crosses them.
Old Lines Disappear from the Left
Lines keep stacking up as they are drawn, but there is a limit to how many lines one indicator can display. ATR Based Trendlines – JD does not set its own limit, so it uses TradingView’s default of roughly 50. Beyond that, the oldest lines are removed automatically, so if you view a long history, the left side of the chart may have no lines at all.
The Lines Are a Guide, Not a Guarantee
The lines are mechanically calculated paths based on ATR, not a reason for price to bounce there. Naturally, a bar that breaks a line can just as easily stall out. Do not make trading decisions on this indicator alone; combine it with the higher-timeframe trend, horizontal levels, and volume.
On default settings, after 15 bars the line has moved exactly 2.25× ATR(15). Add TradingView’s built-in ATR with a length of 15 and read its value on the bar where the line appeared, and you can calculate exactly how steep the line will be. Checking the line’s behavior by hand like this also makes it easier to decide which lines to trust.
An ATR-Based Trendline That Reads the Market’s Pace
ATR Based Trendlines – JD keeps drawing lines from each pivot that say “if price moves at this market’s typical speed, it should pass through here.” It works differently from regular two-point trendlines: because volatility is built into the angle, you can compare lines on the same basis in both volatile and quiet markets.
ImageLines show up 15 bars after the pivot, so there is some delay, but once drawn they never move, which makes backtesting on historical charts straightforward. There are just four settings, and tweaking two of them, loockback length pivots and atr target percentage, is enough to fit the lines to your timeframe.
If you second-guess the angle every time you draw a trendline, or worry that your lines are too subjective, add this indicator to your chart and compare its lines with the ones you draw by hand.









