Skip to main content
AuctionFoundry
Menu

INDICATOR MANUAL

Chart pattern indicatorClassical Auto Chart Patterns [AFD] · full manual · published to TradingView

Read fifteen classical formations found from confirmed pivots, the state each one has reached, and the Entry, Target and Stop geometry your own settings draw once a formation completes.

58 documented settingsPublished on TradingView · Aug 25, 2026

Start here

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

Eleven of the fifteen names are built from two boundaries — rising and falling channels, rising and falling wedges, ascending, descending and symmetrical triangles, rectangles, flags and pennants. Each boundary joins two same-side confirmed pivots and has to pass a three-part test before it is drawn at all: both anchors on the same side, no bar between them piercing the line, and no bar since the second anchor violating it. What separates one two-boundary name from another is mainly the two slopes and whether the boundaries converge, diverge or run parallel.

The remaining four are anchored differently. Double top, double bottom, head and shoulders and its inverse use two or three matched extrema and a single neckline rather than two boundaries, and a top pattern can complete only downward through its neckline — a close through the other side finishes nothing.

The label carries two separate ideas and keeps them apart on purpose. The conventional reading — Bullish, Bearish or Two-Sided, with Continuation, Reversal or Bilateral — is attributed to the classical literature and describes the shape’s name. Closed Above or Closed Below is this script’s own observation of the confirmed close that completed the formation. On a bullish-named shape that broke down the two disagree, and the completed label keeps the one a bar actually produced while the textbook reading moves to the hover text.

A formation is Forming, Completed or Expired, and each state has its own line style. Forming display ships off, so a fresh chart opens showing formations that already ended rather than shapes still developing. Expired formations stay available so the chart is not only the ones that completed.

Fresh-install defaults15 documented defaults

Swipe or scroll horizontally to see every column.

Classical Auto Chart Patterns fresh-install defaults
AreaDefaultResult
PresetBalancedCarries five geometry values together — pivots searched, search window, and the boundary, flat and parallel tolerances. None of the five is separately editable, and selecting Balanced changes nothing.
Swing strength8Bars required either side of a pivot to confirm it, and therefore the delay before a boundary anchored on it can be drawn. Stays editable under every Preset.
ATR14The volatility unit used to normalize slopes and tolerances. The R cap does not read this input.
Formation familiesAll eight onChannels, Flags, Pennants, Triangles, Rectangles, Wedges, Tops & Bottoms and Head & Shoulders are all built. A family switched off is never built, so it never completes and never alerts.
Draw formations while they are formingOffA fresh chart shows completed and expired formations only. A hidden forming formation still forms, still completes or expires, and still alerts.
Completed / Expired formations kept1 / 0Recency windows for finished formations, not contests between families.
Show entry and exit levelsOnDraws Entry, Target and Stop against every completion and fills the levels table.
Gate levels on % CompleteOff · band 80–100Off, every completion is given levels. The band is greyed out and governs nothing until the switch is on; % Complete is elapsed bars, so it selects on age and nothing else.
Target 1 / 2 / 3 (R)0.25 · 0.5 · 1.0Your own multiples of R, drawn beyond Entry in the direction of the completing close. Nothing requires Target 2 to sit beyond Target 1.
Stop at structureOn · Stop (R) 0.3 inactivePuts the Stop on the formation’s own opposite boundary read at the completing bar, floored at 0.5R. The label prints the distance it landed at, in R.
R cap (× daily ATR)1.0Caps R at one average true range of the last seven daily bars. A formation shorter than the cap keeps its own height; 0 turns the cap off.
Show position sizeOffNo money figure appears until you state what one setup may risk.
Show levels tableOn · SmallLists every retained completed formation as a column, oldest first, from the same frozen fields the labels read.
Formation names · Hover notesName + reading · OnA forming label states the name and the attributed reading; a completed label states the name and which boundary it closed beyond, with the reading on the hover.
Alert detailBriefThe formation, symbol, timeframe and what happened. Full and JSON add the frozen level prices; none of the three carries an action, signal or order field.

How it works

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

Confirmed pivots and the delay that follows

Pivots are confirmed, never provisional, so a boundary cannot exist until Swing strength bars after the pivot anchoring it. Formations therefore appear late by design — a shape drawn on an unconfirmed pivot is one that can be withdrawn, and a drawing that vanishes is worse than one that arrives late.

Boundary validity

A candidate line joining two same-side confirmed pivots is admitted only when no bar between the anchors pierces it and no bar since the second anchor has violated it. A pair the classifier cannot name is discarded rather than drawn under a generic label.

Where a formation starts and stops

