Market Structure Vector

1 011
Market Structure Vector is a free, open-source market structure indicator that maps confirmed swing highs, swing lows and structural breaks, with a simple two-colour directional display.

It helps answer three questions:
• What structure has price confirmed?
• Where are the current support and resistance boundaries?
• Has a closed candle broken beyond those boundaries?

HOW IT WORKS

Vector identifies pivot highs and lows using a configurable confirmation window. The default is three bars on each side, so a swing becomes known three bars after its turning point.

An alternating swing must meet a minimum distance requirement, set to 0.75 ATR(14) by default. More extreme same-side swings can update the latest endpoint while preserving the previous completed swing for comparison.

Higher highs and higher lows form bullish structure. Lower highs and lower lows form bearish structure. Disagreement or equal swing prices produce mixed structure.

The step lines begin when a swing is confirmed. They are not drawn backwards onto the original turning point.

STRUCTURE LINES AND BREAKS

The lower line uses the bullish theme colour and marks the latest accepted swing low. The upper line uses the bearish colour and marks the latest accepted swing high.

A structural break requires a candle to close beyond a buffered boundary. The default buffer is 0.10 ATR(14), frozen when the level is accepted, with a minimum of one tick. A wick through the level alone does not qualify.

Each active boundary can trigger once before being consumed. Consumed levels lose their glow. Breaks are classified as continuation, opposing or mixed according to the structure known before the break.

Existing boundaries are checked before new swings are accepted. This prevents a newly recognised pivot from erasing or reclassifying an older break on the same bar.

TWO-COLOUR CANDLE DISPLAY

In the default Directional bias mode, candles use only the selected bullish or bearish colour.

A confirmed break sets direction. New directional structure or failure of the controlling structure can also change bias. During mixed periods, the last direction is retained.

This is a simplified directional reading: bullish colouring does not necessarily mean both swing sequences currently agree. Check SWING PAIR and the panel tooltip for the underlying evidence.

Before sufficient structure exists, direction is seeded from the first valid closed candle. An initial doji seeds bullish. This initial colour is not confirmed market structure.

The optional Candle direction mode colours candles by close versus open instead.

DASHBOARD

• BIAS — current two-colour directional reading.
• SWING PAIR — confirmed high/low relationships.
• RESISTANCE / SUPPORT — buffered break thresholds.
• LAST BREAK — latest structural break classification.
• DATA / DELAY — data readiness and pivot confirmation delay.
• BIAS AGE — completed bars since the displayed bias changed.

Panel boundary values include the buffer, so they can differ slightly from the main swing lines.


ALERTS

Alerts cover continuation breaks up/down, opposing breaks, mixed breaks and structure-state changes. Dynamic alerts include confirmation time and frozen break details.

Alerts describe the underlying structure, which can remain mixed or transitional while candle colouring retains a directional bias.

USE AND LIMITATIONS

Use standard OHLC charts. Begin with data readiness, then compare directional bias, swing evidence and nearby boundaries.

Confirmation introduces delay. Larger swing widths increase that delay, and retained bias can become stale during reversals or sideways markets. Breaks can fail.

Structural calculations and default bias changes occur on closed bars. Live candle prices still move intrabar; Candle direction mode can change colour with the live close. Settings and data changes can alter recalculated results.

Vector provides structural context. It does not generate a complete trading strategy, automatic entries, stop-loss levels or profit targets, and makes no claim of predictive accuracy or profitability.

Penafian

Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.