OPEN-SOURCE SCRIPT
SafeIN - Settlement & Variations

This indicator calculates a custom daily "Settlement" (or anchor price) specifically optimized for trading XAUUSD (Gold). Instead of relying on the standard daily open or close, it establishes a daily pivot based on a specific 1-minute high-volume window.
**Why this indicator was created:**
Unlike Gold Futures (GC) on the CME, which have an official exchange-mandated daily settlement price, spot Gold (XAUUSD) is traded as a CFD over-the-counter (OTC) without a centralized daily close. This indicator bridges that gap by generating a highly reliable daily anchor—simulating a futures-style settlement on your standard XAUUSD chart.
**What it does:**
In the Forex and commodities markets, specific times of the day experience a massive influx of liquidity (such as market overlaps or specific fixing times). This script isolates a specific 1-minute time window (13:29 to 13:30 by default, based on the selected timezone) and calculates a Volume Weighted Average Price (VWAP) using historical data for that exact minute. This creates a highly reliable daily anchor price, plotting a continuous horizontal line for the rest of the trading session.
**Key Features:**
* **Custom VWAP Anchor:** Computes a daily anchor price using a specific 1-minute volume-weighted window, avoiding the noise of standard daily candle closes.
* **Percentage Variations:** Automatically projects up to 5% positive and negative zones originating from the settlement price. These bands act as major intraday support and resistance levels for Gold traders.
* **Manual Override:** Allows users to input a custom settlement price manually if they wish to anchor the percentage bands to a different key price level or historical pivot.
* **Clean Visuals:** Lines and labels are dynamically plotted for the current day only, keeping your XAUUSD charts clean and easy to read without historical clutter.
**Why this indicator was created:**
Unlike Gold Futures (GC) on the CME, which have an official exchange-mandated daily settlement price, spot Gold (XAUUSD) is traded as a CFD over-the-counter (OTC) without a centralized daily close. This indicator bridges that gap by generating a highly reliable daily anchor—simulating a futures-style settlement on your standard XAUUSD chart.
**What it does:**
In the Forex and commodities markets, specific times of the day experience a massive influx of liquidity (such as market overlaps or specific fixing times). This script isolates a specific 1-minute time window (13:29 to 13:30 by default, based on the selected timezone) and calculates a Volume Weighted Average Price (VWAP) using historical data for that exact minute. This creates a highly reliable daily anchor price, plotting a continuous horizontal line for the rest of the trading session.
**Key Features:**
* **Custom VWAP Anchor:** Computes a daily anchor price using a specific 1-minute volume-weighted window, avoiding the noise of standard daily candle closes.
* **Percentage Variations:** Automatically projects up to 5% positive and negative zones originating from the settlement price. These bands act as major intraday support and resistance levels for Gold traders.
* **Manual Override:** Allows users to input a custom settlement price manually if they wish to anchor the percentage bands to a different key price level or historical pivot.
* **Clean Visuals:** Lines and labels are dynamically plotted for the current day only, keeping your XAUUSD charts clean and easy to read without historical clutter.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.