Each boundary begins at its own first anchor, but the shaded formation covers only the stretch both boundaries share, so its left edge is the later of the two. A forming shape is projected forward and stops where it stops being that shape — at the apex where two boundaries converge, or where a parallel-sided one would leave the width band that named it.

Three states, three line styles

Forming is solid, family-colored, and follows price at the right edge. Completed is dotted and stops at the bar its completing close finished beyond a boundary or neckline. Expired is dimmer and dashed and stays on the chart. The styles are fixed in the source and are not settings.

Four ways to expire, one of which renames instead

A formation runs past its own apex, drifts outside the width band that named it, outlives its own span, or — for a flag or pennant only — stops being brief. That last case usually renames rather than ends it: the shape reverts to the channel or triangle its geometry already is and goes on, expiring only if that family is switched off or the underlying shape has itself run out.

Admission switches against display filters

The eight family switches are tested at admission, so a family switched off is never built and never alerts. Conventional reading and Conventional category are tested at drawing, so a formation they hide still forms, still completes and still alerts. Both apply at once and the narrowest wins, which is why an enabled family can still draw nothing.

% Complete is age, not quality

Bars since the formation’s left edge over bars to whichever bound will end it, so it reaches 100% on the bar the shape runs out and never a bar short of it, whether or not price broke a boundary. A formation at 90% is an old one, not a better one. It climbs every bar with one exception — a flag or pennant renamed to the longer-lived shape underneath it re-bases against that longer life and falls once.

Levels are configured geometry

Entry is the confirmed close that completed the formation, R is the formation’s own height under the cap, the targets are your own multiples of R, and the Stop is either that same R or the shape’s own opposite boundary. They measure nothing about outcomes, and that sentence travels with every level label whether or not Hover notes is on.

The projection arrow follows the attribution

The arrow always points the attributed conventional direction, forming and completed alike, never the direction the completing close took. Because it is the graphic form of that attribution it draws only where the attribution is readable — a completed formation therefore needs a non-Off label and Hover notes on together. A two-sided name draws no arrow at any stage.

One higher-timeframe request, and only for the cap

Below a daily chart, the R cap reads the average true range of the last seven completed daily bars, requested with the offset-by-one-bar form together with lookahead — the pairing TradingView documents as the non-repainting one. At daily and above the requested figure is discarded and the cap reads the chart’s own last seven bars instead. No other calculation reads a timeframe other than the chart’s own.

Output and state reference8 documented states

Swipe or scroll horizontally to see every column.

Classical Auto Chart Patterns outputs and states
Output or stateWhen it appearsMeaning
FormingBoth boundaries confirmed, or all anchor pivots for a neckline patternThe shape is named and drawn solid, following price at the right edge. Hidden by default; hiding it changes nothing about detection.
Completed · Closed AboveConfirmed close beyond the upper boundary or above the necklineThe formation is drawn dotted to that bar. Entry, R and the level prices freeze there.
Completed · Closed BelowConfirmed close beyond the lower boundary or below the necklineThe same record in the other direction. On a bullish-named shape this and the conventional reading disagree on purpose.
ExpiredApex passed, width band left, span outlived, or a flag or pennant that stopped being briefDrawn dim and dashed and kept on the chart, so the record is not only the formations that completed.
Conventionally Bullish / Bearish / Two-SidedThe formation’s nameAttributed to the classical literature and describing the name, not a forecast for this chart.
Continuation / Reversal / BilateralThe formation’s nameThe same attribution on the second axis. Both are drawing filters, so hiding one does not stop a formation being found.
Level reachedA confirmed bar after completion whose high or low touches a frozen level priceThe level records the clock time it was reached. An unmarked level means only that no confirmed bar has reached it yet, never that it failed.
Levels withheldGate levels on % Complete is on and the completion falls outside the bandNo Entry, target, Stop, zone, arrow or size, a dash down every level row, and an alert carrying no prices. The formation is still found, drawn, named and alerted.

Settings

The 58-input reference follows the seven settings groups: Detection, Formations · Continuation & Bilateral, Formations · Reversal, Formations shown, Trade levels, Display and Alerts. Inputs shown greyed in the panel — the % Complete band while its gate is off, Stop (R) while Stop at structure is on — are listed with the values they hold while inactive.

Detection3 inputs

Swipe or scroll horizontally to see every column.

Detection settings and defaults
SettingControlDefaultChoices, limits & availability
PresetpresetInputChoice / textBalancedStrict · Balanced · Permissive
Swing strengthswingInputWhole number8Min 1 · Max 50
ATRatrLenInputWhole number14Min 1 · Max 200
Formations · Continuation & Bilateral10 inputs

