What an AI agent actually does when it analyses a crypto chart

Published 2026-08-02Updated 2026-08-02

Six stages, five of them arithmetic. How swing detection, geometric pattern matching, confidence scoring and a published weight table produce a chart reading — and where the language model is allowed to sit.

An AI agent analysing a crypto chart is doing one of two very different things, and the difference decides what its output is worth.

In the first design, a language model is shown a chart — as an image, or as a table of prices — and asked what it sees. In the second, a deterministic engine computes the indicators, finds the turning points, matches the geometry and produces the reading, and a language model is used only to put that finished reading into sentences.

Both get described as "AI chart analysis". Only one of them can tell you the same thing twice about the same chart. This is an account of how the second kind works, stage by stage, using the engine behind this site as the worked example.

The six stages

StageWhat happensModel involved
1. Fetch candlesPull the OHLCV series for one market and timeframe from a public exchange APINo
2. Compute indicatorsMoving averages, ADX, RSI, MACD, ATR, Bollinger, OBV, VWAP, Ichimoku, volume profileNo
3. Detect swingsReduce the series to alternating high/low pivotsNo
4. Match formationsTest the pivot sequence against eighteen geometric definitionsNo
5. ScoreCombine five weighted lanes into one composite readingNo
6. NarrateTurn the finished numbers into readable proseYes

Five of the six stages are arithmetic. The model enters at the last one, after every number that will appear on screen has already been fixed.

That ordering is the whole architecture. Everything below is an elaboration of why each stage is built the way it is, and what it costs when a stage is replaced by a model instead.

Stage 1 — Candles, and where they come from

The input is the OHLCV series: for each bar, the open, high, low, close and volume. Nothing else. No news feed, no social sentiment, no order-book depth.

The source is a public exchange REST endpoint, with a second exchange as fallback, and the set of markets that can be requested is a fixed whitelist rather than anything a URL can widen. A minimum of sixty bars is required before analysis will run at all, because every indicator below has a warm-up period and a reading computed on a half-populated moving average is worse than no reading.

This stage is boring, and it is the stage most worth being boring. A model asked to read a chart image has already lost this data — it is inferring prices from pixels, and it cannot recover the exact close of bar 47.

Stage 2 — Indicators

Standard definitions, computed directly from the series: moving averages and their structure, ADX with directional indicators, RSI, MACD, Stochastic, ATR, Bollinger bands and squeeze state, OBV, rolling VWAP, Ichimoku, and a volume profile over the last 120 bars.

There is one property here worth stating because it is easy to skip: the implementations are cross-checked against reference implementations rather than trusted because they look right. An RSI that is subtly wrong — the wrong smoothing, an off-by-one in the seed period — produces plausible numbers forever and silently corrupts everything downstream. Verification is what separates "we computed RSI" from "we computed something and called it RSI".

Stage 3 — Swings, not bars

Formations are matched against swing pivots, never against raw bars. This single decision removes an entire class of false positives: one spiky candle cannot create a pattern, because one candle cannot create a pivot.

Pivots come from a ZigZag walk. A candidate extreme is only committed once price reverses away from it by more than 2.5 × ATR(14), floored at 0.8% of price. Two consequences follow:

  • The threshold is volatility-relative. A fixed percentage would be far too loose on a quiet week for BTC and far too tight on a $0.30 altcoin. Scaling by ATR makes one setting behave sensibly across the whole whitelist.
  • Detection cannot start until ATR is defined. Before that the threshold would collapse toward zero, and a single wide bar could mint a pivot out of nothing.

Pivots strictly alternate high, low, high, low. And the most recent pivot is marked provisional — price has not yet retraced far enough to prove it. A provisional pivot may occupy only the last position of a formation, never the middle, so a shape cannot be built on a turning point that has not happened yet and then evaporate on the next bar.

That provisional rule is one of the clearest places where a deterministic engine differs from a model reading a picture. A model looking at a chart image has no concept of a pivot that is not yet confirmed. It sees a shape, and shapes in the rightmost part of a chart are exactly where wishful pattern-matching lives.

Stage 4 — Eighteen formations, defined geometrically

