Skip to main content
AuctionFoundry
Menu

INDICATOR MANUAL

Automatic trend channel indicatorAuto Trend Channels [AFD] · full manual · published to TradingView

Read parallel channels built from three confirmed swing pivots, find the bar each one became usable, and follow it through the break, retouch and return that came after.

Download the Auto Trend Channels user manual (PDF)

33 documented settingsPublished on TradingView · Sep 11, 2026

Start here

What the indicator does, the questions it can help answer, and its fresh-install defaults.

Auto Trend Channels [AFD], shown as ATCH [AFD] on the chart, joins three confirmed swing pivots into exact parallel geometry. A rising channel runs its lower boundary through two rising swing lows and its upper boundary parallel through the swing high between them; a falling channel is the mirror. There is no regression fit and no approximate parallel.

Every bar between the first and last anchor is checked against the boundaries. A candidate is rejected if any bar pokes past one by more than the Containment allowance, or if the channel is narrower than Minimum width or wider than Maximum width. All three are multiples of an average true range frozen at construction, so a channel’s tolerances never move afterwards and never rescue a candidate that failed.

A validated candidate is not yet a channel. It waits up to twenty bars for a confirmed close between its raw boundaries. That close is the acceptance bar, and a dotted vertical Known line marks it on the drawing. Left of the marker is where the geometry came from; right of it is the part that was available.

The script is free and open-source on TradingView under MPL-2.0. It reads only the chart’s own bars — no higher-timeframe request, no volume, no external data.

Fresh-install defaults9 documented defaults

Swipe or scroll horizontally to see every column.

Auto Trend Channels fresh-install defaults
AreaDefaultResult
Swing length / Longer swing channel8 / offOne layer on the chart timeframe. A pivot confirms eight bars after it prints.
Pivots searched / Search and age horizon10 / 600Ten recent pivots per side per construction; a channel is retired once its first anchor passes 600 bars.
Volatility window / Containment allowance14 / 0.10A fourteen-bar average true range, frozen per channel, sizes every allowance. Bars may poke a tenth of it past a boundary.
Minimum / Maximum width0.50 / 8.0In frozen ranges. Minimum above Maximum is an invalid setting and draws a corner warning.
Close allowance / Return watch0.0 / 20Any confirmed close beyond a boundary starts the watch, which runs twenty bars for a close back inside.
Retained channels3Finished and watching channels kept drawn across both layers. Hidden channels keep running their watch and still alert.
Midpoint / Quarter lines / Channel labels / Channel fillon / off / on / onA dotted halfway line, every label the script draws, and shading inside the active channel only.
Corner table / Status panel / Panel positionon / Off / Top rightThe standing disclosure alone. The table is a chart overlay; Top left covers the chart’s own legends.
Colour theme / Label position / Label sizeSignature / On line / TinyNine themes set the rising, falling and history colors together. Custom frees the three pickers.

How it works

How the indicator turns chart data into the states and drawings you see.

How a channel is built

A swing high is strictly above every high within Swing length bars on both sides; a swing low is the mirror. Equal highs or lows do not qualify, and a bar that is both is excluded. The last anchor must sit at least twice the swing length after the first. Where several opposite pivots lie between them, the one furthest from the line joining them becomes the parallel’s anchor.

Acceptance, and the Known marker

A channel is drawn only after a confirmed close lands between its raw boundaries. If no close lands inside within twenty bars, or thirty-two newer candidates on the same layer displace it, the candidate is discarded and nothing is drawn. One layer holds one active channel at a time, and an intact active channel is never replaced by a newer candidate however good the newer geometry looks.

Break, watch and return

The first confirmed close beyond a boundary by more than the Close allowance starts a return watch. The channel goes dashed, takes the history color, loses its shading and keeps extending. A close exactly on a boundary is inside. The break frees the layer’s active slot at once, so a new channel can be accepted while the old one is watched. A confirmed close back between the boundaries within the window finishes it as Returned inside; a channel that returns never becomes active again.

Boundary retouch

During the watch, the first later bar whose high or low reaches the broken boundary while its close stays outside receives a one-time mark. It is recorded once per channel, never counted, compared or rated, and it changes nothing about the channel’s state. A channel with no retouch mark is not saying anything.

Ageing out

Once a channel’s first anchor passes the Search and age horizon it is retired and leaves the chart, in whatever state it was. Ageing is not a break and produces no event. A finished or watching channel that has not aged stays drawn up to the Retained channels count, newest first; retention is display only.

Reading the drawing