Swipe or scroll horizontally to see every column.

Formations · Continuation & Bilateral settings and defaults
SettingControlDefaultChoices, limits & availability
Channel colorchanColorInputColor#31BFA5—
ChannelsshowChannelsInputToggleOn—
Flag colorflagColorInputColor#E86FA8—
FlagsshowFlagsInputToggleOn—
Pennant colorpennColorInputColor#C2C24E—
PennantsshowPennantsInputToggleOn—
Triangle colortriColorInputColor#4C9BF2—
TrianglesshowTrianglesInputToggleOn—
Rectangle colorrectColorInputColor#B07CF0—
RectanglesshowRectanglesInputToggleOn—
Formations · Reversal6 inputs

Swipe or scroll horizontally to see every column.

Formations · Reversal settings and defaults
SettingControlDefaultChoices, limits & availability
Wedge colorwedgeColorInputColor#E8A33D—
WedgesshowWedgesInputToggleOn—
Tops and bottoms colortopsColorInputColor#DE8A5A—
Tops & BottomsshowTopsInputToggleOn—
Head and shoulders colorhsColorInputColor#64B5CD—
Head & ShouldersshowHSInputToggleOn—
Formations shown5 inputs

Swipe or scroll horizontally to see every column.

Formations shown settings and defaults
SettingControlDefaultChoices, limits & availability
Conventional readingbiasInputChoice / textAllAll · Bullish · Bearish · Two-sided
Conventional categorycategoryInputChoice / textAllAll · Continuation · Bilateral · Reversal
Draw formations while they are formingshowFormingInputToggleOff—
Completed formations keptkeptInputWhole number1Min 0 · Max 10
Expired formations keptexpiredKeptInputWhole number0Min 0 · Max 10
Display8 inputs

Swipe or scroll horizontally to see every column.

Display settings and defaults
SettingControlDefaultChoices, limits & availability
Formations drawndrawnInputWhole number2Min 1 · Max 9 | Conditional
bydrawnByInputChoice / textNearestNearest · Newest · Tallest · Longest | Conditional
Expired formationsexpiredColorInputColor#8A8F98Conditional
Shade the area between the boundariesfillInputToggleOn—
Formation nameslabelModeInputChoice / textName + readingOff · Marker · Name · Name + reading
Label placementlabelPlaceInputChoice / textRight columnOn the shape · Right column
Hover noteshoverNotesInputToggleOn—
Projection arrows and legsprojArrowInputToggleOn—
Trade levels25 inputs

Swipe or scroll horizontally to see every column.

Trade levels settings and defaults
SettingControlDefaultChoices, limits & availability
Show entry and exit levelsshowLevelsInputToggleOn—
Gate levels on % CompletepctGateOnInputToggleOffConditional
betweenlevelGateInputWhole number80Min 0 · Max 100 · Step 5 | Conditional
andlevelCapInputWhole number100Min 0 · Max 100 · Step 5 | Conditional
Target levelstargetTiersInputWhole number3Min 1 · Max 3 | Conditional
Target 1 (R)targetRInputDecimal0.25Min 0.05 · Max 10.0 · Step 0.05 | Conditional
Target 2 (R)targetR2InputDecimal0.5Min 0.05 · Max 20.0 · Step 0.05 | Conditional
Target 3 (R)targetR3InputDecimal1.0Min 0.05 · Max 30.0 · Step 0.05 | Conditional
Stop at structurestopStructInputToggleOnConditional
Stop (R)stopRInputDecimal0.3Min 0.1 · Max 10.0 · Step 0.1 | Conditional
R cap (× daily ATR)rCapMultInputDecimal1.0Min 0.0 · Max 10.0 · Step 0.25 | Conditional
Show prices on level labelslevelPriceInputToggleOnConditional
Once a level is reachedonCloseInputChoice / textClearKeep · Clear | Conditional
Levels drawn forlevelsForInputChoice / textNewest onlyNewest only · All | Conditional
If a level is not reachedunreachedInputChoice / textRemove itRemove it · Fade it | Conditional
Target zonetargetColorInputColor#8C66FFConditional
Stop zonestopColorInputColor#D9453DConditional
Show position sizesizingInputToggleOffConditional
Risk budgetriskBasisInputChoice / textAmountAmount · Percent | Conditional
Amount per setupriskAmtInputDecimal0.0Min 0.0 · Step 50.0 | Conditional
Account sizeaccountInputDecimal0.0Min 0.0 · Step 1000.0 | Conditional
Percent per setupriskPctInputDecimal1.0Min 0.0 · Max 100.0 · Step 0.05 | Conditional
Show levels tableshowTableInputToggleOnConditional
Table position and sizetablePosInputChoice / textTop rightTop left · Top center · Top right · Mid left · Mid center · Mid right · Bottom left · Bottom center · Bottom right | Conditional
Levels table position and sizetableSizeInputChoice / textSmallTiny · Small · Normal · Large | Conditional
Alerts1 input