The recognised set splits into reversal and continuation shapes:

Reversal — double top and bottom, triple top and bottom, head and shoulders and its inverse, rounding bottom, cup with handle, rising and falling wedge.

Continuation — ascending, descending and symmetrical triangle, rectangle, bull and bear flag, bull and bear pennant.

Each is a set of geometric conditions on the pivot sequence. Four of those conditions are worth spelling out, because each one is a place where the obvious implementation is wrong.

Matching is scaled by formation height, not percent of price

"Two peaks within 3% of each other" sounds like a reasonable definition of a double top. It is a strong match on a formation spanning 20% of price, and completely meaningless on one spanning 4% — but a percent-of-price test scores them identically.

Peaks are instead required to agree to within roughly a fifth of the formation's own height. The test scales with the thing being measured.

Trendline quality uses worst-case residual, not r²

The intuitive quality measure for a trendline is r², the share of variance the line explains. It is the wrong measure here, and wrong in a way that specifically destroys the most valuable detections.

A horizontal trendline has almost no variance to explain. The flat resistance of a textbook ascending triangle — the single most recognisable continuation shape there is — scores r² near zero. Gating on r² rejects it.

The engine instead requires every touch to sit within 18% of the formation's height of its line. That behaves correctly for flat and sloping boundaries alike.

A rounded base has to beat a V

A parabola fits a sharp V-shaped reversal well enough (r² around 0.94) that no r² threshold can separate a rounding bottom from a V. So both models are fitted — a parabola, and two straight legs split at the low — and the shape is only called rounded if the parabola actually wins the comparison. A minimum sagitta, meaning how far the base sags below the chord joining its rims, additionally rules out the slow monotonic drifts that otherwise dominate the false positives.

Reversals must reverse something, at an extreme

A "double top" in the middle of a range is just three pivots in a row. Reversal formations are required both to follow a move in the opposing direction and to sit near an extreme of the preceding chart. Without that condition, a sideways market generates reversal patterns endlessly, all of them meaningless.

Confidence, and the threshold that decides what gets reported

Every detection carries a confidence between 0 and 1. It is a weighted mean of named components, and the components travel with the pattern and are rendered on screen, so the number is never a bare assertion.

ComponentWhat it measures
similarityHow closely the repeated tests match each other
magnitudeFormation height, in ATR
symmetryBalance of leg durations
volumeWhether volume behaved as the textbook expects
prior_trendWhether there was a move available to reverse
extremityWhether the formation sits at an extreme of the chart
completionWhether the decision line has actually broken
containmentWhether price respected the boundaries
upper_fit / lower_fitHow tightly the touches hug their trendline
roundness / sagittaCurvature evidence, for rounded bases

The default reporting threshold is 0.72, and it was chosen by measurement rather than taste. Ten textbook fixtures and forty independent 400-bar random walks were run through the detectors:

Textbook fixturesRandom walks
Median confidence≈ 0.88≈ 0.74
Weakest / strongest≈ 0.79 (min)≈ 0.80 (max)
Series producing any formation10 / 1014 / 40

Read the last column first. Fourteen out of forty pure random walks produced a formation the detector was willing to name. Pattern recognition finds patterns in noise, because that is what pattern recognition does.

Now read the tails. The best shape found in noise scores about as highly as the weakest genuine textbook fixture. The two populations separate cleanly at the median and overlap at the edges, and no threshold can fix that, because it is a real property of the problem rather than a bug. Genuinely ambiguous formations exist; suppressing them entirely would discard real ones alongside the noise.

The design choice that follows is to report ambiguous formations and score them low, rather than to hide them. 0.72 sits below the signal floor so imperfect real formations still surface, while the bulk of noise falls away. Both properties are pinned by tests — at most 40% of random walks may yield anything, and the median textbook confidence must stay above the 90th percentile of noise — so the threshold cannot quietly drift.

Silence is an answer, and a common one

Returning nothing is a valid outcome. On random-walk data the detectors stay silent on most series, and on real charts they are silent most of the time too.

