> For the complete documentation index, see [llms.txt](https://docs.valhallaindicator.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.valhallaindicator.com/smc-indicator/order-blocks.md).

# Order Blocks

Order blocks are supply/demand zones created at structural shifts. They mark the origin candle of the impulse move that caused the BOS or CHOCH, the last opposing candle before the institutional push.

<figure><img src="/files/4vsu9SXP6JxkbiMJCFVV" alt=""><figcaption></figcaption></figure>

#### <mark style="color:cyan;">Detection Logic</mark>

When a BOS or CHOCH fires, the indicator scans backward from the **swing bar** (not the break bar) to find the last opposing candle. For a bullish OB, it finds the last bearish candle (close < open) before the upward impulse. The OB zone spans from that candle's open to its low. For a bearish OB, it's the last bullish candle, with the zone from its high to its open.

#### <mark style="color:cyan;">Positional Filtering</mark>

Bull OBs must sit below the broken swing high (support zone), and bear OBs must sit above the broken swing low (resistance zone). This prevents OBs from appearing on the wrong side of the structure break.

#### <mark style="color:cyan;">Strength Tiers</mark>

Each OB is classified by the size of its zone relative to ATR:

| Tier  | Zone Size / ATR | Interpretation                              |
| ----- | --------------- | ------------------------------------------- |
| `+`   | < 1.5×          | Standard - normal OB                        |
| `++`  | 1.5× – 2.5×     | Strong - wider institutional zone           |
| `+++` | > 2.5×          | Major - significant supply/demand imbalance |

#### <mark style="color:cyan;">Mitigation</mark>

OB zones extend rightward indefinitely and are automatically removed (mitigated) when price closes through the zone: a bull OB is mitigated when close drops below its bottom edge, and a bear OB when close rises above its top edge. The `Max Active Blocks` setting caps how many OBs are visible at once, oldest are removed first when the cap is reached.

#### <mark style="color:cyan;">Role in Grading & Targets</mark>

Order blocks serve double duty. The signal grade system checks whether the entry price falls inside an unmitigated OB (OB confluence factor). The Smart TP system uses the nearest *opposing* OB as the TP2 target, the first structural "wall" in the trade's path.