Swipe or scroll horizontally to see every column.

Alerts settings and defaults
SettingControlDefaultChoices, limits & availability
Alert detailalertDetailInputChoice / textBriefBrief · Full · JSON

Alerts and limitations

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

2 fixed alert conditions

Formation admitted

Both boundaries confirmed for a two-boundary shape, or all anchor pivots confirmed for a neckline pattern. Carries no prices, because none exist yet.

Formation completed

A confirmed close finished beyond a boundary or the neckline. Under Full or JSON detail it carries the frozen Entry, Stop and enabled Target prices.

Limits to keep visible

  • Formations are found from confirmed pivots only, so one appears some bars after the pivot that anchors it. TradingView classes pivot-based scripts as potentially misleading for exactly this, and this one is in that category.
  • It draws into the past and does not revise a drawing in place. The left end of a boundary means confirmed later, not known then — a finished chart shows lines reaching onto bars where the script had not drawn them yet.
  • Nothing is scored, graded or ranked. The By dropdown beside Formations drawn allocates display slots among forming shapes from current geometry and puts no position or figure on a drawing.
  • The levels are configured geometry, not measured outcomes. Nothing in the script measures a level as likely to be reached, and an unmarked level is not a failure.
  • The keep counts are recency windows rather than per-family quotas. Flags and pennants must pass a duration test and a pole test on top of their geometry, so they end far less often and rarely occupy the most recent slots — switch the other families off or raise the counts to see them.
  • Cup and handle, harmonic patterns and higher-timeframe context are out of scope for this build. Nothing reads a timeframe other than the chart’s own except the daily range that caps R.
  • A replay measuring drawn-object revision was run against an earlier build and the shipping build has not been re-run, so the non-repainting design is disclosed rather than claimed as a proven replay result.
  • Position size is off by default, converts no currency, rounds down to whole units, and never adds two sizes together. It is arithmetic on figures you supplied and the instrument’s own point value.

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 is the chart empty when every family is switched on?

The two drawing filters apply on top of the family switches and the narrowest one wins. Conventional reading set to Bullish with Conventional category set to Bilateral share no name at all, and Rectangles on with the category set to Continuation draws no rectangle because the only name that switch builds is filed as bilateral. The formations are still found underneath, and still alerting.

Why do I see no formations still developing?

Draw formations while they are forming ships off, so a fresh chart opens showing formations that already completed or expired. Turn it on to watch shapes develop, and expect one to disappear again if it expires before completing.

Why have I never seen a flag or a pennant?

Completed and Expired formations kept are recency windows rather than contests, and flags and pennants must pass a duration test and a pole test on top of their geometry, so they end far less often and the most recent handful of completions is almost never one of them. Switch the other families off, or raise the two keep counts, and they appear.

Why did a completed formation’s arrow disappear?

A completed label states the name and which boundary it closed beyond, not the conventional reading, so the hover is the only place that attribution is left. The arrow is the graphic form of that attribution, so a completed formation needs a non-Off Formation names setting and Hover notes on together; turning off either withdraws the arrow and its leg. A two-sided name draws no arrow at any stage.

Why do formations of different heights show the same distance to Target?

The R cap is binding. R is capped at your multiple of the average true range of the last seven daily bars, and because the cap is a daily quantity while a formation’s height is a chart-timeframe one, the lower the chart timeframe the more often the cap rather than the shape sets R. Raise the multiple, or set it to 0, to give the shape’s own height back.

Why did a completion get no Entry, Target or Stop?

Gate levels on % Complete is on and that completion fell outside the band. Its row shows a dash down every level line and its alert carries no prices, which is an absence rather than a marker. The formation is still found, drawn, named and alerted. Setting the band to 0 and 100, or switching the gate off, withholds nothing.

Why is a table column still there after its levels vanished?

A column outlives its levels but not its formation. Clearing a reached level or narrowing Levels drawn for deletes the level drawing and keeps the row; hiding that formation’s kind, or the platform’s own limit on how far back a drawing can reach, takes the row with it.

Why does the label say Bullish when price closed down through the shape?

Those are two different statements and the script keeps them apart. The conventional reading describes the shape’s name and is attributed to the literature; Closed Above or Closed Below is the script’s own observation of the bar that completed the formation. When they disagree the completed label keeps the one a bar actually produced.

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.