This is the single most important behaviour to look for in any automated chart tool, and the hardest one to sell. A product that answers "no textbook formation is present" on a normal day is less engaging than one that always finds something. It is also the only kind that can be trusted on the day it does find something.

When several readings are valid at once

The same price action often supports more than one honest reading. A chart with flat resistance and rising lows genuinely contains a double top inside it.

Overlapping detections compete, and the winner is decided by confidence plus a small credit for how many pivots the reading accounts for — so "ascending triangle", which explains six pivots, beats "double top", which explains three, over the same stretch. The credit affects ordering only. The reported confidence is never altered by it, so the number displayed always matches its own component breakdown.

Stage 5 — Scoring, with the weights published

Five lanes are computed independently and combined into one composite reading.

LaneWeightWhat feeds it
Trend0.30Moving-average structure, ADX with directional indicators, Ichimoku position
Momentum0.25RSI, MACD, Stochastic
Pattern0.20The formation from stage 4, if any
Volume0.15OBV, position relative to VWAP, volume profile
Volatility0.10Position inside the Bollinger envelope, squeeze regime

The weights are exported and rendered next to the score rather than kept internal. A single number labelled "trend score" is only defensible if you can see exactly what produced it — and publishing the table has a second effect, which is that changing a weight becomes a visible product change rather than a silent tuning tweak.

The ordering has reasons. Trend dominates because the composite is explicitly a trend score. Momentum is the strongest independent confirmation of trend. Pattern is high-signal when a formation exists but is frequently absent, and it contributes a neutral 50 when nothing is detected — a larger weight would simply drag every score toward the middle on the majority of days when there is no formation at all. Volume corroborates price rather than leading it. Volatility is the least directional of the five and is deliberately the smallest term.

If a lane is missing, the composite is normalised by the weights actually present, so an absent lane rescales the remainder instead of quietly pulling the result toward zero.

Stage 6 — Where the language model finally appears

Everything above produced numbers. The model's job is to turn them into sentences, and nothing else.

It cannot change a level. It cannot rename a formation. It cannot invent a component score. It receives a finished structure and writes prose about it, and its output is validated against that structure before display.

The failure ladder is worth describing, because it says what the model is really for. If the model returns something that fails validation, it is retried once. If it fails again, the system falls back to a deterministic template sentence. If that is unavailable, the narration is simply absent — and the analysis still renders, because the analysis was never the model's to produce.

A component whose failure degrades the prose but not the numbers is a component that was never load-bearing.

What the two architectures can and cannot claim

Deterministic engine, model narratesModel reads the chart
Same chart, same answerYesNo
Published hit rates are reproducibleYesNot definable
Exact prices availableYesInferred, if reading an image
Can explain why a formation scored what it didYes, per componentPost-hoc explanation only
Handles a market it has never seenYes, same geometryYes, unpredictably
Can say "nothing is here" reliablyYes, by thresholdRarely, in practice
Recognises shapes nobody has definedNoSometimes

The last row is a genuine advantage of the model-first design and should not be waved away. A deterministic engine can only find the eighteen shapes somebody sat down and encoded. It will never notice the nineteenth.

But look at the second row, because it is the one that matters for anyone trying to evaluate these tools. A hit rate — the share of formations that resolved in their textbook direction — requires a fixed detection procedure to even be defined. If the procedure is "ask a model", there is no stable population of detections to measure, and any percentage published about it is unfalsifiable. That is not a criticism of the model's ability. It is a structural fact about what can be measured.

What this architecture does not do

Stated plainly:

  1. It does not forecast. It names what is on the chart now, and attaches what historically followed the same shape. Neither is a prediction, and the historical record is thin enough that it should not be read as one.
  2. It sees price and volume only. No news, no funding rates, no on-chain flows, no positioning. A chart-shaped answer is a chart-shaped answer.
  3. It cannot tell you whether a formation matters. Statistical significance is not something geometry can establish, which is why the sample counts are published separately.
  4. Eighteen shapes is a closed set. Anything outside it is invisible to the engine, however obvious it may be to a person.
  5. Determinism is not accuracy. Being consistently wrong is also consistent. Reproducibility is what makes a claim checkable; it is not what makes it correct.

