For the Geeks

This page exists for readers who want enough of the mathematical shape of STR to decide whether they trust the pane to carry weight in their process. It is deliberately at mental-model altitude — you will get the idea...

Written By Axiom Admin

Last updated 22 days ago

For the Geeks

This page exists for readers who want enough of the mathematical shape of STR to decide whether they trust the pane to carry weight in their process. It is deliberately at mental-model altitude — you will get the ideas and the tradeoffs, not the coefficients, thresholds, or cloneable code. We hold that line for a reason that closes out the page.

What the page is good for: deciding whether the normalization shape and the structure-feature constructions are estimates you are comfortable reading under real conditions. What it is not good for: reconstructing the math, tuning internal parameters not exposed as inputs, or auditing specific constant values. If you need the second set of things to trust the tool, this page will leave you short on purpose — and the closing section explains how to audit the tool anyway, from its visible behavior.

Two rings to teach. Ring one is the ATR-sigmoid normalization that produces the bounded pane in the first place. Ring two is the four structure features that read off the blended fast line. We walk them in that order because you cannot reason about the features until you know what the line they draw on actually is.

Ring one — ATR-sigmoid normalization

The classical MACD is a fast MA minus a slow MA on a price source, plus a signal MA applied to that difference, plus a histogram that is the gap between the MACD line and its signal. All three are price-space quantities with units the same as the source. Stacking them from different timeframes or different instruments on a single axis is a category error — the numbers do not live in the same units and visual similarity across the stack is not evidence of comparability.

Axiom's projection handles this in three conceptual stages. Each stage has a job and a named cost.

Stage 1 — the classical triple, per slot, on the slot's own context

For each enabled slot, inside the slot's request.security context (so the fast/slow MAs are computed on the slot's timeframe and, if set, on the slot's Optional Ticker), compute:

  • A fast MA of the source.

  • A slow MA of the source.

  • A signal MA applied to (fast MA − slow MA).

  • A histogram as (MACD line − signal line).

This stage is as classical as the MACD gets. Nothing distinctive. The slot's MA family choice (EMA by default, or any Pro MA-library family) applies to the fast and slow computations, and the slot's signal MA family choice applies to the signal. Power User parameters within a family (ALMA Offset/Sigma, KAMA Fast/Slow, etc.) modify the family's behavior but not the idea.

Cost of this stage. You inherit every known limitation of classical MACD — sensitivity to choppy regimes, lag proportional to the slow length, crossing whips on tight pairs, etc. Normalization does not erase those; it just presents them on a bounded pane.

Stage 2 — scaling against the slot's own ATR

Before projecting to the bounded pane, each of the three triple values is scaled against the slot's own Average True Range over a user-settable window (default 14). The purpose is comparability across instruments and timeframes.

The scaled value carries the sign of the original (a bearish MACD gap stays bearish) and a magnitude expressed as "how large is this gap relative to the recent range I'm moving in." An ES future at 4500 and a mid-cap single name at 30 have very different raw MACD magnitudes. Divided by each instrument's own ATR, the resulting quantity is much closer to comparable across the two.

Cost of this stage. ATR itself is a rolling estimate, and its behavior depends on its window. A short ATR window (7) means the scaling is jumpy — a single volatility pulse changes how the slot reads for a while after. A long window (40) means the scaling is sticky — the slot can feel out of touch with the current session's volatility. The ATR Length control is the knob you tune if the scaling is misbehaving.

A second cost: ATR does not know about regime changes. A slot that was trading in a low-volatility regime for weeks and enters a high-volatility regime will see its ATR estimate adjust gradually. During the transition, the slot's normalized read can look briefly exaggerated in one direction. That is the rolling ATR catching up.

Stage 3 — sigmoid bounding

The scaled value is then passed through a bounded sigmoid that maps all real numbers onto the interval 0 to 100. The sigmoid has two properties that matter:

  1. The midline is 50. A scaled value of zero maps to 50. On the MACD line, that means the fast MA and slow MA are close enough that their raw difference is zero. On the signal line, it means the smoothed MACD value is zero. On the histogram, it means MACD and signal are equal.

  2. The tails flatten. As the scaled value grows large in either direction, the sigmoid's response flattens. Very different scaled values at the extremes produce similar bounded outputs. That is by construction.

The ATR Sensitivity control is a multiplier applied to the scaled value before the sigmoid. Higher sensitivity pushes the scaled value toward the sigmoid's flattening regions faster, so the pane saturates sooner. Lower sensitivity keeps the scaled value in the sigmoid's linear region, flattening the pane's excursions toward 50.