Color says whether a channel is live and stroke style says whether it is broken. The endpoint label sits at the channel’s midpoint price in both label positions, never on a boundary, and reads the direction and the state. Event labels sit at the bar that produced them, offset by a fixed fraction of the channel’s frozen volatility from whichever is further out, the boundary or that bar’s own high or low, so none is drawn over its own candle.

The corner table

One table sits in the chosen corner and carries the standing disclosure over two lines. It is a chart overlay, so it covers whatever is in that corner: Top left sits under the chart’s own symbol and indicator legends and leaves them hard to read. Status panel widens it to a per-layer row with the state, the live upper, mid and lower prices, the watch count and an inventory of drawn sets. Corner table off removes the whole table; two blocking warnings still draw alone, because they explain an otherwise blank chart.

The optional second layer

Longer swing channel adds a second layer on the same chart timeframe, using Swing length multiplied by Longer swing multiple. It draws one width step heavier and slightly fainter so the two stay tellable apart. A channel already accepted on one layer is not accepted again on the other. It ships off and has not been observed running on the published build.

Output and state reference6 documented states

Swipe or scroll horizontally to see every column.

Auto Trend Channels outputs and states
Output or stateWhen it appearsMeaning
ActiveA confirmed close landed inside the validated geometrySolid, shaded and extending to the current bar. A description of geometry price has respected, not a call on the next bar.
Watching above / belowA confirmed close cleared a boundary by more than the Close allowanceDashed and in the history color, still extending while the watch runs.
Boundary retouchThe first later bar to reach the broken boundary with its close still outsideA one-time mark on that channel. Never counted, compared or rated.
Returned insideA confirmed close back between the boundaries within the watch windowThe channel is finished with its right edge frozen at the return bar.
Watch endedThe watch window passed with no close back insideThe channel is finished with its right edge frozen where it ended.
Known markerThe acceptance barA dotted vertical line stating where the usable part of the drawing starts.

Settings

All 33 inputs are listed below in their four source groups. Every input carries a tooltip in the settings dialog, and each tooltip ends with a concrete example of what changing that input does. Greyed-out controls are inactive because the switch that governs them is off.

Detection9 inputs

Swipe or scroll horizontally to see every column.

Detection settings and defaults
SettingControlDefaultChoices, limits & availability
Swing lengthswingInputWhole number8Min 2 · Max 30
Longer swing channellongerInputToggleOff—
Longer swing multiplemultipleInputWhole number3Min 2 · Max 4 | Conditional
Pivots searchedpoolInputWhole number10Min 3 · Max 12
Search and age horizonhorizonInputWhole number600Min 100 · Max 2000
Volatility windowvolatilityInputWhole number14Min 5 · Max 100
Containment allowancecontainmentInputDecimal0.10Min 0.0 · Max 0.50 · Step 0.05
Minimum widthminWidthInputDecimal0.50Min 0.10 · Max 5.0 · Step 0.10
Maximum widthmaxWidthInputDecimal8.0Min 1.0 · Max 20.0 · Step 0.50
Lifecycle2 inputs

Swipe or scroll horizontally to see every column.

Lifecycle settings and defaults
SettingControlDefaultChoices, limits & availability
Close allowancecloseInputDecimal0.0Min 0.0 · Max 1.0 · Step 0.05
Return watchwatchInputWhole number20Min 1 · Max 50
Display18 inputs

Swipe or scroll horizontally to see every column.

Display settings and defaults
SettingControlDefaultChoices, limits & availability
Retained channelsretainedInputWhole number3Min 0 · Max 10
MidpointmidpointInputToggleOn—
Quarter linesquartersInputToggleOff—
Channel labelslabelsInputToggleOn—
Anchor markersanchorsInputToggleOffConditional
Forming channelformingInputToggleOff—
Corner tabletableInputToggleOn—
Status panelpanelInputChoice / textOffFull · Disclosure only · Off | Conditional
Panel positionpositionInputChoice / textTop rightTop right · Top left · Bottom right · Bottom left | Conditional
Boundary widthboundaryInputWhole number2Min 1 · Max 4
Channel fillfillInputToggleOn—
Fill transparencytransparencyInputWhole number80Min 0 · Max 100 | Conditional
Colour themethemeInputChoice / textSignatureSignature · High contrast · Paper (light chart) · Muted · Colourblind safe · Monochrome · Warm · Cool · Custom
RisingrisingInputColor#26A69AConditional
FallingfallingInputColor#EF5350Conditional
HistoryhistoryInputColor#9AA0A6Conditional
Label positionlabelPosInputChoice / textOn lineOn line · Right of line | Conditional
Label sizelabelSizeInputChoice / textTinyTiny · Small · Normal | Conditional
Alerts4 inputs

