OPEN-SOURCE SCRIPT

Structure Weaver [JOAT]

1 471
Weaves raw price into readable market structure — swing labels, structure breaks, and a premium/discount dealing range.



◆ WHAT IT IS

Structure Weaver reads price the way a discretionary trader maps it: it classifies each confirmed swing, marks where structure genuinely breaks, and frames the active range into zones of relative value. It is a pure context tool for understanding trend and location — it does not print buy/sell signals.

This is 100% original code, written from scratch. It does not copy any other market-structure script.

istantanea


◆ HOW IT WORKS

1. Swing classification. Confirmed swing points (using your chosen strength) are labelled live as:
HH higher high, HL higher low — bullish rhythm
LH lower high, LL lower low — bearish rhythm
Reading these in sequence is the foundation of trend structure.

2. Structure breaks — BOS and CHoCH. When price breaks the last confirmed swing, the tool stitches a labelled thread and distinguishes two cases:
BOS (Break of Structure) — a break in the direction of the existing trend: continuation
CHoCH (Change of Character) — the first break against the trend: a potential shift in control
You choose whether breaks confirm on a close or a wick.

3. The dealing range. The span between the last confirmed swing low and high is shaded into:
Premium — the upper zone (expensive relative to the range)
Equilibrium — a central band around the 50% level
Discount — the lower zone (cheap relative to the range)
This gives every pullback objective context — are you buying in discount or chasing in premium.



◆ WHAT YOU SEE

• Live HH / HL / LH / LL swing labels
BOS (solid) and CHoCH (dashed) structure threads, oldest recycled to keep the chart clean
• A shaded Premium / Equilibrium / Discount dealing range with an equilibrium line
• A resizable dashboard showing the current structure bias, the last event and its age, a BOS/CHoCH tally, the active swing high/low with holding-or-taken status, and where price sits in the range with a position gauge



◆ HOW TO USE IT

• Read the swing sequence and structure color for trend bias; a CHoCH is your earliest warning that control may be changing hands.
• Favor entries from discount in an uptrend and from premium in a downtrend, using equilibrium as the pivot.
• A BOS in trend direction is continuation confirmation.
• Works on all symbols and timeframes. Increase swing strength to weave only major structure; lower it for finer detail.



◆ NOTES & LIMITATIONS

Because swings are only confirmed once the required bars have printed on both sides, labels and breaks appear after that confirmation — this is by design and avoids repainting on already-closed structure. It is a context tool, not financial advice, and does not predict direction on its own. Combine it with your own method and risk management.

— made with passion by officialjackofalltrade

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.