Cost of this stage. Boundary pinning. A slot's K sitting against 100 for many bars is not saying "the convergence gap is twice as stretched as a reading at 80." It is saying the sigmoid's saturation has eaten additional magnitude. Zero and 100 are asymptotes, not reversal zones. If your pane is pinned often, you are reading the saturation regime, not the signal regime — adjust Sensitivity down or ATR Length up.

Why bounded at all. Bounded panes let you stack readings from different timeframes, different instruments, and different MA families on a single axis without the visual lie that raw magnitudes imply. The 50 midline is a consistent anchor across all of them. For a trader running more than one timeframe, the comparability is usually worth the cost of losing raw magnitude.

The blend, not part of the three stages

Once every enabled slot has its normalized K, D, H triple, the blend is a weighted mean over the enabled slots whose weight is non-zero and whose values are non-na. Total weight is the sum of active weights; each of K, D, H is the weighted sum divided by the total. If no slot contributes (all warm-up, or all weight zero), the blend is na.

If master smoothing is ON, the blend's K, D, H triple is passed through a second MA (the master-smoothing MA family and length) after blending. That smoothing is the input to the structure features — the blended fast line everything else reads from is the post-smoothing blend when smoothing is on, and the pre-smoothing blend when it is off.

Ring two — four structure features, all on the blended fast line

All four features consume the blended fast line. None of them modify it; they describe it. The consequence is non-trivial: the features cannot be independent of each other. When they agree, that is the same line agreeing with itself through four framings. When they disagree, that is informative about the blend's shape at that bar. Use the agreements as shared structure and the disagreements as texture.

Donchian channel on the blend

A Donchian channel of length N over a series is the series's highest value over the last N bars and the series's lowest value over the last N bars, stepped. Apply this to the blended fast line: you get steplines that mark where the blend has been pushing its own range edges over the channel length. An optional smoothed basis between the upper and lower lines is available.

What this describes. The blend's own extremes in its own recent window.

What this does not describe. A price breakout, a range break, or an exhaustion. A Donchian touch is the blend reaching its own recent high or low; that coincides with price doing various things, depending on the session.

Why on STR. It is the simplest of the four constructions and the one with the cleanest reading. Donchian is the "where has the blend been extreme" question, and it is useful framing because the extremes of the blend are where the blend's convergence-divergence story is most developed.

Tradeoff vs a simpler approach. The alternative is no range framing on the blend at all — the reader eyeballs extremes. That works if your eye is trained. Donchian just makes the extremes explicit in a way that scales across sessions.

Keltner envelope around the blend

A Keltner envelope on a series is a smoothed basis (a moving average of the series) plus and minus a multiple of a range estimate on that series. Apply this to the blended fast line: the basis is a chosen MA family and length applied to the blend, and the range estimate is a rolling average of the blend's bar-to-bar absolute change. The envelope is basis ± multiplier × range, bounded into 0–100.

What this describes. Stretch. The envelope says how far the blend has moved from its own smoothed basis, in units of its own recent range.

What this does not describe. Overbought or oversold. A Keltner upper touch is a stretch statement, not a fade signal. In a trending regime, the envelope is touched repeatedly — that is what a stretched regime looks like on a stretch envelope.

Why on STR. Stretch is a useful framing alongside the convergence-divergence read. Seeing that the blend is far from its basis, not just far from 50, is different information. The envelope makes that visible without a separate tool.

Tradeoff vs a simpler approach. The alternative is to read stretch off the blend's distance from 50, or off the gap between blend K and blend D. Those are legitimate reads. The Keltner envelope gives you a different framing — distance from the blend's own moving basis, in range-scaled units. The cost is chart clutter and a second learning curve.

BBWP on the blend

Bollinger Band Width Percentile. Take the blended fast line. Apply the classical Bollinger construction — a moving average basis and a stdev window at matched lengths — and compute the band width. Rank that width as a percentile across a user-settable lookback window.

What this describes. The blend's own Bollinger band width, ranked against its own recent history. A high percentile means the blend has been in an expanded width regime by its own past. A low percentile means compressed.

What this does not describe. Price volatility. A violent price chart can have a compressed blend (if the slots disagree and the weighted mean flattens). A quiet price chart can have an expanded blend (if the slots agree and the convergence-divergence story is active).

Why on STR. Regime framing. Knowing whether the blend is in a compressed or expanded width regime is useful when you are reading divergence or channel touches — it tells you something about how much context to weight those moments with.

Tradeoff vs a simpler approach. The alternative is to read the blend's width by eye against recent bars. That works for recent bars. A percentile rank against 252 prior valid width readings tells you something eyeball-reading cannot: how unusual the current width is against a longer horizon. Cost: BBWP is na until the width and the percentile-rank window have both warmed up, and the percentile-rank length is a knob the reader has to own.

