How our S/R agent finds support and resistance that actually hold
A walk-through of the deterministic cascade behind every level shown in xris — touches, tiers, volume confirmation, and the ATR rule that filters noise.
There are two kinds of "support and resistance" you'll see in trading content.
One is drawn: someone picks a price that looks important, draws a line, and tells a story about it. The level is real because the analyst said it is.
The other is measured: a price clusters because actual buyers or sellers acted there, repeatedly, with conviction. You can count the touches. You can check the volume. You can rank the level against others in the same chart.
Our S/R agent only outputs the second kind. This post walks through how.
The shape of a useful level
Before talking about the algorithm, it's worth being explicit about what we want a "good" S/R level to mean. A level is useful if it answers four questions:
- Is it real? Has price actually reacted there, multiple times, recently?
- How strong is it? What's the conviction of those reactions — body close, wick rejection, volume spike?
- How nearby is it? A level 8% away matters less than one 1% away for a current entry decision.
- Has it held under stress? A polarity flip (former resistance becomes support) is worth more than an untested ceiling.
Most chart-drawing tools answer question 1, sort of, by squinting. Almost none answer questions 2-4 quantitatively.
The pipeline, step by step
The agent runs once per day on the closed daily candle, with intraday refreshes. Here's the actual flow.
Step 1: candidate clustering
We take the last N days of OHLCV (typically 90-180 depending on the token's volatility regime). For each candle, we record the anchor price — the close for body anchors, the wick extreme for wick anchors. We then cluster anchor prices that are within a small ATR-relative tolerance of each other. Each cluster becomes a candidate zone.
A cluster of 1 candle is not a level. A cluster of 5+ is a level. A cluster of 10+ with at least 3 of those touches having above-average volume is a strong level.
Step 2: tier assignment
Every candidate gets a tier based on the count, the recency, and the spread:
- Major — 5+ touches, at least one in the last 30 days, with volume confirmation. These are the levels we lean on.
- Strong — 3-5 touches, recent, but missing one of the strength criteria.
- Notable — 2-3 touches, present in the chart but not strongly defended.
The tier appears on every level in the dashboard. You see it when you open a token detail.
Step 3: anchor type and volume confirmation
For each cluster, we tag what kind of price action created it: Body (closes), Wick (rejections), or Mixed. We also flag whether at least one of the touches had volume in the top quintile of the same period. Body + volume-confirmed levels are the strongest.
This is the metadata you see in the modal: Major · Body · 5t · Vol ✓.
Step 4: cascade-walked TP and SL
Here's the part that matters most for a setup, and where we differ from naive S/R tools.
When you're considering a trade from the current price, the question isn't "what are all the levels?" — it's "what's the next level the price has to reach to be a real target, and what's the next level below that's a real stop?"
Naive tools just pick the closest. We cascade. We use ATR (Average True Range, 14-period) as the unit of meaningful distance:
- For the take-profit side: walk through resistances above price in order. Skip any that are within 1.0 × ATR of the entry — they're too close, the move is noise, not signal. Stop at the first one that's at least 1.0 × ATR away.
- For the stop-loss side: walk through supports below price. Skip any within 0.75 × ATR of entry (stops are asymmetric — well-defended supports just inside 1 ATR are useful). Stop at the first that's at least 0.75 × ATR.
- Final filter: if the picked level is closer than 0.5 × ATR after the walk (e.g., the cascade only had one option), drop it. No level beats no setup.
This is why you'll sometimes see the dashboard say "Target (R2 ↗ from R1)" — the agent's preset wanted R1, but R1 was inside 1 ATR, so the cascade walked to R2. You see the trail.
Step 5: live recomputation
The cascade re-runs every 60 seconds against the live price. As the price moves, the "next level" can change. That's why the Setups card shows a countdown and a live indicator — it's not a daily snapshot, it's a fresh computation.
What the agent doesn't do
Worth being explicit about the limits.
It doesn't predict price direction. It doesn't tell you to enter long or short. It doesn't have an opinion on whether the setup will play out — that's where the other agents (Risk, News, Macro) come in.
It just answers, very precisely: "given the actual price history, what are the levels, and what's the closest tradeable target/stop pair from here?" The answer is auditable. You can pull up the chart and count the touches yourself. The agent never invented anything.
Why it matters that it's deterministic
In a multi-agent system, the technicals layer needs to be the trustable foundation. If the Risk agent is debating with the News agent about a setup, both of them need to be able to assume the levels are real. A hallucinated number from the S/R agent would poison every downstream decision.
Determinism is the price of trust. Our S/R agent will give you the same levels for the same chart every time. No prompt drift, no model temperature, no "oh, I was just generating, didn't really mean it."
If you want to see it in action, open any token in the dashboard and click into it. The Support zones and Resistance zones panels show the full output: tier, anchor type, touch count, volume flag, and the R1/R2 badges that tell you which one the cascade picked.
That's the whole methodology. No magic, no LLM in the hot path, just careful counting against the actual data.