OPEN-SOURCE SCRIPT

1M XAU Cumulative Delta Volume with OB Breakouts

161


### Overview

This is a **session-based CVD strategy** built around the **00:00–07:00 CEST range**. It finds the high/low of that session, turns them into **adaptive ATR-based support (yellow)** and **resistance (purple)** zones, and trades only **CVD-confirmed reversals** off those levels.

---

### How it Works

* For each day, the script:

* Builds a 00:00–07:00 CEST **profile high/low**.
* Creates a **support zone** around the session low and a **resistance zone** around the session high.
* Using lower timeframe data, it reconstructs **Cumulative Volume Delta (CVD)** and a **recent delta** filter.
* It arms “pending” states when price **enters a zone from the correct side**, then confirms:

* **BUY (long):** price reclaims above support and recent CVD is strongly positive.
* **SELL (short):** price rejects below resistance and recent CVD is strongly negative.

Only these two CVD signals (`buySignal` / `sellSignal`) open trades.

---

### Strategy Logic

* **Entries**

* `buySignal` → open **long** (if flat).
* `sellSignal` → open **short** (if flat).
* No pyramiding; one position at a time.
* **Exits (only TP & SL)**

* Long: TP at `avg_price * (0.5 + TP%)`, SL at `avg_price * (1 – SL%)`.
* Short: TP at `avg_price * (0.5 – TP%)`, SL at `avg_price * (1 + SL%)`.
* No opposite-signal exits.

---

### Extras

* **Reversal markers** on yellow/purple zones and **breakout/retest markers** are plotted for context and alerts but **do not trigger entries**.
* Zone width and “thickening” are ATR-based so important touches and near-touches are easy to see.
* Only suited for **1m intraday scalping** (e.g. XAU/USD), but can be tested on other markets/timeframes.

Exención de responsabilidad

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.