Thai Gold Price - 1 Baht [XAUUSD to THB]คู่มือการใช้ Indicator ราคาทองคำไทย
ภาพรวม
Indicator นี้พัฒนาด้วย Pine Script v6 สำหรับแปลงราคาทองคำต่างประเทศ (XAUUSD) เป็นราคาทองคำไทยต่อ 1 บาททองคำ (ความบริสุทธิ์ 96.5%) แสดงข้อมูลแบบเรียลไทม์ในรูปแบบตารางที่ปรับแต่งได้บนกราฟ พร้อมกราฟราคาแยกต่างหากสำหรับการวิเคราะห์เชิงประวัติ
คุณสมบัติหลัก
จำกัดสัญลักษณ์: ใช้งานได้กับกราฟ XAUUSD หรือ GOLD เท่านั้น (ป้องกันการใช้ผิดวัตถุประสงค์)
คำนวณแบบเรียลไทม์: คำนวณราคาทองคำไทยอัตโนมัติจากข้อมูล XAUUSD และ USD/THB สด
ปรับแต่งการแสดงผล: ปรับตำแหน่งตารางและขนาดตัวอักษรได้
การแสดงผลคู่: ตารางข้อมูลบนกราฟหลัก + กราฟราคาในแผงแยกต่างหาก
หมายเหตุ: Indicator จะทำงานบนกราฟ XAUUSD หรือ GOLD เท่านั้น หากนำไปใช้กับสัญลักษณ์อื่น จะมีข้อความแสดงข้อผิดพลาด
การตั้งค่า
ตำแหน่งตาราง
เลือกตำแหน่งที่ต้องการให้ตารางแสดง:
Top Left - มุมบนซ้าย
Top Right - มุมบนขวา (ค่าเริ่มต้น)
Bottom Left - มุมล่างซ้าย
Bottom Right - มุมล่างขวา
ขนาดตัวอักษร
ปรับขนาดตัวอักษรให้อ่านง่าย:
Tiny - ขนาดเล็กที่สุด ประหยัดพื้นที่
Small - ขนาดเล็กแต่อ่านได้
Normal - ขนาดปกติ เหมาะสำหรับการใช้งานทั่วไป (แนะนำ)
Large - ขนาดใหญ่ อ่านง่าย เหมาะสำหรับการนำเสนอ
ข้อมูลที่แสดง
เนื้อหาในตาราง (4 แถว)
แถว คอลัมน์ซ้าย คอลัมน์ขวา
1 💰 ทองคำไทย 1 บาท
2 💰 ราคาทองคำ: ฿ ต่อบาท
3 💱 USD/THB:
4 📊 XAUUSD: $ ต่อออนซ์
วิธีการคำนวณสูตร
ราคาทองคำไทย = XAUUSD × USD/THB × (15.244 ÷ 31.1034768) × 0.965
ค่าคงที่ที่ใช้
1 บาททองคำ = 15.244 กรัม
1 ทรอยออนซ์ = 31.1034768 กรัม
ความบริสุทธิ์ทองคำไทย = 96.5% (มาตรฐาน)
ตัวอย่างการแสดงผล
text
💰 ทองคำไทย 1 บาท
💰 ราคาทองคำ: ฿42,850.75
💱 USD/THB: 34.52
📊 XAUUSD: $2,650.30
ความหมาย:
ทองคำไทย 1 บาท (ความบริสุทธิ์ 96.5%) ราคา ฿42,850.75
อัตราแลกเปลี่ยน: 1 ดอลลาร์สหรัฐ = 34.52 บาท
ราคาทองคำต่างประเทศ: $2,650.30 ต่อทรอยออนซ์
วิธีการใช้งาน
สำหรับนักเทรด
1. ใส่ indicator บนกราฟ XAUUSD หรือ GOLD
2. เลือกตำแหน่งตารางที่ไม่บดบังการวิเคราะห์
3. ติดตามราคาทองคำไทยแบบเรียลไทม์จากตาราง
สำหรับนักลงทุน
*ติดตามราคาทองคำไทยโดยไม่ต้องคำนวณเอง
*สังเกตผลกระทบของอัตราแลกเปลี่ยน USD/THB ต่อราคาทองคำไทย
*ระบุจังหวะการซื้อขายจากประวัติราคา
*สำหรับป้องกันความเสี่ยงด้านอัตราแลกเปลี่ยน
*ติดตามอัตราแลกเปลี่ยน USD/THB ควบคู่กับราคาทองคำ
*เข้าใจผลกระทบของค่าเงินต่อการลงทุนในทองคำ
การตรวจสอบสัญลักษณ์
Indicator มีฟังก์ชันตรวจสอบที่:
*ตรวจสอบว่าสัญลักษณ์บนกราฟมี "XAUUSD", "GOLD" หรือ "XAU/USD" หรือไม่
*แสดงข้อความผิดพลาดหากใช้กับสัญลักษณ์ที่ไม่รองรับ
*ป้องกันการคำนวณที่ผิดพลาดบนกราฟที่ไม่ใช่ทองคำ
ข้อมูลทางเทคนิค
แหล่งข้อมูล
XAUUSD: สัญลักษณ์บนกราฟปัจจุบัน (ต้องเป็นทองคำ)
USD/THB: ข้อมูลเรียลไทม์จาก FX_IDC:USDTHB
ความถี่ในการอัปเดต
ตารางอัปเดตทุกครั้งที่มีแท่งกราฟใหม่
กราฟราคาอัปเดตแบบเรียลไทม์
การคำนวณทั้งหมดใช้ราคาปิดของแท่งกราฟปัจจุบัน
ข้อแนะนำในการใช้งาน
การเลือกกราฟ: ใช้กับกราฟ XAUUSD หรือ GOLD เท่านั้นเพื่อความถูกต้อง
ตำแหน่งตาราง: เลือกมุมที่ไม่บดบังระดับราคาสำคัญหรือ indicator อื่น
ขนาดตัวอักษร: ใช้ Normal สำหรับการเทรดปกติ ปรับตามขนาดหน้าจอ
หลายหน้าจอ: พิจารณาใช้ขนาด Large เพื่อการมองเห็นที่ดีขึ้นบนจอภาพรอง
การแก้ไขปัญหา
ข้อความ "This indicator only works on XAUUSD or GOLD charts"
คุณกำลังใช้ indicator กับสัญลักษณ์ที่ไม่ใช่ทองคำ
สลับไปใช้กราฟ XAUUSD หรือ GOLD
ไม่แสดงตาราง
ตรวจสอบว่าเพิ่ม indicator ลงในกราฟแล้ว
ตรวจสอบการเลือกตำแหน่งตาราง
รีเฟรช PulseWire (F5)
ค่าที่แสดงไม่ถูกต้อง
ตรวจสอบว่าอยู่บนกราฟที่มีข้อมูลสด
ตรวจสอบว่าแหล่งข้อมูล USD/THB ทำงานปกติ
รอให้แท่งกราฟใหม่เกิดขึ้นเพื่อการอัปเดต
ปัญหาประสิทธิภาพ
ลดขนาดตัวอักษรหากตารางใหญ่เกินไป
ปิด indicator ที่ไม่จำเป็น
ตรวจสอบการเชื่อมต่ออินเทอร์เน็ต
ข้อจำกัด
ใช้งานได้กับกราฟ XAUUSD หรือ GOLD เท่านั้น
ต้องมีแหล่งข้อมูล USD/THB ที่ทำงานปกติ
ตารางไม่สามารถวางตำแหน่งอิสระได้
การคำนวณความบริสุทธิ์ 96.5% มาตรฐาน (ไม่รองรับความบริสุทธิ์อื่น)
ENGLISH:
Thai Gold Price Indicator - User Guide
Overview
This Pine Script v6 indicator converts international gold prices (XAUUSD) to Thai Baht per 1 Baht weight of gold (96.5% purity). It displays real-time pricing information in a clean, customizable table format directly on your chart, with a separate price chart below for historical analysis.
Key Features
Symbol Restriction: Only works on XAUUSD or GOLD charts (prevents misuse on other instruments)
Real-time Conversion: Automatically calculates Thai gold prices using live XAUUSD and USD/THB data
Customizable Display: Adjustable table position and text size
Dual Visualization: Information table on main chart + price chart in separate pane
Pine Script v6: Latest version with improved performance
Note: The indicator will only work on XAUUSD or GOLD charts. If applied to any other symbol, an error message will appear.
Configuration Settings
Table Position
Choose where the information table appears:
Top Left - Upper left corner
Top Right - Upper right corner (default)
Bottom Left - Lower left corner
Bottom Right - Lower right corner
Text Size
Adjust table text readability:
Tiny - Minimal screen space
Small - Compact but readable
Normal - Default balanced size (recommended)
Large - Easy reading, ideal for presentations
Display Information
Table Content (4 Rows)
Row Left Column Right Column
1 💰 THAI GOLD 1 BAHT
2 💰 Gold Price: ฿ per Baht
3 💱 USD/THB:
4 📊 XAUUSD: $ per ounce
Understanding the Calculation Formula
Thai Gold Price = XAUUSD × USD/THB × (15.244 ÷ 31.1034768) × 0.965
Constants Used
1 Thai Baht (gold weight) = 15.244 grams
1 Troy Ounce = 31.1034768 grams
Thai Gold Purity = 96.5% (standard)
Example Output
text
💰 THAI GOLD 1 BAHT
💰 Gold Price: ฿42,850.75
💱 USD/THB: 34.52
📊 XAUUSD: $2,650.30
This means:
1 Baht of 96.5% pure Thai gold costs ฿42,850.75
Exchange rate: 1 USD = 34.52 THB
International gold: $2,650.30 per troy ounce
How to Use
For Traders
Apply indicator to any XAUUSD or GOLD chart
Position the table in a corner that doesn't obstruct your analysis
Monitor real-time Thai gold price in the table
Use the separate pane to identify trends and patterns
For Investors
Track Thai gold prices without manually converting
Observe how USD/THB fluctuations affect local gold prices
Identify buying opportunities based on historical price movements
For Currency Hedging
Monitor USD/THB rate alongside gold price
Understand currency impact on gold investments
Symbol Validation
The indicator includes a built-in validation function that:
Checks if the chart symbol contains "XAUUSD", "GOLD", or "XAU/USD"
Displays an error message if used on unsupported symbols
Prevents incorrect calculations on non-gold charts
Technical Specifications
Data Sources
XAUUSD: Current chart's instrument (must be gold-related)
USD/THB: Real-time data from FX_IDC:USDTHB
Update Frequency
Table updates on every new bar
Price chart updates in real-time
All calculations use current bar's closing prices
Best Practices
Chart Selection: Always apply to XAUUSD or GOLD charts for accurate results
Table Placement: Choose a corner that doesn't hide important price levels or indicators
Text Size: Use Normal for daily trading, adjust based on screen size and personal preference
Multiple Monitors: Consider using Large text size for better visibility on secondary displays
Troubleshooting
"This indicator only works on XAUUSD or GOLD charts" Error
You're trying to use the indicator on a non-gold symbol
Switch to XAUUSD or any GOLD-related chart
No Table Displayed
Verify indicator is added to chart
Check table position selection
Refresh PulseWire (F5)
Incorrect Values
Ensure you're on a live chart with current data
Verify USD/THB data feed is active
Wait for a new bar to form for updates
Performance Issues
Reduce text size if table is too large
Close unnecessary indicators
Ensure stable internet connection
Limitations
Only works on XAUUSD or GOLD charts
Requires active USD/THB data feed
Table fixed to chart corners (cannot be positioned freely)
Calculations based on standard 96.5% purity (custom purities not supported)
Indicator