Swipe or scroll horizontally to see every column.

Alerts settings and defaults
SettingControlDefaultChoices, limits & availability
FormationformationAlertInputToggleOn—
Close outsideoutsideAlertInputToggleOn—
Boundary retouchretestAlertInputToggleOn—
Return insidereturnAlertInputToggleOn—

Alerts and limitations

What can notify you, what can change the output, and what the indicator cannot establish.

Named alert conditions

Swing formed / Longer swing formed

A channel on that layer was accepted at the confirmed close.

Swing close above / below

A confirmed close cleared a boundary past the Close allowance and started the watch.

Swing boundary retouch

The one-time retouch mark was placed on a watched channel.

Swing returned inside

A confirmed close landed back between the boundaries inside the watch window.

Combined dynamic alert

One message listing every enabled event on the confirmed bar with its layer, the channel’s three anchor timestamps and the raw boundary prices.

Limits to keep visible

  • Channels appear late by design. A pivot confirms Swing length bars after it prints and a channel is drawn only after a close lands inside, so a new channel first appears drawn back over earlier anchors. The Known marker states where the usable part begins.
  • Linear-price geometry. Boundaries are parallel in price per bar, they are not log-space parallels on a logarithmic axis, and the script cannot detect the axis setting. Slope is per bar, so a channel keeps its slope straight across a weekend gap.
  • Standard time-based charts only. Renko, Kagi, Range, Point and Figure and tick charts are refused with a corner warning and draw nothing.
  • Reconstruction can change with the loaded history, the session, the data adjustment or any input. Whether this build repaints has not been observed on a replay and is not claimed either way; check the bar-replay tool on your own symbol and timeframe.
  • The corner table is a chart overlay and covers its corner. Top left sits under the chart’s own symbol and indicator legends.
  • Every verification row that turns on seeing the chart is unrun on the published build, and so are bar replay, realtime, alert delivery, the Longer swing layer, the Forming view and the eight non-default themes.
  • It is not a signal tool. No entries, exits, stops or targets, no channel graded or ranked against another, and no count converted into odds. A retouch is marked, never counted.

Troubleshooting

Start with what you see on the chart. Each answer explains the likely cause and the first setting, timeframe, or data condition to check.

Why are there no channels on my chart?

Check the corner table. It names the reason: too few confirmed pivots in the loaded history, no candidate that survived validation, or a nonstandard chart type. Minimum width set above Maximum width also draws its own warning and accepts nothing.

Why did a channel appear drawn back over old bars?

That is the confirmation delay, and it is disclosed rather than hidden. The pivots confirm Swing length bars late and acceptance waits for a close inside. The dotted Known line marks the bar the channel became usable; nothing left of it was available at the time.

Why was a good-looking channel never drawn?

A validated candidate still has to see a confirmed close land between its boundaries within twenty bars. A wick entering the channel accepts nothing. The candidate is also discarded if thirty-two newer candidates on the same layer displace it first.

Why did the whole channel disappear instead of turning grey?

It aged out. Once the first anchor passes the Search and age horizon the record is retired and leaves the chart in whatever state it was, with no event and no color change. Raise the horizon to keep older channels.

Why do the boundaries look wrong on my chart?

Switch the price axis to linear. The geometry is parallel in price per bar and the script cannot detect a logarithmic axis, so the boundaries are drawn correctly and displayed on a scale they were not built for.

Why is the corner table covering my symbol name?

The table is a chart overlay and Top left is where TradingView puts its own symbol and indicator legends. Move Panel position to one of the other three corners, or switch Corner table off; the two blocking warnings still draw.

Risk disclosure

Auction Foundry LLC provides educational charting tools and general market commentary only. This is not investment, financial, legal or tax advice, and nothing here is a recommendation, offer or solicitation to buy or sell any instrument. Auction Foundry is not registered with the SEC as an investment adviser, nor with the CFTC as a commodity trading advisor, and is not an NFA member.

Trading involves risk, including loss of principal. Losses can exceed a modeled stop and, for leveraged or margin products, can exceed the amount initially deposited or invested. Indicators can be wrong, delayed or unsuitable for your circumstances, and past or hypothetical results do not predict future results. Free access does not change any of this. Consider your objectives and consult a licensed professional before acting. Using these tools does not create an advisory or brokerage relationship.

Auction Foundry LLC is an independent publisher and is not affiliated with, endorsed by, or sponsored by TradingView, Inc. “TradingView” is a trademark of TradingView, Inc., used here only to identify the platform our scripts are published on. Scripts are published to TradingView as a community author on the same terms as any other author.

Read the full Risk Disclosure for the dated, versioned document this summarizes.