OPEN-SOURCE SCRIPT

Strict 1H WTS Structure

128
## Strict 1H WTS Structure

This indicator identifies a confirmed **1-hour market structure shift (WTS)** using strict, rule-based logic. It focuses only on structure and does not include FVGs, order blocks, lower-timeframe entries, or additional filters.

The indicator always calculates market structure on the **1-hour timeframe**, regardless of the chart timeframe.

### Core logic

Market structure is calculated using candle bodies:

* Body high = the higher value between open and close.
* Body low = the lower value between open and close.
* Wicks are ignored for structural breaks.

Confirmed body-based swing points are used to define the market structure.

### Structural levels

The indicator tracks:

* HH — Higher High
* HL — Higher Low
* LH — Lower High
* LL — Lower Low

A local high or low does not automatically become a structural level.

A swing becomes structural only after a completed pullback and subsequent continuation:

* In a bullish structure, a potential HL is confirmed only after price creates a new HH.
* In a bearish structure, a potential LH is confirmed only after price creates a new LL.

This prevents minor internal movements from being treated as major market structure.

### Bullish WTS

A bullish WTS can occur only when:

1. The market is in a confirmed bearish structure.
2. A candle closes above the last confirmed structural LH.
3. The break is made by the candle body, not only by the wick.
4. Price does not close back below the broken structural level.
5. A new high is created after the break.
6. A confirmed HL forms above the broken structural level.

The bullish WTS signal is displayed only after all conditions are confirmed.

### Bearish WTS

A bearish WTS can occur only when:

1. The market is in a confirmed bullish structure.
2. A candle closes below the last confirmed structural HL.
3. The break is made by the candle body, not only by the wick.
4. Price does not close back above the broken structural level.
5. A new low is created after the break.
6. A confirmed LH forms below the broken structural level.

The bearish WTS signal is displayed only after all conditions are confirmed.

### Candidate break

When price first closes beyond a structural level, the indicator displays:

**1H BREAK — WAIT**

This is not yet a confirmed WTS.

It means that the structural level has been broken, but the indicator is waiting for the pullback and confirmation of the new market structure.

### Cancelled WTS

If price closes back inside the previous structure before the new structure is confirmed, the setup is cancelled.

The indicator displays:

**NO WTS**

Examples:

* A bullish candidate is cancelled when price closes back below the broken structural high.
* A bearish candidate is cancelled when price closes back above the broken structural low.

### Confirmed signals

**1H WTS LONG**

The bearish structure has been broken and a new bullish HH–HL structure has been confirmed.

**1H WTS SHORT**

The bullish structure has been broken and a new bearish LL–LH structure has been confirmed.

### Displayed levels

The indicator displays:

* Confirmed structural high.
* Confirmed structural low.
* Structural level currently being tested after a body break.
* Candidate break labels.
* Confirmed WTS labels.
* Cancelled candidate labels.

### Alerts

The indicator includes two alert conditions:

* Confirmed 1H Bullish WTS.
* Confirmed 1H Bearish WTS.

Alerts trigger only after the complete structure-shift confirmation process.

### Important

A wick through a structural level is not considered a break.

A simple candle close beyond a level is not automatically considered a confirmed WTS.

The indicator requires:

> Structural body break → no return into the old structure → completed pullback → confirmation of the new structure.

This indicator is designed as a strict market-structure engine rather than an entry-signal system.

Exención de responsabilidad

La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.