OPEN-SOURCE SCRIPT

Gold Price Table

329
هذا المؤشر هو أداة تحليلية مخصصة لمتابعة أسعار الذهب لحظياً مباشرة على منصة TradingView. يقوم الكود بجلب سعر أونصة الذهب العالمي (XAUUSD$) وسعر صرف الدولار مقابل الريال السعودي (USDSAR$) ليقوم بالحسابات التالية:حساب عيارات الذهب: استخراج سعر جرام الذهب لعيارات (24، 22، 21) بالدولار والريال السعودي بدقة تعتمد على الوزن العالمي للأونصة ($31.1034768$ جرام).تحليل الأداء: مقارنة السعر الحالي بإغلاقات سابقة (يومية، أسبوعية، شهرية) لحساب نسبة التغير المئوية.جدول بيانات ذكي: يعرض النتائج في جدول أنيق في زاوية الشارت، مع دمج خلايا التغير لتجنب التكرار وتلوين الأرقام (أخضر للصعود وأحمر للهبوط) لتسهيل القراءة السريعة أثناء التداول
-----------------------------------------------------------------------------------------------------------------

This indicator is a custom analytical tool
designed for real-time gold price tracking directly on TradingView. The script fetches the global Gold Spot price (XAUUSD$) and the UUSD/SAR$ exchange rate to perform the following:Gold Karat Calculation: It calculates the price per gram for 24K, 22K, and 21K gold in both USD and Saudi Riyals (SAR), based on the official international troy ounce weight ($31.1034768$ grams).Performance Analysis: It compares the current price with previous closes (Daily, Weekly, and Monthly) to calculate the percentage change.Smart Data Table: Displays the results in a clean table at the corner of the chart. It features merged cells for the "Change %" to eliminate redundancy and uses dynamic coloring (Green for bullish / Red for bearish) for quick visual assessment during trading sessions.


by: dana..

Disclaimer

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.