OPEN-SOURCE SCRIPT

SafeIN - Settlement & Variations

509
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.

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。