Five questions to ask of any AI chart tool

  1. Which stage is the model in? If it produces the numbers, reproducibility is gone.
  2. What happens on a chart with no formation? A tool that always finds something has no threshold.
  3. Is the confidence broken down? A bare score with no components is an assertion.
  4. Are the scoring weights published? If not, the score can be retuned without anyone noticing.
  5. Can it show the hit rate, with sample counts and detection thresholds? If those three do not appear together, the rate cannot be evaluated.

In short

  • "AI chart analysis" describes two architectures with opposite properties. Which stage the model occupies is the question that separates them.
  • In this engine, five of six stages are deterministic arithmetic. The model writes prose about a finished result and can alter nothing.
  • Formations are matched on swing pivots, not bars, using thresholds scaled to volatility rather than to a fixed percentage.
  • The 0.72 confidence threshold was set by measuring textbook fixtures against random walks — where 14 of 40 pure noise series still produced a nameable formation.
  • Silence is a normal output and a necessary one.
  • Determinism buys reproducibility, not correctness. It is what makes a published hit rate checkable at all.

Frequently asked questions

What does an AI agent actually do when it analyses a crypto chart?
In this engine, six stages: fetch the candles, compute the indicators, reduce the series to swing pivots, match those pivots against eighteen geometric formation definitions, combine five weighted lanes into a composite score, and finally put the finished numbers into sentences. Only the last stage involves a language model.
Is a language model deciding the levels?
No. Every level, formation name and component score comes from deterministic computation. The model receives a finished structure and writes prose about it, and its output is validated against that structure before display. If it fails twice it falls back to a deterministic template, and the analysis still renders.
Why match formations on swing pivots instead of candles?
Because a single spiky candle cannot create a pivot, and therefore cannot create a formation. Pivots are committed only once price reverses by more than 2.5 times ATR(14), floored at 0.8% of price, which removes an entire class of false positives before pattern matching begins.
What is the 0.72 confidence threshold?
The minimum confidence a detection needs before it is reported. It was set by measurement: across ten textbook fixtures and forty random walks, textbook formations scored a median of about 0.88 and noise about 0.74. 0.72 sits below the signal floor so imperfect real formations still surface while most noise falls away.
Why does the tool often report that nothing was found?
Because most of the time nothing textbook is present. Returning nothing is a designed outcome rather than a failure. On pure random-walk data the detectors stay silent on most series, and a tool that always finds something has effectively no threshold at all.
What is the composite trend score made of?
Five lanes with published weights: trend 0.30, momentum 0.25, pattern 0.20, volume 0.15, volatility 0.10. The table is rendered next to the score rather than kept internal, so changing a weight is a visible product change rather than a silent tuning tweak.
Can an AI chart tool predict prices?
This one does not try. It names what is on the chart now and attaches what historically followed the same shape. The historical record is drawn from 661 completed formations, which is thin enough that it should not be read as a forecast. Nothing here is investment advice.
What can a model-first tool do that this design cannot?
Recognise shapes nobody has encoded. A deterministic engine only finds the eighteen formations someone sat down and defined, and it will never notice the nineteenth. The trade-off is that a model-first tool cannot define a reproducible hit rate, because it has no fixed detection procedure to measure.

Read a live chart

Figures on this page come from the same deterministic engine the tool runs on. The method is documented, and the thresholds used are printed alongside the numbers.

Everything shown here is produced by software that mechanically computes and charts publicly available market data. It is general information published identically to every user and is not personalised to your circumstances, objectives, financial situation or holdings.

Nothing here is a recommendation to buy, sell or hold any crypto-asset, and no entry, exit, stop-loss or position-size guidance is provided. We are not a registered investment adviser and we do not provide personal recommendations within the meaning of applicable investment-advice rules.

Historical patterns and statistics describe the past and do not indicate or guarantee future results. Crypto-asset prices are highly volatile and you may lose your entire investment.

Any decision you take is your own. Consider seeking advice from a licensed professional in your jurisdiction before acting.

All articles

What an AI agent actually does when it analyses a crypto chart | Chart Intel