Divergence on confirmed pivots

Using ta.pivotlow and ta.pivothigh at a single Pivot Len for both left and right sides: detect confirmed price pivots. For each confirmed price pivot, read the blended fast line at the same historical offset as the pivot (not a separately-detected pivot on the oscillator — the blended value at the same bar).

A confirmed bullish divergence fires when two confirmed price pivot lows are in lower-low order and the two blended-MACD values at matched offsets are in higher-low order. Bearish is the mirror. Evaluation is gated on barstate.isconfirmed so no unconfirmed bar can produce a divergence flag.

What this describes. A geometric pattern across two confirmed pivots and the blended MACD at those offsets. Nothing more.

What this does not describe. A directional forecast. The triangle is geometry, not a call.

Why on STR. Divergence against the blended MACD is one of the most-requested reads for a stacked MACD, and building it in strictly — with a single pivot strength on both sides, with barstate.isconfirmed gating, with the blended value read at the same historical offset as the price pivot rather than a separately-detected oscillator pivot — is how we keep the module honest.

Why Plot On Pivot is a visual-only setting. The back-shift places the triangle where the geometry formed. The alert fires on the right-shoulder confirmation bar regardless. Both visuals are true in different senses. The ON visual is truthful about where the pattern formed and misleading-looking about when it was visible. That is why every mention of Plot On Pivot in this pack carries the honesty beat.

Tradeoff vs a simpler approach. The alternative is a faster, looser divergence module with shorter pivot strength and no barstate-confirmed gate. You would see more triangles and more wrong ones. STR's module chooses strictness. The cost is confirmation delay (Pivot Len bars of lag), and the benefit is that the triangles you see are the result of actual confirmed pivots, not of momentary pivot-like behavior that never finishes.

What you will not find on this page

This pack makes a deliberate choice to explain the shape of the transformation and the shape of the structure-feature constructions without publishing the specific numbers that would let a reader clone them. That is not precious, and it is not marketing posture. It is a pragmatic choice about where the value of the math lives.

The math is useful for judgment when you know what it is doing conceptually. It is rebuildable as a recipe when the specific constants are published. Those are different goods, and they trade off against each other. Publishing enough for a reader to reconstruct the estimator does not make the reader better at reading the pane; it makes the estimator available to be rebuilt, usually badly, by someone who does not know which parameters are load-bearing. We would rather help you read the pane well than hand you the ingredients to rebuild it badly.

Specifically, you will not find here: the exact sigmoid expression form or its internal clamp bounds, the exact ATR multiplier used inside the normalization, the specific Keltner multiplier default derivation, the exact BBWP window-and-percentile-length combination rationale, the Donchian basis smoothing mechanics below the stepline, the per-MA-family internal coefficients, or any function names that would read as a reconstruction recipe.

If you need that level of detail to decide whether to use the tool, STR is not the tool you need — and that is not a brush-off, it is an honest read of the fit. Two legitimate paths exist for a reader in that position. One: audit the pane on your own data. The ATR-sigmoid shape is auditable by its visible behavior (see the five checks below), and the structure-feature shapes are auditable by toggling them on and off and watching how the pane changes. Two: use a tool that publishes its full internals. Several open-source MACD stacks do. If reproducibility of internals is a hard requirement for you, use one of those and keep STR out of your stack. We would rather be honest about the boundary than pretend it does not exist — and the pack is written so that readers for whom the boundary is wrong can walk away cleanly rather than spend months feeling stuck.

Reader verification path, if you want one

  • Load STR on three unrelated symbols with very different price levels. Confirm the pane stays bounded and the 50 midline remains the transformed zero point. Nothing else in the construction can explain cross-instrument comparability.

  • Push ATR Sensitivity from 0.5 to 2.0 on a quiet session and watch the slot lines move from clustered near 50 to saturated at the boundaries. That is the sigmoid's response curve, visible.

  • Push ATR Length from 7 to 40 on the same chart and watch how steady or touchy the normalization becomes. That is the ATR window's behavior.

  • Disable one slot and watch all four structure features shift simultaneously. That confirms they are drawn from the blend and cannot be independent of each other.

  • Toggle Plot On Pivot on a confirmed divergence and watch the triangle back-shift while the alert bar stays fixed. That is the setting's entire behavior.

When you finish those five checks, you will have enough lived experience with the transformation to use it in a reading routine with eyes open.

Back to the reading layer: Visuals and Logic. Back to configuration: Settings. For the estimate boundary in full: Limitations and Trust Boundaries.