PROTECTED SOURCE SCRIPT
ALTINS1 vs XAUUSD [Dashboard]

📈 ALTINS1 ✂️ XAUUSD [Dashboard] Indicator
This Pine Script indicator is a sophisticated Dashboard & Analysis Tool designed to monitor the price spread (arbitrage/premium) between the BIST Gold Certificate (ALTINS1) and the theoretical gram gold price derived from spot Gold (XAUUSD) and USD/TRY.
Here is a detailed breakdown of its features, logic, and usage:
🛠️ Core Functionality & Logic
The primary goal of this indicator is to answer the question: "Is the Gold Certificate (ALTINS1) currently trading at a premium (expensive) or a discount (cheap) relative to its fair theoretical value?"
Theoretical Price Calculation (Fair Value):
It calculates the "fair" price of 1 gram of gold in Turkish Lira (TRY) using real-time global market data.
Formula: (Spot Gold Price * USD/TRY Exchange Rate) / 31.1034768
Market Price:
It takes the live trading price of the ALTINS1 certificate from Borsa Istanbul (multiplied by 100 since one certificate represents 0.01 grams of gold).
Spread (Premium/Discount) Calculation:
The percentage difference between the Market Price and the Theoretical Price is calculated.
A positive spread means ALTINS1 is trading at a premium (expensive compared to spot gold).
A negative spread means it is trading at a discount (cheap).
🌟 Key Features
Live Dashboard Panel:
A detailed table displayed on the chart (Default: Top Right).
Shows real-time prices for XAUUSD, XAUTRYG, and ALTINS1.
Instant Spread: Shows the current deviation from fair value percentage.
Historical Averages: Displays the average spread over the last 1 week, 1 month, and 3 days for comparison.
Z-Score Heatmap:
Uses statistical analysis (Standard Deviation) to determine if the current spread is "normal" or "extreme."
Red Zones: Extreme Premium (Risk of selling/profit-taking).
Green Zones: Extreme Discount (Buying Opportunity).
White/Grey: Normal trading range.
Arbitrage & Opportunity Alerts:
Arbitrage Alert: Triggers when a risk-free profit opportunity arises (Gap %) for those who can trade both spot USD/Gold and the certificate.
Bottom/Top Signals: Alerts when the spread hits historical lows (Buy signal) or highs (Sell signal).
Trend & Momentum Indicators:
Wind Direction: An arrow (↗️ or ↘️) indicates whether the spread is currently widening or narrowing.
XAU Momentum: Displays the momentum of Spot Gold itself using MACD (🔥 for Bullish, ❄️ for Bearish).
Virtual Chart Overlay:
Optionally, it can plot theoretical ALTINS1 candles directly onto the XAUUSD chart for visual comparison.
📊 Best Practices & Strategy
Here is how traders typically use this tool:
For Investors (Timing Entries/Exits):
BUY Signal: When the "Instant Spread" row turns GREEN (Z-Score < -2.0), the certificate is historically cheap relative to spot gold. This is often considered a good long-term entry point.
SELL Signal: When the row turns RED (Z-Score > 2.0), the certificate is expensive. It might be risky to buy new positions, and profit-taking could be considered.
For Arbitrageurs:
If the Gap % exceeds a user-defined threshold (e.g., 1%) and you have access to both markets, you can sell the expensive asset and buy the cheap one to lock in a risk-free profit.
Market Sentiment Monitoring:
It helps gauge domestic market sentiment. If Spot Gold (XAUUSD) is falling but the Spread is widening (becoming more positive), it indicates that local investors see the dip as a buying opportunity and are supporting the price.
🔧 Technical Inputs
Z-Period: The lookback period used for Z-Score calculation (Default: 20 Days).
Z-Extreme: The standard deviation threshold considered "Extreme" (Default: 2.0 Sigma).
Compact View: A minimalist mode that hides historical averages to save screen space.
This tool is highly specialized for Turkish traders trading Gold Certificates on Borsa Istanbul, offering a professional-grade analysis of fair value and market inefficiencies.
This Pine Script indicator is a sophisticated Dashboard & Analysis Tool designed to monitor the price spread (arbitrage/premium) between the BIST Gold Certificate (ALTINS1) and the theoretical gram gold price derived from spot Gold (XAUUSD) and USD/TRY.
Here is a detailed breakdown of its features, logic, and usage:
🛠️ Core Functionality & Logic
The primary goal of this indicator is to answer the question: "Is the Gold Certificate (ALTINS1) currently trading at a premium (expensive) or a discount (cheap) relative to its fair theoretical value?"
Theoretical Price Calculation (Fair Value):
It calculates the "fair" price of 1 gram of gold in Turkish Lira (TRY) using real-time global market data.
Formula: (Spot Gold Price * USD/TRY Exchange Rate) / 31.1034768
Market Price:
It takes the live trading price of the ALTINS1 certificate from Borsa Istanbul (multiplied by 100 since one certificate represents 0.01 grams of gold).
Spread (Premium/Discount) Calculation:
The percentage difference between the Market Price and the Theoretical Price is calculated.
A positive spread means ALTINS1 is trading at a premium (expensive compared to spot gold).
A negative spread means it is trading at a discount (cheap).
🌟 Key Features
Live Dashboard Panel:
A detailed table displayed on the chart (Default: Top Right).
Shows real-time prices for XAUUSD, XAUTRYG, and ALTINS1.
Instant Spread: Shows the current deviation from fair value percentage.
Historical Averages: Displays the average spread over the last 1 week, 1 month, and 3 days for comparison.
Z-Score Heatmap:
Uses statistical analysis (Standard Deviation) to determine if the current spread is "normal" or "extreme."
Red Zones: Extreme Premium (Risk of selling/profit-taking).
Green Zones: Extreme Discount (Buying Opportunity).
White/Grey: Normal trading range.
Arbitrage & Opportunity Alerts:
Arbitrage Alert: Triggers when a risk-free profit opportunity arises (Gap %) for those who can trade both spot USD/Gold and the certificate.
Bottom/Top Signals: Alerts when the spread hits historical lows (Buy signal) or highs (Sell signal).
Trend & Momentum Indicators:
Wind Direction: An arrow (↗️ or ↘️) indicates whether the spread is currently widening or narrowing.
XAU Momentum: Displays the momentum of Spot Gold itself using MACD (🔥 for Bullish, ❄️ for Bearish).
Virtual Chart Overlay:
Optionally, it can plot theoretical ALTINS1 candles directly onto the XAUUSD chart for visual comparison.
📊 Best Practices & Strategy
Here is how traders typically use this tool:
For Investors (Timing Entries/Exits):
BUY Signal: When the "Instant Spread" row turns GREEN (Z-Score < -2.0), the certificate is historically cheap relative to spot gold. This is often considered a good long-term entry point.
SELL Signal: When the row turns RED (Z-Score > 2.0), the certificate is expensive. It might be risky to buy new positions, and profit-taking could be considered.
For Arbitrageurs:
If the Gap % exceeds a user-defined threshold (e.g., 1%) and you have access to both markets, you can sell the expensive asset and buy the cheap one to lock in a risk-free profit.
Market Sentiment Monitoring:
It helps gauge domestic market sentiment. If Spot Gold (XAUUSD) is falling but the Spread is widening (becoming more positive), it indicates that local investors see the dip as a buying opportunity and are supporting the price.
🔧 Technical Inputs
Z-Period: The lookback period used for Z-Score calculation (Default: 20 Days).
Z-Extreme: The standard deviation threshold considered "Extreme" (Default: 2.0 Sigma).
Compact View: A minimalist mode that hides historical averages to save screen space.
This tool is highly specialized for Turkish traders trading Gold Certificates on Borsa Istanbul, offering a professional-grade analysis of fair value and market inefficiencies.
Скрипт с защищённым кодом
Этот скрипт опубликован с закрытым исходным кодом. Однако вы можете использовать его свободно и без каких-либо ограничений — читайте подробнее здесь.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.
Скрипт с защищённым кодом
Этот скрипт опубликован с закрытым исходным кодом. Однако вы можете использовать его свободно и без каких-либо ограничений — читайте подробнее здесь.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.